[FWTools] gdalwarp issue?

Frank Warmerdam warmerdam at pobox.com
Wed Dec 15 17:55:05 EST 2010


On 10-12-15 01:49 PM, jkenneally at cartenav.com wrote:
> Once that is complete I run gdal_warp with the following arguments:
>
> gdalwarp.exe -t_srs EPSG:4326 -wt Byte -r bilinear -of GTiff -srcnodata "0 0 0
> 0" -dstnodata "0 0 0 0" "C:\Projects\example_test_4\test_image_referenced.tif"
> "C:\Projects\example_test_4\test_image_rectified.tif"
>
> I have tried different combinations of input params on both commands with no
> success so far, but the above are the current 'best guess' at what I should be
> specifying. I am suspicious that maybe I should be specifying a -a_src param
> for the translate call?
>
> As I mentioned in my previous post, if I load 'test_image_referenced.tif' into
> Global Mapper after the gdal_translate call it appears as expected, so I don't
> think it is as simple as my corner coords being wrong. Also, the final warped
> 'test_image_rectified.tif' seems to be rotated correctly, just not bound within
> the correct 'footprint' shape.
...
> I am attaching a teeny file comparing the final image loaded into global mapper
> and OpenEv to show more clearly what I am seeing with the results.

Jeff,

Based on the image you attached I think you want more than a first order
polynomial transformation.  You want, essentially, piecewise warping.
Four GCPs are only enough to give rotation and shear in a first order
polynomial.  But if you use thin plate splines instead with the GCPs you
should get a more general transformation.

Try adding "-tps" to the gdalwarp commandline arguments.

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 FWTools mailing list