[Liblas-commits] r1043 - trunk/src

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Feb 17 16:00:41 EST 2009


Author: hobu
Date: Tue Feb 17 16:00:40 2009
New Revision: 1043
URL: http://liblas.org/changeset/1043

Log:
support libgeotiff-only setting of proj4

Modified:
   trunk/src/lassrs.cpp

Modified: trunk/src/lassrs.cpp
==============================================================================
--- trunk/src/lassrs.cpp	(original)
+++ trunk/src/lassrs.cpp	Tue Feb 17 16:00:40 2009
@@ -405,9 +405,24 @@
     int ret = 0;
     ret = GTIFSetFromOGISDefn( m_gtiff, tmp.c_str() );
     if (!ret) throw std::invalid_argument("could not set m_gtiff from Proj4");
-#else
-    ;
+#endif
 
+// if we have libgeotiff but not GDAL, we'll use the 
+// simple method in libgeotiff
+#ifdef HAVE_LIBGEOTIFF
+#ifndef HAVE_GDAL
+    int ret = 0;
+    ret = GTIFSetFromProj4( m_gtiff, v.c_str());
+    if (!ret) 
+    {
+        throw std::invalid_argument("PROJ.4 string is invalid or unsupported");
+    }
+    ret = GTIFWriteKeys(m_gtiff);
+    if (!ret) 
+    {
+        throw std::runtime_error("The geotiff keys could not be written");
+    }    
+#endif
 #endif
 
 }


More information about the Liblas-commits mailing list