Commit 0a0765f1 authored by Julien Michel's avatar Julien Michel

BUG: Better handling of types in stream stitching filter in case gdal > 2.0 is used

parent 0c8eab2c
......@@ -318,8 +318,22 @@ OGRLayerStreamStitchingFilter<TInputImage>
try
{
#ifdef OTB_USE_GDAL_20
fusionFeature[0].SetValue(field.GetValue<GIntBig>());
// In this case, the feature id can be either
// OFTInteger64 or OFTInteger
switch(field.GetType())
{
case OFTInteger64:
{
fusionFeature[0].SetValue(field.GetValue<GIntBig>());
break;
}
default:
{
fusionFeature[0].SetValue(field.GetValue<int>());
}
}
#else
// Only OFTInteger supported in this case
fusionFeature[0].SetValue(field.GetValue<int>());
#endif
m_OGRLayer.CreateFeature(fusionFeature);
......
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