Skip to content

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:

  1. reading the geom file (formatted as key: value lines) to charge the metadata into a dictionary (std::map<std::string, std::string>)
  2. extracting the common metadata from the dictionary to fill an ImageMetadata object with the method Parse(Imagemetadata imi)
  3. allowing access to the dictionary so the ImageMetadataInterfaces can handle the sensor specific metadata, by inheriting from otb::MetadataSupplierInterface (and provide the method GetAs<>)

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::GeomMetadataSupplier is implemented and tested
  • The class otb::GeomMetadataSupplier is used by otb::ImageFileReader to 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).

Edited by Julien Osman