From d2002176e2076262875dec7f151075724de61dd1 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Fri, 22 Jun 2012 18:42:31 +0200
Subject: [PATCH] COMP: fix compilation following  CreateLayer prototype change

---
 Code/Common/otbPersistentImageToOGRDataFilter.txx               | 2 +-
 .../otbStreamingImageToOGRLayerSegmentationFilter.cxx           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code/Common/otbPersistentImageToOGRDataFilter.txx b/Code/Common/otbPersistentImageToOGRDataFilter.txx
index 9c19d6ec65..e00b887a38 100644
--- a/Code/Common/otbPersistentImageToOGRDataFilter.txx
+++ b/Code/Common/otbPersistentImageToOGRDataFilter.txx
@@ -129,7 +129,7 @@ PersistentImageToOGRDataFilter<TImage>
    
    OGRDataSourcePointerType ogrDS = this->GetOGRDataSource();
 
-   ogrDS->CreateLayer(m_LayerName, oSRS ,m_GeometryType, otb::ogr::StringListConverter(m_OGRLayerCreationOptions).to_ogr());
+   ogrDS->CreateLayer(m_LayerName, oSRS ,m_GeometryType, m_OGRLayerCreationOptions);
    OGRFieldDefn field(m_FieldName.c_str(),OFTInteger);
    
    //Handle the case of shapefile. A shapefile is a layer and not a datasource.
diff --git a/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx b/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx
index dc8f40d2c2..f0325bbb5c 100644
--- a/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx
+++ b/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx
@@ -103,7 +103,7 @@ int otbStreamingImageToOGRLayerSegmentationFilter(int argc, char * argv[])
   OGRSpatialReference oSRS(reader->GetOutput()->GetProjectionRef().c_str());
 
   // Create the layer
-  otb::ogr::Layer oLayer = ogrDS->CreateLayer(layerName,&oSRS,wkbMultiPolygon,NULL);
+  otb::ogr::Layer oLayer = ogrDS->CreateLayer(layerName,&oSRS,wkbMultiPolygon);
 
   // Create the field
   OGRFieldDefn field(fieldName.c_str(),OFTInteger);
-- 
GitLab