[Gdal-dev] Irregular geolocation grid

Frank Warmerdam warmerdam at pobox.com
Fri Apr 16 17:28:13 EDT 2004


Eric Dönges wrote:
> A (possibly dumb) question: can the "polynomial transformation stuff" 
> you refer
> to above be used to map raster coordintes (pixels) to geographic 
> coordinates ?
> Reading the supplied documentation has lead me to believe that if the 
> mapping cannot
> be expressed in terms of an affine transform (which they can't in my 
> case), the
> application is responsible for deriving a useable transform from the 
> GCPs supplied
> by the dataset. Is this not the case ?

Eric,

The existing polynomial transform code (in gdal/alg) can be used to
derive a 1st, 2nd or 3rd order transformation based on the GCPs.  This
can then be used to translate back and forth between pixel/line and
whatever coordinate system is in use (usually lat/long).

However, keep in mind that a polynomial transformation does not necessarily
map the underlying relationship all that well.  All we really know is that
how to transform the points at the GCPs.

> On a somewhat related note, is there any reason (besides the rather ugly 
> math involved)
> that GDALGCPsToGeoTransform() does not use all the GCPs available to 
> determine an affine
> transform ? I've written a least squares approximation that takes all 
> GCPs into account
> and thus does a somewhat better job (IMO, of course =8^) then the 
> algorithm currently
> used that I'd like to contribute if there is any interest for it.

It was my intention that GDALGCPstoGeoTransform() would be corrected
to do a first order best fit approximation based on all the GCPs at some
point.  If you have a reasonly clean implementation of this feel free to
provide it.

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