[gdal-dev] How do I find the anchor point in file?

Todd Smith smith.todd at gmail.com
Tue Nov 16 19:28:10 EST 2010

The default way of doing things at my company is to treat the lower left
corner of a file as the origin.  Thus when I call RasterIO on a GeoTIFF, I
make the buffer I pass as pData address to the last row of the buffer I've
allocated, and I make nLineSpace negative.  This has the effect of reading
the file from the beginning, but placing each line into my buffer starting
at the last and finishing at the first line.  This was working great until I
started reading ArcInfo/Ascii files with origins in the lower-left.  In this
case, I wouldn't want to address to the last row of my buffer, I'd want to
address to the beginning of my buffer, and use a positive value for my line

Is there metadata that will tell me where the file's origin is?  If not, any
suggestions as to how to deal with this problem?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101116/f3bc4935/attachment.html

More information about the gdal-dev mailing list