Opened 12 years ago

Closed 12 years ago

#2289 closed defect (fixed)

N56E102.hgt SRTM file misidentified as SGI format

Reported by: ozdemiray Owned by: Even Rouault
Priority: normal Milestone: 1.5.2
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: srtm sgi
Cc: warmerdam

Description

N56E103.hgt file (and there may be others too) cannot be opened by GDALOpen, because SGI driver's Open method creates an error.

SGI driver is tried before SRTMHGT driver in GDALOpen. In SGI Driver's open method, first 2 bytes of the file is compared with 474 and if it passes the file is considered to be an SGI file. Then 4th byte of the file is compared with 1, and if it is not, then an error is created.

The problem may be solved, if SRTMHGT driver is tried before SGI driver in GDALOpen (which means SRTMHGT driver will be registered first).

Attachments (1)

N56E102.hgt.zip (809.9 KB) - added by ozdemiray 12 years ago.

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by ozdemiray

Attachment: N56E102.hgt.zip added

comment:1 Changed 12 years ago by ozdemiray

Summary: N56E103.hgt SRTM file cannot be openedN56E102.hgt SRTM file cannot be opened

comment:2 Changed 12 years ago by ozdemiray

N56E102.hgt file (and there may be others too) cannot be opened by GDALOpen, because SGI driver's Open method creates an error.

SGI driver is tried before SRTMHGT driver in GDALOpen. In SGI Driver's open method, first 2 bytes of the file is compared with 474 and if it passes the file is considered to be an SGI file. Then 4th byte of the file is compared with 1, and if it is not, then an error is created.

The problem may be solved, if SRTMHGT driver is tried before SGI driver in GDALOpen (which means SRTMHGT driver will be registered first).

comment:3 Changed 12 years ago by warmerdam

Cc: warmerdam added
Component: defaultGDAL_Raster
Keywords: srtm sgi added
Owner: changed from warmerdam to chowell
Summary: N56E102.hgt SRTM file cannot be openedN56E102.hgt SRTM file misidentified as SGI format

Chris,

Could you confirm this, and look into an appropriate correction for the SGI driver? Reordering would be a last resort solution. Much better to make the sgi recognition stricter.

comment:4 Changed 12 years ago by Even Rouault

Owner: changed from chowell to Even Rouault

comment:5 Changed 12 years ago by Even Rouault

Status: newassigned

comment:6 Changed 12 years ago by Even Rouault

Milestone: 1.5.2
Resolution: fixed
Status: assignedclosed

Fixed in trunk in r14401 and in branches/1.5 in r14402

Note: See TracTickets for help on using tickets.