Opened 14 years ago

Closed 14 years ago

#3316 closed defect (fixed)

Crash and geolocation array extraction problems with HDF4 LISOTD_HRAC dataset

Reported by: gislab Owned by: warmerdam
Priority: normal Milestone: 1.7.2
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: hdf, lisotd, hrac
Cc:

Description

Several problems with specific HDF dataset:

Dataset source: http://www.iapmw.unibe.ch/research/projects/FriOWL/data/otd/LISOTD_HRAC_V2.2.hdf

  1. Trying to access the subdataset, that doesn't exist - crashes GDAL and guess it shouldn't?

gdal_translate -of GTiff -b 200 HDF4_SDS:UNKNOWN:LISOTD_HRAC_V2.2.hdf:3 output.tif

ok

gdal_translate -of GTiff -b 200 HDF4_SDS:UNKNOWN:LISOTD_HRAC_V2.2.hdf:4 output.tif

crash

  1. Attempting to extract geoloc array or use it doesn't lead to any result

gdalwarp -of GTiff -geoloc LISOTD_HRAC_V2.2.hdf rectified.tif

quietly shuts down without crash report or any warning, trying to import Latitude dataset itself doesn't help either.

I'm using GDAL 1.6.3, released 2009/11/19

Change History (1)

comment:1 by Even Rouault, 14 years ago

Milestone: 1.7.2
Resolution: fixed
Status: newclosed

HDF4 fixes :

r18945 /trunk/gdal/frmts/hdf4/ (hdf4dataset.cpp hdf4dataset.h hdf4imagedataset.cpp): HDF4 : prevent reading unexisting subdatasets; allow reading 1D subdatasets, in particular for GEOLOC bands; workaround strange test that swaps xsize, ysize and nbands for the particular case of the dataset of ticket #3316

r18946 /branches/1.7/gdal/frmts/hdf4/ (hdf4dataset.cpp hdf4dataset.h hdf4imagedataset.cpp): HDF4 : prevent reading unexisting subdatasets; allow reading 1D subdatasets, in particular for GEOLOC bands; workaround strange test that swaps xsize, ysize and nbands for the particular case of the dataset of ticket #3316

GEOLOC fixes :

r18947 /trunk/gdal/alg/gdalgeoloc.cpp: Allow using XBAND and YBAND with height == 1 in the case of a regular geoloc grid, suc h as for LISOTD_HRAC_V2.2.hdf (#3316)

Changeset r18947 for gdalgeoloc.cpp not backported to 1.7 as it is more of the new feature kind than the bugfix.

Note: See TracTickets for help on using tickets.