BSB GDALGCPsToGeoTransform() failing
Jay Borseth
jaybo at n...
Thu Nov 7 04:36:24 EST 2002
Standard Disclaimer: I don't know nuttin about GDAL, but...
When opening BSB version 3.07 files I'm noting a failure in
GDALGCPsToGeoTransform() (in gdal_misc.cpp, line 1432) when the sanity
check is performed on the GCPs:
/* --------------------------------------------------------------------
*/
/* Now check if any of the input points fit this poorly.
*/
/* --------------------------------------------------------------------
*/
if( !bApproxOK )
Usually the first few GCPs are fine with dfErrorX and dfErrorY == 0. But
then on subsequent GCPs the error magnitude becomes roughly a half
pixel:
dfErrorX -5.7940904895303902e-005
dfPixelSize 9.4416574834524163e-005
And since the failure tolerance is a quarter pixel, upon return to
bsbdataset.cpp V1.7, line 316, bGeoTransformSet is set false, and not
much works after that.
I'm assuming this problem is intrinsic to the way the BSB files were
created. One fix would be to pass "true" as the final parameter to
GDALGCPsToGeoTransform() which just bypasses the sanity check, but this
seems less than ideal. What to do?
- Jay
PS. A sample BSB V3.07 file that shows this behavior is at
http://www.nomadelectronics.com/anonymous/fakeftp.htm.
More information about the Gdal-dev
mailing list