Ticket #2289 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

N56E102.hgt SRTM file misidentified as SGI format

Reported by: ozdemiray Assigned to: 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

N56E102.hgt.zip (0.8 MB) - added by ozdemiray on 03/26/08 11:27:16.

Change History

03/26/08 11:27:16 changed by ozdemiray

  • attachment N56E102.hgt.zip added.

03/26/08 11:28:58 changed by ozdemiray

  • summary changed from N56E103.hgt SRTM file cannot be opened to N56E102.hgt SRTM file cannot be opened.

03/26/08 11:29:39 changed 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).

03/26/08 11:54:02 changed by warmerdam

  • cc set to warmerdam.
  • keywords set to srtm sgi.
  • component changed from default to GDAL_Raster.
  • owner changed from warmerdam to chowell.
  • summary changed from N56E102.hgt SRTM file cannot be opened to N56E102.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.

05/09/08 01:01:37 changed by rouault

  • owner changed from chowell to rouault.

05/09/08 01:01:46 changed by rouault

  • status changed from new to assigned.

05/09/08 01:21:13 changed by rouault

  • status changed from assigned to closed.
  • resolution set to fixed.
  • milestone set to 1.5.2.

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