Adapt SARMetadataCorrection to OTB v8
Given the nature of the application SARMetadataCoorection
, porting it for OTB v8 requires specific focus and attention.
The application can creates new GCP and/or Orbits data and update the image metadata with the new data.
getCorners
Get the corners of the image and estimate informations. With OTB v7, it uses the keyword dictionary to access the data. But with OTB v8, we can use the function GetSARParam
from ImageMetadata
to get all the corners coordinates. Later on the function, we need the azimuth and range attributes. We can also access these datas with GetSARParam
.
getGCP
Get the GCPs and register them for future operations. All the GCPs datas can be access by using GetGCPParam
.
createGCPAndUpdateMD
Create new GCPs data and update the metadata. With OTB v7, keywords were used to update the metadata. With OTB v8, we create a GCPParam structure with new data and then update the image metadata with the new GCPParam struct.
updateGCPAndMD
Update only the height coords of GCPs. We can use GetGCPParam
to get the current GCPs data, then update the Z coordinate. We then update the image metadata with the updated GCPs.
selectOrbits
Select fine orbits for an image. We can use GetSARParam
to get the Orbits data.
createOrbitsAndUpdateMD
Create new Orbits and update the metadata. Similar to createGCPAndUpdateMD
, we can create a new Orbits struct and then update the metadata with it.