[Gdal-dev] EHdr/ESRI .hdr to read SRTM is no longer working
Joaquim Luis
jluis at ualg.pt
Tue Apr 10 07:16:56 EDT 2007
Hi,
The recipe of reading SRTMs by generating a ESRI .hdr file is no longer
working
with GDAL1.4 but it does work with 1.3.2
The problem seams to be that data is converted to unsigned short int
instead of signed short int.
Joaquim Luis
---------------- With GDAL1.4.0
D:\programas\GDALB140\bin>gdalinfo -stats d:\img_samples\N18W071.hgt
Driver: EHdr/ESRI .hdr Labelled
Size is 1201, 1201
Coordinate System is `'
Origin = (-71.000416666666666,19.000416666666666)
Pixel Size = (0.000833333333333,-0.000833333333333)
Corner Coordinates:
Upper Left ( -71.0004167, 19.0004167)
Lower Left ( -71.0004167, 17.9995833)
Upper Right ( -69.9995833, 19.0004167)
Lower Right ( -69.9995833, 17.9995833)
Center ( -70.5000000, 18.5000000)
Band 1 Block=1201x1 Type=UInt16, ColorInterp=Undefined
Minimum=0.000, Maximum=65535.000, Mean=2873.507, StdDev=11834.425
NoData Value=-32768
---------------- Now with GDAL1.3.2
D:\programas\GDALB132\bin>gdalinfo -stats d:\img_samples\N18W071.hgt
Driver: EHdr/ESRI .hdr Labelled
Size is 1201, 1201
Coordinate System is `'
Origin = (-71.000417,19.000417)
Pixel Size = (0.00083333,-0.00083333)
Corner Coordinates:
Upper Left ( -71.0004167, 19.0004167)
Lower Left ( -71.0004167, 17.9995833)
Upper Right ( -69.9995833, 19.0004167)
Lower Right ( -69.9995833, 17.9995833)
Center ( -70.5000000, 18.5000000)
Band 1 Block=1201x1 Type=Int16, ColorInterp=Undefined
Minimum=-39.000, Maximum=2833.000, Mean=459.681, StdDev=572.878
NoData Value=-32768
Metadata:
STATISTICS_MINIMUM=-39
STATISTICS_MAXIMUM=2833
STATISTICS_MEAN=459.68081074608
STATISTICS_STDDEV=572.87797657624
and the header file is
# N18W071.hdr
BYTEORDER M
LAYOUT BIL
NROWS 1201
NCOLS 1201
NBANDS 1
NBITS 16
BANDROWBYTES 2402
TOTALROWBYTES 2402
BANDGAPBYTES 0
NODATA -32768
ULXMAP -71
ULYMAP 19
XDIM 0.000833333333333
YDIM 0.000833333333333
More information about the Gdal-dev
mailing list