diff --git a/Code/Common/otbVectorDataToImageFilter.txx b/Code/Common/otbVectorDataToImageFilter.txx
index e368863578821194c6925582241ac0e5fe49eac9..54cbf8a2bb02095a2a787a612aadf8bf9f375381 100644
--- a/Code/Common/otbVectorDataToImageFilter.txx
+++ b/Code/Common/otbVectorDataToImageFilter.txx
@@ -243,7 +243,7 @@ VectorDataToImageFilter<TVectorData, TImage>
     }
   else
     {
-    OGRSpatialReferenceH oSRS = OSRNewSpatialReference(projectionRefWkt.c_str());
+    OGRSpatialReferenceH oSRS = OSRNewSpatialReference(vectorDataProjectionWKT.c_str());
     char * pszProj4;
     OSRExportToProj4(oSRS, &pszProj4);
     m_VectorDataProjectionProj4 = pszProj4;