[Liblas-commits] hg: 3 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Jul 13 13:50:42 EDT 2010


changeset 0a05c3766864 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=0a05c3766864
summary: make a few libxml parameters advanced

changeset dda11297d232 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=dda11297d232
summary: don't force Release mode all the time, only if we're not in the cache already

changeset 2270b232d125 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=2270b232d125
summary: add liblas::Bounds class for describing chips and bboxes for spatial index querieis

diffstat:

 CMakeLists.txt                  |    4 +-
 apps/CMakeLists.txt             |    7 ++
 include/liblas/lasbounds.hpp    |   96 ++++++++++++++++++++++++++++
 include/liblas/lastransform.hpp |    9 +--
 src/CMakeLists.txt              |    2 +
 src/lasbounds.cpp               |  136 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 243 insertions(+), 11 deletions(-)

diffs (truncated from 318 to 300 lines):

diff -r 5d5c0da9d980 -r 2270b232d125 CMakeLists.txt
--- a/CMakeLists.txt	Mon Jul 12 16:30:04 2010 -0500
+++ b/CMakeLists.txt	Tue Jul 13 12:50:32 2010 -0500
@@ -65,7 +65,7 @@
 # Default to release mode 
 set(CMAKE_BUILD_TYPE Release CACHE STRING 
     "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
-    FORCE
+    
     )
 
 set(BUILD_PEDANTIC TRUE CACHE BOOL "Choose compilation in pedantic or relaxed mode")
@@ -139,10 +139,8 @@
 
 if(WITH_LIBXML2)
     find_package(LibXml2)
-    mark_as_advanced(CLEAR LIBXML2_FOUND)
     mark_as_advanced(CLEAR LIBXML2_INCLUDE_DIR)
     mark_as_advanced(CLEAR LIBXML2_LIBRARIES) 
-    mark_as_advanced(CLEAR LIBXML2_DEFINITIONS)
     if(LIBXML2_FOUND)
         include_directories(${LIBXML2_INCLUDE_DIR})
         add_definitions(-DHAVE_LIBXML2=1)
diff -r 5d5c0da9d980 -r 2270b232d125 apps/CMakeLists.txt
--- a/apps/CMakeLists.txt	Mon Jul 12 16:30:04 2010 -0500
+++ b/apps/CMakeLists.txt	Tue Jul 13 12:50:32 2010 -0500
@@ -21,6 +21,13 @@
 set(TXT2LAS txt2las)
 set(LAS2LAS2 las2las2 )
 
+
+# Set the build type to release if it is not explicitly set by the user and 
+# isn't in the cache yet
+if (NOT CMAKE_BUILD_TYPE )
+set(CMAKE_BUILD_TYPE "Release")
+endif()
+
 string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UPPER)
 if (BUILD_TYPE_UPPER EQUAL "DEBUG")
 set(BIGFILE_TEST bigfile_test)
