HDF interface suggestions/requests
Mantis Issue 220, reported by cmoisy, assigned to msavinaud, created: 2011-01-07
The following method could be useful :
GetDatasetSpecificMetadata(MetaDatadictionnary HDFmdd) so we could retrieve the metadata specific for the dataset requesting a dataset metadata also retrieve the hdf metadata for data description, it could be useful just to have the specific part For example : MetadataMap is a map<string,string> used to store the Metadata dictionary // we need to know which metadata is specific to the dataset : that is not included in the hdf metadata void ModisDatasetImageIO::GetDatasetSpecificMetadata(MetadataMap HDFmetadataHash) { //keys for metadataHash ? : we use an iterator to parse all the keys std::string ParameterName,ParameterValue; MetadataMap::const_iterator iterator; MetadataMap::const_iterator end = metadataHash.end(); MetadataMap::const_iterator HDFend = HDFmetadataHash.end(); for (iterator = metadataHash.begin(); iterator != end ; ++iterator) { ParameterName=iterator->first; // if we don't find the key in the HDF metadata, this parameter is specific to the dataset if ( HDFmetadataHash.find(ParameterName) == HDFend ) { ParameterValue=iterator->second; SpecificMetadataHash[ParameterName] =ParameterValue; //std::cout << ParameterName << "\ \ " << ParameterValue << std::endl; // for debug purpose } } }
this could be simplified with itk::MetaDataDictionary.GetKeys() method
for RasterResolution, if the values are not correct with GetRasterXSize or GetRasterYSize, maybe the values from the metadata DATACOLUMNS and DATAROWS could be used
NULL