[Liblas-commits] hg: remove HAVE_GDAL from public headers and move down into source

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Jan 18 22:07:10 EST 2011


details:   http://hg.liblas.orghg/rev/f9b63cba40ec
changeset: 2783:f9b63cba40ec
user:      Howard Butler <hobu.inc at gmail.com>
date:      Tue Jan 18 20:52:36 2011 -0600
description:
remove HAVE_GDAL from public headers and move down into source
Subject: hg: merge

details:   http://hg.liblas.orghg/rev/2f0eb0ed73a3
changeset: 2784:2f0eb0ed73a3
user:      Howard Butler <hobu.inc at gmail.com>
date:      Tue Jan 18 21:07:03 2011 -0600
description:
merge

diffstat:

 apps/CMakeLists.txt          |   4 ++--
 include/liblas/transform.hpp |  39 ---------------------------------------
 src/transform.cpp            |  39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 41 deletions(-)

diffs (129 lines):

diff -r 6cae076c303a -r 2f0eb0ed73a3 apps/CMakeLists.txt
--- a/apps/CMakeLists.txt	Tue Jan 18 14:02:36 2011 -0600
+++ b/apps/CMakeLists.txt	Tue Jan 18 21:07:03 2011 -0600
@@ -191,8 +191,8 @@
   if(WITH_PKGCONFIG)
     
     set(PKGCFG_PREFIX "${CMAKE_INSTALL_PREFIX}")
-    set(PKGCFG_INC_DIR "${CMAKE_INSTALL_PREFIX}/${LIBLAS_INCLUDE_SUBDIR}")
-    set(PKGCFG_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${LIBLAS_LIB_SUBDIR}")
+    set(PKGCFG_INC_DIR "${LIBLAS_INCLUDE_SUBDIR}")
+    set(PKGCFG_LIB_DIR "${LIBLAS_LIB_SUBDIR}")
     set(PKGCFG_REQUIRES  "")
     set(PKGCFG_VERSION ${VERSION})
     set(PKGCFG_LINK_FLAGS "-llas -llas_c")
diff -r 6cae076c303a -r 2f0eb0ed73a3 include/liblas/transform.hpp
--- a/include/liblas/transform.hpp	Tue Jan 18 14:02:36 2011 -0600
+++ b/include/liblas/transform.hpp	Tue Jan 18 21:07:03 2011 -0600
@@ -53,11 +53,6 @@
 #include <vector>
 #include <string>
 
-#ifdef HAVE_GDAL
-#include <gdal.h>
-#include <ogr_spatialref.h>
-#endif
-
 namespace liblas {
 
 /// Defines public interface to LAS transform implementation.
@@ -83,27 +78,6 @@
 
 private:
 
-#ifdef HAVE_GDAL
-    struct OGRSpatialReferenceDeleter
-    {
-       template <typename T>
-       void operator()(T* ptr)
-       {
-           ::OSRDestroySpatialReference(ptr);
-       }
-    };
-
-    struct OSRTransformDeleter
-    {
-       template <typename T>
-       void operator()(T* ptr)
-       {
-           ::OCTDestroyCoordinateTransformation(ptr);
-       }
-    };
-
-#endif
-
     liblas::HeaderPtr m_new_header;
     
     typedef boost::shared_ptr<void> ReferencePtr;
@@ -181,19 +155,6 @@
 
 private:
 
-#ifdef HAVE_GDAL
-    struct GDALSourceDeleter
-    {
-       template <typename T>
-       void operator()(T* ptr)
-       {
-           ::GDALClose(ptr);
-       }
-    };
-
-
-#endif
-
     liblas::HeaderPtr m_new_header;
     
     typedef boost::shared_ptr<void> DataSourcePtr;
diff -r 6cae076c303a -r 2f0eb0ed73a3 src/transform.cpp
--- a/src/transform.cpp	Tue Jan 18 14:02:36 2011 -0600
+++ b/src/transform.cpp	Tue Jan 18 21:07:03 2011 -0600
@@ -62,9 +62,48 @@
 #include <string>
 #include <algorithm>
 
+#ifdef HAVE_GDAL
+#include <gdal.h>
+#include <ogr_spatialref.h>
+#endif
+
 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
 
 namespace liblas { 
+    
+
+#ifdef HAVE_GDAL
+    struct OGRSpatialReferenceDeleter
+    {
+       template <typename T>
+       void operator()(T* ptr)
+       {
+           ::OSRDestroySpatialReference(ptr);
+       }
+    };
+
+    struct OSRTransformDeleter
+    {
+       template <typename T>
+       void operator()(T* ptr)
+       {
+           ::OCTDestroyCoordinateTransformation(ptr);
+       }
+    };
+
+
+    struct GDALSourceDeleter
+    {
+       template <typename T>
+       void operator()(T* ptr)
+       {
+           ::GDALClose(ptr);
+       }
+    };
+
+
+#endif
+
 
 ReprojectionTransform::ReprojectionTransform(const SpatialReference& inSRS, const SpatialReference& outSRS)
     : m_new_header(HeaderPtr())


More information about the Liblas-commits mailing list