[gdal-dev] Gdal - read starting left-bottom

David Strip gdal at stripfamily.net
Thu Nov 15 18:54:37 PST 2012


On 11/15/2012 12:20 AM, netcadturgay wrote:
> my program reads a tif file starting left-top point. But I want to read
> starting left-bottom(LowerLeft). How can I solve this problem?
>
> Example:
> band.ReadRaster(0, 0, 500, 500, pixels, 500, 500, 0, 0);

You will have to read one line at a time into the i_th row of the array. 
This looks like the Java interface. I'm not really familiar with java, 
but taking a stab
int [] [] pixels   = new int [500][500]
for (i = 0; i < 500; i = i + 1)
     band.readRaster(0,i, 500, 1,  pixels[500-i])

Of course, this begs the question of why you want to do this is the 
first place?



More information about the gdal-dev mailing list