[gdal-dev] Re: GetProjectionRef() difference 1.8 vs 1.7.2
Even Rouault
even.rouault at mines-paris.org
Mon Feb 14 15:55:56 EST 2011
Le lundi 14 février 2011 21:40:36, cobalto a écrit :
> I'm hesitant to post the entire gdalinfo dump, but below are the changed
> sections for nitf_im:0:myfile.nitf between v1.7.2 and v1.8.0 of gdalinfo
> (Win64 w/ kakadu). Does this help? It seems like the info I'm after is now
> in the GCP Projection rather than the coordinate system. Does this provide
> any additional insight?
Yes, that helps. I think the difference in behaviour is due to
http://trac.osgeo.org/gdal/changeset/18635/trunk/gdal/frmts/nitf which changed
how GCPs are handled, and I think the new behaviour is appropriate.
I believe (Frank may confirm as being the commiter of this changeset) that the
difference is is due to GDALGCPsToGeoTransform() being now called with the
bApproxOK parameter to FALSE in 1.8.0 whereas it was set to TRUE to 1.7.X.
Which means that in 1.7.X we would return a geotransform in all cases, even if
the GCPs didn't determine an exact affine geotransform. Now if they don't, we
return them in their raw form. You can still force compute an approximate
geotransform by calling GDALGCPsToGeoTransform( nGCPCount, psGCPs,
adfGeoTransform, TRUE ). And the projection can indeed be fetched by
GDALGetGCPProjection() when GCPs are returned instead of a geotransform.
More information about the gdal-dev
mailing list