Skip to content
Snippets Groups Projects
Commit 0a0765f1 authored by Julien Michel's avatar Julien Michel
Browse files

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

parent 0c8eab2c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment