[gdal-dev] Coordinate bounds after gdalwarp
Frank Warmerdam
warmerdam at pobox.com
Fri Mar 27 00:34:25 EDT 2009
On Thu, Mar 26, 2009 at 8:57 PM, Martin Ceperley <martin at ceperley.com> wrote:
> Hello,
>
> After running gdalwarp with a bunch of control points, the resulting
> bitmap's coordinate bounds are slightly cropping off two of the corners and
> extending far beyond on the right. I am referencing these images for the
> first time and don't have the necessary bounds before the transformation.
>
> Here is a low-res example: http://ceperley.com/temp/OUT.jpg
>
> Any flags to correct this within gdalwarp or gdal_transform? Or do any of
> other command line tools generate projected corner coordinates?
Martin,
You haven't been specific about the type of transformation you are
using. I suspect it is a polynomial transformation based on GCPs.
These transformations are not exactly inverted by GDAL and so it
will often produce moderately incorrect output coordinates.
You might try specifying -tps to use thin plate splines instead
of polynomials as I believe they are properly inverted. However,
they have other behavior problems and may not work out for you.
I've been thinking it would be nice if the polynomials were properly
inverted in GDAL, but I don't have the math chops to do that without
a lot of work. Currently I build an inverse polynomial just by
reversing the GCPs and computing a new polynomial.
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