[Gdal-dev] IO Problems on the Edge of Rasters

Frank Warmerdam fwarmerdam at gmail.com
Tue Jul 19 13:44:07 EDT 2005


On 7/19/05, Johnson,  Donald W MVK Contractor
<Donald.W.Johnson at mvk02.usace.army.mil> wrote:
>  IM working on program which uses very large raster which can not be fully
> loaded into memory. Instead chunks of the raster a loaded from and stored to
> disk as nessessary. The entire process is hidden by an abstraction class so
> that the program logic is identical to working with a large 2D array. This
> appeared to work correctly but is failling on the far right hand side of
> rasters. For example if the raster is 160 rows and 212 columns and is loaded
> in 100x100 blocks, does not correctly right the last 12 columns to disk,
> however it returns no error.

Donald, 

I didn't dig through your code but one mistake sometimes encountered,
is that people try to use "windows" in RasterIO() that go off the file.
For instance if the last 100x100 "tile" is only partial, it is important that
you not specify a window that goes off the underyling GDAL file or it
will fail.   It should issue a proper error message of course. 

Any chance that this is what is happening? 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list