[gdal-dev] Affine validation

Matt Hanson mhanson at photon.com
Tue Jun 24 16:56:59 EDT 2008


Hello,

We wrote a GDAL driver for our own format but I have recently noticed
that gdalinfo is reporting incorrect corners for our driver, but not for
the equivalent datafile in ENVI format.  

It looks like the ENVI driver is correctly determining the sign on the
pixel size (which appear to always be positive), whereas our driver is
not and giving y-coordinates in the opposite direction from the origin
then what they are.   To be more specific we currently use UTM
projection and it's giving the coordinate of the lower right hand corner
as higher than top left coordinate when it should be lower (for northern
hemisphere).   I thought it was because our header file was reporting a
positive y-scale when it should be negative (and in fact it does work as
expected if I manually edit the header file and give it a negative
y-scale), but the ENVI .hdr file also has a positive y-scale, so the
driver must be checking and assigning the proper sign.

Rather than dig through the code for a while I was hoping someone might
be able to point me in the right direction for where this check might be
occurring, and where it should be done?   

Thanks in advance!

matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080624/10ffa88c/attachment.html


More information about the gdal-dev mailing list