diff -r 5d5c0da9d980 -r 2270b232d125 include/liblas/lasbounds.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/liblas/lasbounds.hpp	Tue Jul 13 12:50:32 2010 -0500
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * $Id$
+ *
+ * Project:  libLAS - http://liblas.org - A BSD library for LAS format data.
+ * Purpose:  LAS bounds class 
+ * Author:   Howard Butler, hobu.inc at gmail.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Howard Butler
+ *
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following 
+ * conditions are met:
+ * 
+ *     * Redistributions of source code must retain the above copyright 
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright 
+ *       notice, this list of conditions and the following disclaimer in 
+ *       the documentation and/or other materials provided 
+ *       with the distribution.
+ *     * Neither the name of the Martin Isenburg or Iowa Department 
+ *       of Natural Resources nor the names of its contributors may be 
+ *       used to endorse or promote products derived from this software 
+ *       without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
+ * OF SUCH DAMAGE.
+ ****************************************************************************/
+
+#ifndef LIBLAS_LASFILTER_HPP_INCLUDED
+#define LIBLAS_LASFILTER_HPP_INCLUDED
+
+#include <liblas/lasversion.hpp>
+#include <liblas/lasheader.hpp>
+#include <liblas/laspoint.hpp>
+#include <liblas/detail/fwd.hpp>
+#include <liblas/liblas.hpp>
+
+#include <vector>
+
+#include <boost/array.hpp>
+#include <boost/shared_ptr.hpp>
+
+namespace liblas
+{
+
+typedef boost::array <double, 3>  Array;
+typedef boost::shared_ptr< Array > ArrayPtr;
+
+class Bounds
+{
+public:
+    
+    Bounds();
+    Bounds( double minx, 
+            double miny, 
+            double maxx, 
+            double maxy, 
+            double minz, 
+            double maxz);
+
+    Bounds( double minx, 
+            double miny, 
+            double maxx, 
+            double maxy);
+    Bounds(Bounds const& other);
+    Bounds& operator=(Bounds const& rhs);
+    
+    double min(liblas::uint32_t i) { return (*mins)[i]; }
+    double max(liblas::uint32_t i) { return (*maxs)[i]; }
+    
+private:
+    ArrayPtr mins;
+    ArrayPtr maxs;
+    
+    void verify();
+    
+};
+
+
+
+} // namespace liblas
+
+#endif // ndef LIBLAS_LASFILTER_HPP_INCLUDED
diff -r 5d5c0da9d980 -r 2270b232d125 include/liblas/lastransform.hpp
--- a/include/liblas/lastransform.hpp	Mon Jul 12 16:30:04 2010 -0500
+++ b/include/liblas/lastransform.hpp	Tue Jul 13 12:50:32 2010 -0500
@@ -54,14 +54,7 @@
 namespace liblas
 {
 
-// class TransformI
-// {
-// public:
-//     
-//     virtual bool transform(Point& point) = 0;
-//     virtual ~TransformI() {};
-// 
-// };
+
 
 #ifndef HAVE_GDAL
     typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
diff -r 5d5c0da9d980 -r 2270b232d125 src/CMakeLists.txt
--- a/src/CMakeLists.txt	Mon Jul 12 16:30:04 2010 -0500
+++ b/src/CMakeLists.txt	Tue Jul 13 12:50:32 2010 -0500
@@ -43,6 +43,7 @@
   ${LIBLAS_HEADERS_DIR}/exception.hpp
   ${LIBLAS_HEADERS_DIR}/guid.hpp
   ${LIBLAS_HEADERS_DIR}/iterator.hpp
+  ${LIBLAS_HEADERS_DIR}/lasbounds.hpp
   ${LIBLAS_HEADERS_DIR}/lasclassification.hpp
   ${LIBLAS_HEADERS_DIR}/lascolor.hpp
   ${LIBLAS_HEADERS_DIR}/laserror.hpp
@@ -75,6 +76,7 @@
   )
 
 set(LIBLAS_CPP
+  lasbounds.cpp
   lasclassification.cpp
   lascolor.cpp
   laserror.cpp
diff -r 5d5c0da9d980 -r 2270b232d125 src/lasbounds.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lasbounds.cpp	Tue Jul 13 12:50:32 2010 -0500
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * $Id$
+ *
+ * Project:  libLAS - http://liblas.org - A BSD library for LAS format data.
+ * Purpose:  LAS bounds for C++ libLAS 
+ * Author:   Howard Butler, hobu.inc at gmail.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Howard Butler
+ *
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following 
+ * conditions are met:
+ * 
+ *     * Redistributions of source code must retain the above copyright 
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright 
+ *       notice, this list of conditions and the following disclaimer in 
+ *       the documentation and/or other materials provided 
+ *       with the distribution.
+ *     * Neither the name of the Martin Isenburg or Iowa Department 
+ *       of Natural Resources nor the names of its contributors may be 
+ *       used to endorse or promote products derived from this software 
+ *       without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
+ * OF SUCH DAMAGE.
+ ****************************************************************************/
+
+#include <liblas/lasbounds.hpp>
+#include <cmath>
+#include <limits>
+#include <string>
+#include <sstream>
+
+namespace liblas { 
+
+
+Bounds::Bounds()
+    : mins(ArrayPtr()), maxs(ArrayPtr())
+{
+    for (int i = 0; i < 3; ++i) {
+        (*mins)[i] = 0;
+        (*maxs)[i] = 0;
+    }
+}
+
+Bounds::Bounds( double minx, 
+                double miny, 
+                double maxx, 
+                double maxy, 
+                double minz, 
+                double maxz)
+    : mins(ArrayPtr()), maxs(ArrayPtr())
+{
+    (*mins)[0] = minx;
+    (*mins)[1] = miny;
+    (*mins)[2] = minz;
+    (*maxs)[0] = maxx;
+    (*maxs)[1] = maxy;
+    (*maxs)[2] = maxz;
+#ifdef DEBUG
+    verify();
+#endif
+
+}
+
+Bounds::Bounds( double minx, 
+                double miny, 
+                double maxx, 
+                double maxy)
+    : mins(ArrayPtr()), maxs(ArrayPtr())
+{
+    (*mins)[0] = minx;
+    (*mins)[1] = miny;
+    (*mins)[2] = 0;
+    (*maxs)[0] = maxx;
+    (*maxs)[1] = maxy;
+    (*maxs)[2] = 0;
+#ifdef DEBUG
+    verify();
+#endif
+
+}
+
+Bounds::Bounds(Bounds const& other)
+: mins(other.mins), maxs(other.maxs)
+{
+    
+}
+
+Bounds& Bounds::operator=(Bounds const& rhs) 
+{
+    if (&rhs != this)
+    {
+        mins = rhs.mins;
+        maxs = rhs.maxs;
+    }
+    return *this;
+}
+
+void Bounds::verify()
+{
+
+    for (uint32_t d = 0; d < 3; ++d)
+    {


More information about the Liblas-commits mailing list