Opened 15 years ago

Last modified 12 years ago

#2809 closed defect

Bad GCPs returned from this BSB — at Version 2

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.6.0
Severity: normal Keywords: BSB
Cc:

Description (last modified by warmerdam)

I have a BSB dataset containing 100+ GCPs. The GCPs generate a very poor fit to a 2nd order polynomial (also fail to generate a valid geotransform in GDALGCPsToGeoTransform). As the result, computed extent in GCS based the GCPs is out of place. The same dataset looks fine in a BSB viewer from maptech.

I placed the test dataset, 530_1.kap at ftp://GDAL@ftp.esri.com. Could you take a look? Maybe the GCPs are read wrong or there is another source of georeferencing info in the file.

Change History (2)

comment:1 by warmerdam, 15 years ago

Keywords: BSB added
Owner: changed from Warmerdam to warmerdam
Status: newassigned

I believe the best approach is actually improving the BSB driver to properly decode the projected coordinate system (often Mercator) and setup the projection and geotransform properly based on that rather than depending on the long/lat control points.

I'll take a whack at this.

comment:2 by warmerdam, 15 years ago

Description: modified (diff)

I have observed that the primary problem with this file is that the GCPs span the international dateline, and that the ones west of the dateline are positive (~179). The mechanisms in GDAL for doing GCP based regressions do not model the wraparound nature of the geographic coordinate systems and this gets treated as a discontinuity and the transform attempts to drag part of the map across the rest.

One potential solution is a heuristic to use values < -180 for GCPs to the west of the dateline. But this might be hard to do properly for large maps (as this one is).

So instead, I will continue to look into deriving the proper mercator coordinate system.

Note: See TracTickets for help on using tickets.