[Gdal-dev] GCP's, Warping and Source Data Projections

Frank Warmerdam warmerdam at pobox.com
Thu Sep 16 23:15:03 EDT 2004

Ethan Alpert wrote:
> Being pretty ignorant I figured that gdal's GCP's support could infer a 
> projection.  Which means I believed that by providing geographic 
> coordinates and pixel/line coordinates that GDAL would some how infer a 
> custom projection for my input data.
> Is this truly a misconception?


I'm not sure what you mean by this.  Certainly GDAL does not have any
mechanism to take a set of pixel/line to lat/long GCPs and from them
infer a projected coordinate system appropriate for the image.

However, given GCPs you should be able to rectify or even reproject
the image to some new coordinate system.  The caveat is that the
available low order polynomials behave very poorly for "interesting"
image geometries.

What you really need for raw image views that include a substantial
chunk of the globe is:
  1) a real projection that describes the geometry of the image.  For
     instance the "space oblique mercator" (as I understand it) is a
     projection that describes the geometry of scenes taken from
     satellites like landsat.  If you could describe your image in terms
     of a valid projection you could use gdalwarp to warp it accurately.

  2) a better GCP based trasnformation function than low order polynomials.
     When I was at PCI we had a transformation called thin-plate splines.
     I didn't really understand the math of it, but basically there
     were terms in the equation for each GCP provided and it was an
     exact transformation at the GCPs and it varied "smoothly and
     reasonably" between the GCPs.  If you had decent GCP coverage for
     an image it would give you as well behaved warp.  Other rubber sheeting
     approaches might also work similarly.

GDAL unfortunately lacks any such transfomration that works smoothly
for complex geometries.  This is definately an area I would like to improve
GDAL.  Any deeper minds than mine interested in working on that are welcome!
Certainly papers exist in the literature for a variety of good rubber sheeting
methods, but I have not had the time, patience or mathematical depth to apply

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Gdal-dev mailing list