Opened 22 years ago

Last modified 22 years ago

#114 closed defect (fixed)

gdalinfo: Min/Max wrong for ESRI BIL from GLOBE 30 DEM

Reported by: Markus Neteler Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Hi Frank,

recently we downloaded GLOBE DEM 30 data from
http://www.ngdc.noaa.gov/cgi-bin/seg/ff/nph-newform.pl/seg/topo/subset
in ESRI BIL format(I have uploaded to your incoming directory).

The problem is that gdalinfo obviously reports incorrect
Min/Max values:

gdalinfo botswana.bil
Driver: EHdr/ESRI .hdr Labelled
Size is 2160, 1920
Coordinate System is `'
Origin = (16.000000,-13.000000)
Pixel Size = (0.008333,-0.008333)
Corner Coordinates:
Upper Left  (  16.0000000, -13.0000000)
Lower Left  (  16.0000000, -28.9999936)
Upper Right (  33.9999928, -13.0000000)
Lower Right (  33.9999928, -28.9999936)
Center      (  24.9999964, -20.9999968)
Band 1 Block=2160x1 Type=Int16, ColorInterp=Undefined
  Min=-32768.000/0, Max=32767.000/0
  NoData Value=-500

while r.in.gdal works correct:
r.in.gdal -oe botswana.bil out=globedem30
r.info globedem30
 |   Type of Map:  raster              Number of Categories: 3329             |
 |   Data Type:    CELL                                                       |
 |   Rows:         1920                                                       |
 |   Columns:      2160                                                       |
 |   Total Cells:  4147200                                                    |
 |        Projection: Latitude-Longitude (zone 0)                             |
 |            N: 12:59:59.999982S    S: 28:59:59.976942S   Res: 0:00:29.99998 |
 |            E: 33:59:59.974062E    W: 15:59:59.999982E   Res: 0:00:29.99998 |
 |   Range of data:    min =  1 max = 3329

Perhaps you can look into this small problem?

Thanks,

 Markus

Change History (1)

comment:1 by warmerdam, 22 years ago

The /0 flag is supposed to indicate that the attempt to fetch the min/max
values from the native layer failed; however, while this is a helpful approach
for me as the developer I can see that this is very confusing for users.  I
have modified gdalinfo to only report quick-fetched min/max values if they are
actually fetched successfully.

Note that "gdalinfo -mm filename" can be used to actually compute the min/max
values if you ever need them. 

Note: See TracTickets for help on using tickets.