Commit ad72b73f authored by Julien Osman's avatar Julien Osman

BUG: Put back KeywordList in image writing process

parent 88212a44
Pipeline #6039 failed with stages
in 136 minutes and 33 seconds
......@@ -1538,6 +1538,26 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
CSLDestroy(rpcMetadata);
}
}
// ToDo : remove this part. This case is here for compatibility for images
// that still use Ossim for managing the sensor model (with OSSIMKeywordList).
else if (otb_kwl.GetSize())
{
/* -------------------------------------------------------------------- */
/* Set the RPC coeffs (since GDAL 1.10.0) */
/* -------------------------------------------------------------------- */
if (m_WriteRPCTags)
{
GDALRPCInfo gdalRpcStruct;
if (otb_kwl.convertToGDALRPC(gdalRpcStruct))
{
otbLogMacro(Debug, << "Saving RPC to file (" << m_FileName << ")")
char** rpcMetadata = RPCInfoToMD(&gdalRpcStruct);
dataset->SetMetadata(rpcMetadata, "RPC");
CSLDestroy(rpcMetadata);
}
}
}
/* -------------------------------------------------------------------- */
/* Case 3: Set the GCPs */
/* -------------------------------------------------------------------- */
......
......@@ -553,6 +553,7 @@ void ImageFileWriter<TInputImage>::GenerateOutputInformation(void)
}
m_ImageIO->SetUseCompression(m_UseCompression);
m_ImageIO->SetMetaDataDictionary(inputPtr->GetMetaDataDictionary());
const ImageCommons* img_common = dynamic_cast<const ImageCommons*>(inputPtr.GetPointer());
if (img_common != nullptr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment