From 19b1ab54ed63af02c9f6d91c26ba960b33e43514 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Sat, 23 Jun 2012 20:42:35 +0200
Subject: [PATCH] ENH: make sure UpdateOutputInformation is called on input
 before getting srs

This fixes apTvSeSegmentationWatershedVector
Baseline updated. It had not the srs in it.
---
 Code/Common/otbPersistentImageToOGRLayerFilter.txx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Code/Common/otbPersistentImageToOGRLayerFilter.txx b/Code/Common/otbPersistentImageToOGRLayerFilter.txx
index 38974c43f5..234d78cb1c 100644
--- a/Code/Common/otbPersistentImageToOGRLayerFilter.txx
+++ b/Code/Common/otbPersistentImageToOGRLayerFilter.txx
@@ -88,6 +88,9 @@ void
 PersistentImageToOGRLayerFilter<TImage>
 ::Initialize()
 {
+  // Make sure input projection ref is set
+  const_cast<InputImageType*>(this->GetInput())->UpdateOutputInformation();
+
   // Ensure that spatial reference of the output layer matches with
   // the spatial reference of the input image
   OGRSpatialReference oSRS(this->GetInput()->GetProjectionRef().c_str());
-- 
GitLab