Opened 8 years ago

Closed 5 years ago

#4425 closed enhancement (wontfix)

support more HDF4 files by dropping requirement of "Signature" attribute

Reported by: andreash Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: HDF4
Cc:

Description

Hi,

I noticed that when I create a HDF4 ScientificDataSet file directly with the HDF4-API (without GDAL), and I add the attributes TransformationMatrix, AREA_OR_POINT and Projection, to the file, GDAL still refuses to read the georeferencing from the file. Once I additionally add an attribute Signature reading "Created with GDAL (http://www.remotesensing.org/gdal/)", GDAL does read the georeferencing correctly.

I personally find this behaviour very strange. My suggestion:

In hdf4dataset.cpp, line 743, in the final else case, before setting the dataset type to UNKNOWN, check if the required attributes are present and if yes, set the dataset type to GDAL_HDF4

Change History (5)

comment:1 Changed 8 years ago by andreash

Type: defectenhancement

comment:2 Changed 8 years ago by warmerdam

I don't really see the problem with the current behavior.

If other applications want to set GDAL metadata they will need to set the GDAL signature as well.

comment:3 Changed 8 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: HDF4 added

comment:4 Changed 8 years ago by andreash

From my point of view, setting an attribute to "Created with GDAL" if the file was actually created with XYZ is not correct and misleading. I see a difference between "Software used to create the file" and "Metadata conventions followed in the file". If I want to create HDF4 files with a home-grown application and want these files to be read correctly by GDAL tools/library, I should not be forced to claim that I created the files with GDAL if I actually didn't.

But again, this is just my pont of view, and I'm new to GDAL and how things are being done here.

comment:5 Changed 5 years ago by Jukka Rahkonen

Resolution: wontfix
Status: newclosed

If I understand it right the signature is there for advertising that the file contains GDAL style metadata. Perhaps the text of the signature "Created with GDAL (http://www.remotesensing.org/gdal/)" is not the best possible because also other programs can also write GDAL style metadata and the web address has been invalid for some years. However, I do not believe that updating the title into "Contains GDAL style metadata" would make anybody very much happier. See also related issue #4426.

Note: See TracTickets for help on using tickets.