Opened 14 years ago

Closed 12 years ago

#863 closed defect (fixed)

gdal_translate: fails if filename starts with a number

Reported by: hamish_nospam@… Owned by: warmerdam
Priority: high Milestone: 1.5.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

While trying to add GCPs to a TIFF with gdal_translate, if the input filename
starts with a number then the program fails.


$ gdal_translate -gcp 7 4650 123456.0 789012.0 18_R.tif 18_R_geo.tif
Usage: gdal_translate [--help-general]
...
GDAL 1.2.6.0, released 2005/03/13

The following format drivers are configured and support output:
  VRT: Virtual Raster
  GTiff: GeoTIFF
...

$ cp 18_R.tif in.tif
$ gdal_translate -gcp 7 4650 123456.0 789012.0 in.tif in_geo.tif
Input file size is 1309, 4920
0...10...20...30...40...50...60...70...80...90...100 - done.


?
Hamish

Change History (3)

comment:1 Changed 14 years ago by hamish_nospam@…

adding ./ to the input filename fixes it. GCP looking for third dimension?

limit gcp arg search to 4 || 6?

$ gdal_translate -gcp 7 4650 123456.0 789012.0 ./18_R.tif 18_R_geo.tif



Hamish

comment:2 Changed 14 years ago by hamish_nospam@…

better workaround: add something between the filename and the GCPs.

$ gdal_translate -gcp 7 4650 1234.0 7890.0 -co compress=lzw 18_R.tif 18_R_geo.tif



Hamish

comment:3 Changed 12 years ago by Even Rouault

Milestone: 1.5.0
Resolution: fixed
Status: newclosed

Fixed in trunk in r12370

Note: See TracTickets for help on using tickets.