Inconsistent behaviour of geom file loading
If the user has an image file (image.tif) with a geom file (image.geom), the following behaviour are inconsistent :
-> in this case the code ends in https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/blob/develop/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx#L224
This method instanciate a sensor model through the factories, and then export back to keywordlist. As a consequence, any additional information that has not been parsed by the factory-selected sensor model is wiped out.
-> in this case the code ends in https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/blob/develop/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx#L379
The geom file is loaded into ImageKeywordlist "as is", without trying to instantiate any sensor model.
Steps to reproduce
Write an additional tag in the geom file, then use ReadImageInfo with either image.tif or Read image.tif?&geom=image.geom
All versions and os affected
There is no reason why we should filter keywordlist based on sensor model factory at reading time. Only when we need to actually use sensor modelling should we go through the factory. So my recommandation would be to change the code so that if a geom file with same name is present OR if it is set with the extended filename option, then we go through
ReadGeometryFromGEOMFile and read the keywordlist 'as is'.