OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.67k stars 2.47k forks source link

HDF5 driver: add support for new "CSK 2nd generation" (CSG) #2930

Closed FilipGh closed 3 years ago

FilipGh commented 3 years ago

Expected behavior and actual behavior.

CSK 2nd generation images come with a new Mission ID value: CSG There is some ad hoc code to deal with CSK complex type images

Steps to reproduce the problem.

gdalinfo does not interpret the number of bands correctly.

Operating system

It is not OS dependent

GDAL version and provenance

GDAM V3.0.2

Proposed patch

Add a 3rd value to check the "special case "

// Check if the mission type is CSK, KMPS or CSG.
// KMPS: Komsat-5 is Korean mission with a SAR instrument.
// CSG: Cosmo Skymed 2nd Generation
if(EQUAL(pszMissionId, "CSK") || EQUAL(pszMissionId, "KMPS")
                              || EQUAL(pszMissionId, "CSG"))
{

hdf5imagedataset.cpp.patch.txt

rouault commented 3 years ago

Do you have links to such datasets ?

FilipGh commented 3 years ago

Dear Evan,

I am afraid I cannot share such datasets. I received it from one of our customer. I tried to find some more data samples on the internet, with no success.

Sincerely Philippe

piyushrpt commented 3 years ago

Would this be an opportunity to pull CSK into its own driver? The HDF5 driver already seems pretty cluttered and more if-else statements for CSK makes it harder to work with.