[gdal-dev] Fwd: Bounding box change in recent versions of gdal?

Ole Nielsen ole.moller.nielsen at gmail.com
Sat Sep 3 06:44:25 EDT 2011


Thanks heaps for the reply and for clarifying - This is really about the
notorious pixel vs grid line registration issue i.e. interpretation of
pixels and great that it has been addressed.

Just one point of clarification, the new bounding box seems to have all
corner values rounded to three decimal places. Do you think that is
significant?

Anyway, I'll update our unit tests to take this into account.

Cheers and thanks
Ole

On Sat, Sep 3, 2011 at 5:30 PM, Even Rouault
<even.rouault at mines-paris.org>wrote:

> Le samedi 03 septembre 2011 12:23:55, Ole Nielsen a écrit :
> > Dear all!
> >
> > This may be related to my recent posting about SetField behaving
> > differently in different gdal versions.
> > In any case I find that the bounding box of this test geotif
> > file<
> http://www.keepandshare.com/doc/3116689/population-2010-clip-tif-septe
> > mber-3-2011-5-20-pm-162k?da=y> is
> > different on the two installations (details below).
> >
> > In brief, the bounding box using gdal 1.6 is
> >
> > Upper Left  (  99.3641696,  -0.0041806) ( 99d21'51.01"E,  0d 0'15.05"S)
> > Lower Left  (  99.3641696,  -2.2031806) ( 99d21'51.01"E,  2d12'11.45"S)
> > Upper Right ( 102.2411696,  -0.0041806) (102d14'28.21"E,  0d 0'15.05"S)
> > Lower Right ( 102.2411696,  -2.2031806) (102d14'28.21"E,  2d12'11.45"S)
> > Center      ( 100.8026696,  -1.1036806) (100d48'9.61"E,  1d 6'13.25"S)
> >
> >
> > whereas using gdal 1.8 it is
> >
> > Upper Left  (  99.3600000,   0.0000000) ( 99d21'36.00"E,  0d 0' 0.01"N)
> > Lower Left  (  99.3600000,  -2.1990000) ( 99d21'36.00"E,  2d11'56.40"S)
> > Upper Right ( 102.2370000,   0.0000000) (102d14'13.20"E,  0d 0' 0.01"N)
> > Lower Right ( 102.2370000,  -2.1990000) (102d14'13.20"E,  2d11'56.40"S)
> > Center      ( 100.7985000,  -1.0995000) (100d47'54.60"E,  1d 5'58.20"S)
> >
> > It'd be great if someone can
> >
> >    1. Reproduce this using the test file (download using link above)
> >    2. Let us know which bounding box is correct
> >    3. Raise this as a ticket if it is a genuine bug
>
> Ole,
>
> I've not tried with your file but the output of gdalinfo is sufficient to
> explain
> the difference you see.
>
> It is due to a fix done in GDAL 1.8.0 that changes the way the
> AREA_OR_POINT=Point metadata is interpreted w.r.t geotransform.
>
> It is mentionned in the GDAL 1.8.0 NEWS :
>
> == Backward compatibility issues ==
> [...]
> * RFC 33 changes the way PixelIsPoint is handled for GeoTIFF (#3838,#3837)
>
> You will find more information here :
>
> http://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint
>
> Best regards,
>
> Even
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110903/4b412df5/attachment-0001.html


More information about the gdal-dev mailing list