Le vendredi 06 février 2015 12:32:22, vf a écrit : > Thank you for the reply, Even > > I agree that the patch was firstly to handle correctly dimensions of h5 > files : previously it was [width, height, 2] -> nbBands = width. Using > patch, dimensions were correctly interpreted. However, the patch contained > the following code to handle complex data type (see below). Am I > misunderstand something ?
Hum, looking at http://trac.osgeo.org/gdal/attachment/ticket/4227/hdf5imagedataset.patch http://trac.osgeo.org/gdal/attachment/ticket/4227/patchCSK-L1A.diff http://trac.osgeo.org/gdal/attachment/ticket/4227/hdf5imagedataset.cpp I can't see the code snippets you mention below... I'm surely missing something... > > If I would like to contribute, should I submit a patch to the tracker or > someting else to do ... That's the best way yes. > > > > /************************************************************************/ > /* GetDataType() */ > /* */ > /* Transform HDF5 datatype to GDAL datatype */ > /************************************************************************/ > > /** > * Retrieves data type taking to account that file can be CSK Product with > * complex data > */ > GDALDataType HDF5ImageDataset::GetDataType(hid_t TypeID) > { > GDALDataType dataType = HDF5Dataset::GetDataType(TypeID); > if (iSubdatasetType == CSK_PRODUCT) > { > // if has 3 dimensions -> complex imagery > if (ndims == 3) > { > if( dataType == GDT_Int16 ) > return GDT_CInt16; > else if( dataType == GDT_Int32 ) > return GDT_CInt32; > else if( dataType == GDT_Float32 ) > return GDT_CFloat32; > else if( dataType == GDT_Float64 ) > return GDT_CFloat64; > } > } > return dataType; > } > > > /************************************************************************/ > /* GetDataTypeName() */ > /* */ > /* Return the human readable name of data type */ > /************************************************************************/ > > /** > * Retrieves data type name taking to account that file can be CSK Product > with > * complex data > */ > const char *HDF5ImageDataset::GetDataTypeName(hid_t TypeID) > { > GDALDataType dataType = HDF5Dataset::GetDataType(TypeID); > if (iSubdatasetType == CSK_PRODUCT) > { > // if has 3 dimensions -> complex imagery > if (ndims == 3) > { > if( dataType == GDT_Int16 ) > return "Complex 16-bit integer"; > else if( dataType == GDT_Int32 ) > return "Complex 32-bit integer"; > else if( dataType == GDT_Float32 ) > return "Complex 32-bit floating-point"; > else if( dataType == GDT_Float64 ) > return "Complex 64-bit floating-point"; > } > } > > const char * name = HDF5Dataset::GetDataTypeName( TypeID ); > return name; > } > > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/GDAL-1-11-0-and-Cosmo-skymed-L1A-image > ry-tp5185900p5185945.html Sent from the GDAL - Dev mailing list archive at > Nabble.com. > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
