[Gdal-dev] RE: gdalwarp -tps weirdness

Asger Petersen asger at jo-informatik.dk
Mon Jun 6 06:41:23 EDT 2005


> 
> I'm trying to use gdalwarp's new thin plate spline warping but it is
> doing funny things. Seems like a memory stomping problem but I'm not
> sure. Doing things like changing the order of GCPs (dozen placed by hand
> with gdal_translate) or the length of the output filename makes it
> either work or have the output go haywire.
> 
> anybody come across this before?

Hi

I had a problem much like this some time ago. Maybe you are experiencing something similar? Anyway here is an excerpt of the original correspondence with Frank:

My question: 
---
> I grew some gray hair finding out, that you can´t have a numeric filename when you use gcps with gdal_translate.
> This works:
> gdal_translate -of JP2KAK -gcp 0 0 702530.030 6172016.512 
> ht200414_06_7631.ecw ht200414_06_7631gcp.jp2
> This doesn't work:
> gdal_translate -of JP2KAK -gcp 0 0 702530.030 6172016.512 
> 200414_06_7631.ecw 200414_06_7631gcp.jp2
> If you don't use gcps, there are no problems with numeric filenames. So this also works:
> gdal_translate -of JP2KAK 200414_06_7631.ecw 200414_06_7631gcp.jp2
---

Franks answer:
----
Asger, 
The problem is that there is an optional elevation argument in the -gcp switch.  The usage message should look like this (now updated):

   [-gcp pixel line easting northing [elevation]]*

In order to determine if an elevation is supplied, the program tries to read a numeric value from the argument.  If it gets a non-zero value it treats it as elevation.
---
Regards
Asger



More information about the Gdal-dev mailing list