Metadata refactoring
Sub-issue of #1506 (closed).
The metadata in OTB will be refactored in order to allow OSSIM removal.
The following macro-actions should be done:
- Define the basic struct to store metadata (
ImageMetadata) - Setup utility functions in GDALImageIO to efficiently retrieve metadata (dates, doubles, vectors,...)
 - Implement metadata parsing into each sensor IMI
- DIMAP ? for the PHR/S6/S7 family
 - DigitalGlobe ? for QB, WorldView, ...
 - Sentinel1
 
 - Save 
ImageMetadatathrough GDALImageIO - Load 
ImageMetadatafrom GDALImageIO2024-metadata-refac - Translate OSSIM Keywordlist into 
ImageMetadata 
In order to implement progressively the new metadata model into the OTB, the work will be decomposed in 5 steps:
- Metadata parsing for Pleiades: implement all the required classes and method necessary to handle Pleiades metadata (Optical sensor).
 - Metadata parsing for Sentinel 1: implement all the required classes and method necessary to handle Sentinel-1 metadata (SAR sensor).
 - Implements all the other SAR metadata interfaces: TerraSar, CosmoImage, Radarsat2.
 - Implements all the other optical metadata interfaces: Ikonos, WorldView2, QuickBird, Spot, Spot6 and Formosat.
 - Implements metadata utility functionalities: import/export...
 
Here is a detailed description of remaining work per step and per-class:
- 
Metadata parsing for Pleiades - Metadata
- class ImageMetadataBase
- 
ToKeywordlist: handle Geometry keys  - 
ToKeywordlist: handle LUT1D keys  - 
ToKeywordlist: handle LUT2D keys  - 
FromKeywordlist  
 - 
 - class ImageMetadata
- 
slice  - 
append  
 - 
 - class OpticalImageMetadataInterface
- 
ConvertImageKeywordlistToImageMetadata  
 - 
 - MetaDataInterface implementation:
- 
DimapMetadataInterface: Pleiades  
 - 
 - class MetadataStorageInterface
- 
TODO: check precision settings  - 
TODO: check if we can use lexical_cast on a string_view  
 - 
 
 - class ImageMetadataBase
 - ImageBase
- class Image
- 
GenericRSTransform should be instanciated to translate from physical space to EPSG:4328  
 - 
 - class VectorImage
- 
GenericRSTransform should be instanciated to translate from physical space to EPSG:4328  
 - 
 - class ImageCommons
- 
Move back GetGeotransform to otb::Image and otb::VectorImage  - 
Move back the GetCorners to otb::Image and otb::VectorImage, and return coordinates, in physical space, adapt usages of these function to add a GenericRSTranform to get WGS84 coords.  - 
TODO: support EPSG and proj as fallback  
 - 
 
 - class Image
 - IOGDAL
- class GDALImageIO
- 
ExportMetadata  - 
ImportMetadata  - 
Implement test ioTvGDALImageIOImportExportMetadata_JPEG_99  
 - 
 
 - class GDALImageIO
 
 - Metadata
 - 
Metadata parsing for Sentinel 1 - Metadata
- class SARImageMetadataInterface
- 
ConvertImageKeywordlistToImageMetadata  
 - 
 - MetaDataInterface implementation:
- 
SAR IMI: Sentinel1  
 - 
 
 - class SARImageMetadataInterface
 
 - Metadata
 - 
Other SAR metadata interfaces - Metadata
- MetaDataInterface implementation:
- 
SAR IMI: TerraSar  - 
SAR IMI: CosmoSkyMed  - 
SAR IMI: Radarsat2  
 - 
 
 - MetaDataInterface implementation:
 
 - Metadata
 - 
Other optical metadata interfaces - Metadata
- MetaDataInterface implementation:
- 
DimapMetadataInterface: Spot, Formosat, (S6, S7)  - 
DGMetadataInterface: QB, Worldview  - 
IkonosMetadataInterface  - 
Read optical metadata from geom  
 - 
 
 - MetaDataInterface implementation:
 
 - Metadata
 - 
Metadata utility functionalities - Metadata
- class ImageMetadata
- 
compact  - 
merge  - 
Use merge in otbImageMetadataInterfaceFactory.h to avoid Imd duplication  - 
Update ChangeInformationImageFilter and it's test  
 - 
 
 - class ImageMetadata
 - Band metadata management :
Manage pixel conversion (e.g. RGB->Grayscale, Vector->complex etc) * [ ] Implement specific behavior in image manipulation filters (extractROI etc..)  - No data
Use otb::ImageMetadata instead of itk::MetaDataDictionary when using ND in filters  - OSSIMAdapters
- class ImageKeywordlist
- 
ReadGeometry  - 
WriteGeometry  
 - 
 
 - class ImageKeywordlist
 - ImageFileReader
- 
TODO: disable when Ossim removed  - 
TODO: define proper behavior in this case  
 - 
 
 - Metadata
 
Edited  by Cédric Traizet