[gdal-dev] Re: gdal_translate -mo option
Hermann Peifer
peifer at gmx.eu
Wed Sep 15 05:43:48 EDT 2010
On 15/09/2010 10:26, canduc17 wrote:
>
> gdal_translate -mo "VALUE_1=1234" -mo "VALUE_2=5678" input.tif output.tif
> It doesn't work.
Hmm. It works for me:
$ gdalinfo in.tif
Driver: GTiff/GeoTIFF
Files: in.tif
Size is 1, 1
Coordinate System is `'
Origin = (1.000000000000000,2.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 1.0000000, 2.0000000)
Lower Left ( 1.0000000, 1.0000000)
Upper Right ( 2.0000000, 2.0000000)
Lower Right ( 2.0000000, 1.0000000)
Center ( 1.5000000, 1.5000000)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray
NoData Value=0
$ gdal_translate -mo "VALUE_1=123" -mo "VALUE_2=456" -mo "VALUE_3=789"
in.tif out.tif
Input file size is 1, 1
0...10...20...30...40...50...60...70...80...90...100 - done.
$ gdalinfo out.tif
Driver: GTiff/GeoTIFF
Files: out.tif
Size is 1, 1
Coordinate System is `'
Origin = (1.000000000000000,2.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
VALUE_1=123
VALUE_2=456
VALUE_3=789
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 1.0000000, 2.0000000)
Lower Left ( 1.0000000, 1.0000000)
Upper Right ( 2.0000000, 2.0000000)
Lower Right ( 2.0000000, 1.0000000)
Center ( 1.5000000, 1.5000000)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray
NoData Value=0
More information about the gdal-dev
mailing list