[Gdal-dev] Possible bug: numeric file name and gcps

Frank Warmerdam fwarmerdam at gmail.com
Mon May 9 10:30:35 EDT 2005


On 5/9/05, Asger Petersen <asger at jo-informatik.dk> wrote:
> Hi
> 
> 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

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. 

I appologise for the needless misery this hackey approach has
caused you.

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