[gdal-dev] Cannot read UTM Ozi .map file

Jean-Claude Repetto jrepetto at free.fr
Wed Nov 28 08:54:50 PST 2012


Le 28/11/2012 05:16, Nik Sands a écrit :
> Hi GDAL-dev,
>
> I've recently re-compiled GDAL from the trunk after the patch to fix UTM ozi files was applied.  This has worked well for most UTM files I've tried so far, but I've come across one that produces a strange error in my code, but works OK with gdalinfo.  The following code fails for a dataset generated from this .map file and debugging indicates that 'srcWKT' is an empty string (""), and not NULL.

Hi Nik,

Try to apply the following patch :


Index: frmts/ozi/ozidataset.cpp
===================================================================
--- frmts/ozi/ozidataset.cpp	(révision 25261)
+++ frmts/ozi/ozidataset.cpp	(copie de travail)
@@ -746,7 +746,8 @@

  const char* OZIDataset::GetProjectionRef()
  {
-    return (pszWKT && nGCPCount == 0) ? pszWKT : "";
+//    return (pszWKT && nGCPCount == 0) ? pszWKT : "";
+    return pszWKT;
  }

  /************************************************************************/


Jean-Claude


More information about the gdal-dev mailing list