Reading the metadata from the geom files without OSSIM
Sub-issue of #1506 (closed) and #2024 (closed).
OSSIM is in charge of the interface with the geom files. As we remove OSSIM, we need a new interface. The new framework for the metadata will not need to write geom files, because it will use GDAL's ability to deal with metadata. So we only need to implement a geom file reader.
The new class otb::GeomMetadataSupplier
This class will be in charge of:
- reading the geom file (formatted as
key: valuelines) to charge the metadata into a dictionary (std::map<std::string, std::string>) - extracting the common metadata from the dictionary to fill an ImageMetadata object with the method
Parse(Imagemetadata imi) - allowing access to the dictionary so the ImageMetadataInterfaces can handle the sensor specific metadata, by inheriting from
otb::MetadataSupplierInterface(and provide the methodGetAs<>)
This class will be used by the otb::ImageFileReader if a geom file is present. In this case, the metadata won't be read by GDAL. The otb::ImageFileReader will use an instance of otb::GeomMetadataSupplier to parse the common metadata, then it will provide it to the otb::ImageMetadataInterface so it can parse the sensor specific metadata.
Acceptance criterion
-
The class otb::GeomMetadataSupplieris implemented and tested -
The class otb::GeomMetadataSupplieris used byotb::ImageFileReaderto parse the common metadata
The parsing of the sensor specific metadata by the IMIs using the otb::GeomMetadataSupplier is not in the scope of this issue, as it is covered by issue #2024 (closed).