[Gdal-dev] gdal_translate question

Christopher Condit condit at sdsc.edu
Tue Jul 31 17:24:45 EDT 2007


I'm trying to translate from an EHdr dataset to a GeoTIFF, but want to
incorporate the correct min/max values from the EHdr statistics file.
I'm currently using: gdal_translate -ot Int32 -scale 0 65535 -415 5778
input.DEM output.tiff
Is there any way to do this automatically since the statistics will vary
from DEM to DEM?

Thanks,
-Chris

gdalinfo output:

Driver: EHdr/ESRI .hdr Labelled
Files: E020N40.DEM
       E020N40.hdr
       E020N40.stx
       E020N40.prj
Size is 4800, 6000
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AXIS["Lat",NORTH],
    AXIS["Long",EAST],
    AUTHORITY["EPSG","4326"]]
Origin = (20.000000000000004,39.999999999999993)
Pixel Size = (0.008333333333330,-0.008333333333330)
Corner Coordinates:
Upper Left  (  20.0000000,  40.0000000) ( 20d 0'0.00"E, 40d 0'0.00"N)
Lower Left  (  20.0000000, -10.0000000) ( 20d 0'0.00"E, 10d 0'0.00"S)
Upper Right (  60.0000000,  40.0000000) ( 60d 0'0.00"E, 40d 0'0.00"N)
Lower Right (  60.0000000, -10.0000000) ( 60d 0'0.00"E, 10d 0'0.00"S)
Center      (  40.0000000,  15.0000000) ( 40d 0'0.00"E, 15d 0'0.00"N)
Band 1 Block=4800x1 Type=UInt16, ColorInterp=Undefined
  Min=-415.000 Max=5778.000   Computed Min/Max=0.000,65535.000
  Minimum=-415.000, Maximum=5778.000, Mean=516.400, StdDev=573.400
  NoData Value=-9999






More information about the Gdal-dev mailing list