[Liblas-commits] hg: 5 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Dec 22 15:53:56 EST 2010


changeset 990d3853db00 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=990d3853db00
summary: use "real" compression mode; improve writer factory usage; sync with laszip API changes

changeset 1af39cb2570b in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=1af39cb2570b
summary: pull-merge

changeset c76190335446 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=c76190335446
summary: use facotry for reader, so we get .laz support

changeset 9be154c5b8f4 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=9be154c5b8f4
summary: sync with recent changes; revert to compression 'NONE' mode

changeset f18ae657c29b in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f18ae657c29b
summary: pull-merge

diffstat:

 CMakeLists.txt                                  |   55 +-
 apps/las2las.cpp                                |   21 +-
 apps/lasblock.cpp                               |    4 +-
 apps/laskernel.cpp                              |    5 +-
 apps/laskernel.hpp                              |    2 +-
 doc/development/annual_report_2010.txt          |  247 +++++++++++
 doc/development/index.txt                       |    1 +
 hobu-config.bat                                 |    7 +-
 include/liblas/detail/reader/cachedreader.hpp   |    1 -
 include/liblas/detail/reader/point.hpp          |   88 ----
 include/liblas/detail/reader/reader.hpp         |    9 +-
 include/liblas/detail/reader/zipreader.hpp      |    3 -
 include/liblas/factory.hpp                      |   14 +-
 include/liblas/laspoint.hpp                     |    1 +
 include/liblas/utility.hpp                      |   28 +
 src/CMakeLists.txt                              |    7 +-
 src/detail/reader/cachedreader.cpp              |    5 +-
 src/detail/reader/header.cpp                    |    3 +
 src/detail/reader/point.cpp                     |   82 ---
 src/detail/reader/reader.cpp                    |   66 +-
 src/detail/reader/zipreader.cpp                 |   16 +-
 src/detail/writer/zipwriter.cpp                 |   16 +-
 src/factory.cpp                                 |   52 +-
 src/laspoint.cpp                                |   58 +-
 src/laswriter.cpp                               |    2 +-
 src/utility.cpp                                 |  368 +++++++++++++++--
 test/data/autzen.jpg                            |    0 
 test/data/autzen.jpg.aux.xml                    |   78 +++
 test/data/autzen.las                            |    0 
 test/data/autzen.wld                            |    6 +
 test/data/certainty3d-color-utm-feet-navd88.las |    0 
 test/unit/CMakeLists.txt                        |   19 +-
 test/unit/bounds_test.cpp                       |   89 ++++
 test/unit/classification_test.cpp               |  512 ++++++++++++++++++++++++
 test/unit/error_test.cpp                        |   77 +++
 test/unit/header_test.cpp                       |  310 ++++++++++++++
 test/unit/lasbounds_test.cpp                    |   89 ----
 test/unit/lasclassification_test.cpp            |  512 ------------------------
 test/unit/laserror_test.cpp                     |   77 ---
 test/unit/lasheader_test.cpp                    |  310 --------------
 test/unit/laspoint_test.cpp                     |  496 -----------------------
 test/unit/lasreader_iterator_test.cpp           |  393 ------------------
 test/unit/lasreader_test.cpp                    |  168 -------
 test/unit/lasspatialreference_test.cpp          |  323 ---------------
 test/unit/lasvariablerecord_test.cpp            |  111 -----
 test/unit/laswriter_test.cpp                    |  321 ---------------
 test/unit/point_test.cpp                        |  496 +++++++++++++++++++++++
 test/unit/reader_iterator_test.cpp              |  393 ++++++++++++++++++
 test/unit/reader_test.cpp                       |  282 +++++++++++++
 test/unit/spatialreference_test.cpp             |  323 +++++++++++++++
 test/unit/transform_test.cpp                    |   82 +++
 test/unit/variablerecord_test.cpp               |  111 +++++
 test/unit/writer_test.cpp                       |  321 +++++++++++++++
 53 files changed, 3912 insertions(+), 3148 deletions(-)

diffs (truncated from 7804 to 300 lines):

diff -r ecaf4ec83cd2 -r f18ae657c29b CMakeLists.txt
--- a/CMakeLists.txt	Sat Dec 18 12:31:40 2010 -0800
+++ b/CMakeLists.txt	Wed Dec 22 12:53:50 2010 -0800
@@ -188,7 +188,34 @@
     endif()
 endif()
 
+# GDAL/OGR support - optional, default=OFF
+set(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
 
+if(WITH_GDAL)
+
+  find_package(GDAL 1.6.0)
+
+  if(GDAL_FOUND)
+    # Confirm required API is available
+    include(CheckFunctionExists) 
+    set(CMAKE_REQUIRED_LIBRARIES ${GDAL_LIBRARY})
+    check_function_exists(OSRSetEquirectangular2 HAVE_OSRSETEQUIRECTANGULAR2)
+    
+    if(NOT HAVE_OSRSETEQUIRECTANGULAR2)
+      # Reset to NOT found for GDAL/OGR
+      set(GDAL_FOUND)
+      message(FATAL_ERROR
+        "Unable to find OSRSetEquirectangular2 within GDAL library at ${GDAL_INCLUDE_DIR} ${GDAL_LIBRARY}")
+    else()
+      include_directories(${GDAL_INCLUDE_DIR})
+      add_definitions(-DHAVE_GDAL=1)
+    endif()
+  endif()
+
+  mark_as_advanced(CLEAR GDAL_INCLUDE_DIR) 
+  mark_as_advanced(CLEAR GDAL_LIBRARY) 
+
+endif()
 
 # GeoTIFF support - optional, default=OFF
 set(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
@@ -227,38 +254,14 @@
   endif()
 endif()
 
-# GDAL/OGR support - optional, default=OFF
-set(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
-
 if(WITH_GDAL)
   if (NOT GEOTIFF_FOUND)
     message(FATAL_ERROR
       "GDAL support requires GeoTIFF library which was not selected")
   endif()
+endif()
 
-  find_package(GDAL 1.6.0)
 
-#  if(GDAL_FOUND)
-#    # Confirm required API is available
-#    include(CheckFunctionExists) 
-#    set(CMAKE_REQUIRED_LIBRARIES ${GDAL_LIBRARY})
-#    check_function_exists(OSRSetEquirectangular2 HAVE_OSRSETEQUIRECTANGULAR2)
-    
-#    if(NOT HAVE_OSRSETEQUIRECTANGULAR2)
-#      # Reset to NOT found for GDAL/OGR
-#      set(GDAL_FOUND)
-#      message(FATAL_ERROR
-#        "Unable to find OSRSetEquirectangular2 within GDAL library at ${GDAL_INCLUDE_DIR} ${GDAL_LIBRARY}")
-#    else()
-      include_directories(${GDAL_INCLUDE_DIR})
-      add_definitions(-DHAVE_GDAL=1)
-#    endif()
-#  endif()
-
-  mark_as_advanced(CLEAR GDAL_INCLUDE_DIR) 
-  mark_as_advanced(CLEAR GDAL_LIBRARY) 
-
-endif()
 
 # Oracle support - optional, default=OFF
 set(WITH_ORACLE FALSE CACHE BOOL "Choose if Oracle support should be built")
@@ -368,7 +371,7 @@
 SET(CPACK_PACKAGE_VERSION_MAJOR "1")
 SET(CPACK_PACKAGE_VERSION_MINOR "6")
 SET(CPACK_PACKAGE_VERSION_PATCH "0b3")
-SET(OSGEO4W_UPSTREAM_RELEASE "1")
+SET(OSGEO4W_UPSTREAM_RELEASE "2")
 
 SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP;TBZ2")
 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
diff -r ecaf4ec83cd2 -r f18ae657c29b apps/las2las.cpp
--- a/apps/las2las.cpp	Sat Dec 18 12:31:40 2010 -0800
+++ b/apps/las2las.cpp	Wed Dec 22 12:53:50 2010 -0800
@@ -22,7 +22,7 @@
 using namespace std;
 
 typedef boost::shared_ptr<liblas::Writer> WriterPtr;
-typedef boost::shared_ptr<liblas::Summary> SummaryPtr;
+typedef boost::shared_ptr<liblas::CoordinateSummary> SummaryPtr;
 typedef boost::shared_ptr<std::ofstream> OStreamPtr;
 
 WriterPtr start_writer(   OStreamPtr strm, 
@@ -62,7 +62,7 @@
 
     liblas::ReaderFactory f;
     liblas::Reader reader = f.CreateWithStream(ifs);
-    SummaryPtr summary(new::liblas::Summary);
+    SummaryPtr summary(new::liblas::CoordinateSummary);
     
     reader.SetFilters(filters);
     reader.SetTransforms(transforms);    
@@ -162,7 +162,7 @@
             RepairHeader(*summary, hnew);
             RewriteHeader(hnew, old_filename.str());
 
-            summary =  SummaryPtr(new liblas::Summary); 
+            summary =  SummaryPtr(new liblas::CoordinateSummary); 
             fileno++;
             split_bytes_count = 1024*1024*split_mb;
         }
@@ -190,7 +190,7 @@
             RepairHeader(*summary, hnew);
             RewriteHeader(hnew, old_filename.str());
 
-            summary =  SummaryPtr(new liblas::Summary); 
+            summary =  SummaryPtr(new liblas::CoordinateSummary); 
             fileno++;
             split_points_count = 0;
         }
@@ -323,14 +323,23 @@
         
         // Transforms alter our header as well.  Setting scales, offsets, etc.
         transforms = GetTransforms(vm, verbose, header);
-        
-        if (output.compare(output.length()-4,4,".laz")==0)
+
+        switch (WriterFactory::InferFileTypeFromExtension(output))
         {
+        case WriterFactory::FileType_LAS:
+            header.SetIsCompressed(false);
+            break;
+        case WriterFactory::FileType_LAZ:
 #ifdef HAVE_LASZIP
             header.SetIsCompressed(true);
 #else
             throw std::runtime_error("Compression support not enabled in liblas configuration");
 #endif
+            break;
+        case WriterFactory::FileType_Unknown:
+        default:
+            throw std::runtime_error("Unknown output file type");
+            break;
         }
 
         bool op = process(  input, 
diff -r ecaf4ec83cd2 -r f18ae657c29b apps/lasblock.cpp
--- a/apps/lasblock.cpp	Sat Dec 18 12:31:40 2010 -0800
+++ b/apps/lasblock.cpp	Wed Dec 22 12:53:50 2010 -0800
@@ -38,7 +38,7 @@
 #endif
 
 typedef boost::shared_ptr<liblas::Writer> WriterPtr;
-typedef boost::shared_ptr<liblas::Summary> SummaryPtr;
+typedef boost::shared_ptr<liblas::CoordinateSummary> SummaryPtr;
 typedef boost::shared_ptr<std::ofstream> OStreamPtr;
 
 WriterPtr start_writer(   OStreamPtr strm, 
@@ -103,7 +103,7 @@
     for ( boost::uint32_t i = 0; i < c.GetBlockCount(); ++i )
     {
         OStreamPtr ofs(new std::ofstream);
-        SummaryPtr summary(new::liblas::Summary);
+        SummaryPtr summary(new::liblas::CoordinateSummary);
 
         std::ostringstream name;
         name << out << "-" << i <<".las";
diff -r ecaf4ec83cd2 -r f18ae657c29b apps/laskernel.cpp
--- a/apps/laskernel.cpp	Sat Dec 18 12:31:40 2010 -0800
+++ b/apps/laskernel.cpp	Wed Dec 22 12:53:50 2010 -0800
@@ -111,7 +111,8 @@
         oss << "Cannot open " << filename << "for read.  Exiting...";
         throw std::runtime_error(oss.str());
     }
-    liblas::Reader reader(ifs);
+    liblas::ReaderFactory factory;
+    liblas::Reader reader = factory.CreateWithStream(ifs);
     liblas::Header header = reader.GetHeader();
     ifs.close();
     return header;
@@ -136,7 +137,7 @@
     }
 }  
   
-void RepairHeader(liblas::Summary const& summary, liblas::Header& header)
+void RepairHeader(liblas::CoordinateSummary const& summary, liblas::Header& header)
 {
 
     for (boost::uint32_t i = 0; i < 5; i++)
diff -r ecaf4ec83cd2 -r f18ae657c29b apps/laskernel.hpp
--- a/apps/laskernel.hpp	Sat Dec 18 12:31:40 2010 -0800
+++ b/apps/laskernel.hpp	Wed Dec 22 12:53:50 2010 -0800
@@ -101,7 +101,7 @@
 
 LAS_DLL liblas::Header FetchHeader(std::string const& filename);
 LAS_DLL void RewriteHeader(liblas::Header const& header, std::string const& filename);
-LAS_DLL void RepairHeader(liblas::Summary const& summary, liblas::Header& header);
+LAS_DLL void RepairHeader(liblas::CoordinateSummary const& summary, liblas::Header& header);
 LAS_DLL liblas::property_tree::ptree SummarizeReader(liblas::Reader& reader) ;
 
 #endif // LIBLAS_ITERATOR_HPP_INCLUDED
diff -r ecaf4ec83cd2 -r f18ae657c29b doc/development/annual_report_2010.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/development/annual_report_2010.txt	Wed Dec 22 12:53:50 2010 -0800
@@ -0,0 +1,247 @@
+.. _annual_report_2010:
+
+******************************************************************************
+2010 Annual Report
+******************************************************************************
+
+:Author: Howard Butler
+:Contact: hobu.inc at gmail.com
+:Date: 12/21/2010
+
+The following document is a synopsis of major development activities that have 
+taken place in the libLAS project (or related projects) in the 2010 calendar 
+year.  
+
+Vertical Datum Reprojection and Transformation
+..............................................................................
+
+Frank Warmerdam implemented vertical datum reprojection and transformation in the 
+entire open source GIS stack in the past year (`proj.4`_, `GDAL`_ and `libgeotiff`_).  This work 
+makes it possible to make vertical datum transformations via command-line utilities 
+like :ref:`las2las <las2las>` in addition to providing the tools for software 
+developers to implement the features in their own software.
+
+.. _`libgeotiff`: http://www.remotesensing.org/geotiff/geotiff.html
+.. _`proj.4`: http://proj.maptools.org/
+.. _`GDAL`: http://www.gdal.org
+
+libLAS Processing Kernel
+..............................................................................
+
+libLAS gained something I call the "libLAS Processing Kernel" in the past year. 
+It's really just a set of common functions that all application-level software 
+can reuse to implement filtering and transformation on LAS data.  The collation 
+of all of this functionality in a common place has meant the reuse of the 
+same operations in many of the libLAS utilities include :ref:`las2las <las2las>`, 
+:ref:`lasinfo <lasinfo>`, and :ref:`las2txt <las2txt>`.  New features implemented 
+in the kernel include:
+
+* Color fetching from GDAL raster data sources
+* Data reprojection and vertical datum transformation
+* Numerous filtering operations
+* Header modification
+
+These utilities are available to all software developers who wish to reuse them 
+in their own tools.
+
+
+Re-engineering of :ref:`las2las <las2las>` :ref:`las2txt <las2txt>` and :ref:`lasinfo <lasinfo>`
+...................................................................................................
+
+:ref:`las2las <las2las>` :ref:`las2txt <las2txt>` and :ref:`lasinfo <lasinfo>`
+were re-imagined in light of development of the `libLAS Processing Kernel`_ to
+take advantage of new functionality and regularize command-line argument
+handling and parsing. The previous versions of the utilities have been
+preserved under the :ref:`las2las-old <las2las_old>` :ref:`las2txt-old
+<las2txt_old>` and :ref:`lasinfo-old <lasinfo_old>` monikers in case people
+have significant processing workflows developed with them. It would be
+advantageous to upgrade to the new versions in many cases -- both for
+significantly improved functionality and for a speed improvement that is
+sometimes double that of the -old versions.
+
+Some new features the utilities gained as part of this effort include:
+
+* Setting color information from GDAL rasters
+* Splitting files based on a point count or a file size in mb
+* Chaining many filter operations together into a single call
+* Modifying header information, including setting coordinate system info
+* Summarizing data more fully and more flexibly (XML, per-point)
+
+Chipper
+..............................................................................
+
+Andrew Bell developed a specialized point partitioning process called
+:ref:`lasblock <lasblock>` to bucketize point data.The process that aims to
+optimize the fill capacity, shape, and speed of processing. More specifically,
+it attempts to keep the blocks as full as possible and as square as possible
+to augment querying characteristics for `Oracle Point Cloud`_. This
+pre-processing is needed as precursor step in the processing chain that ends
+with actually loading the data into Oracle via :ref:`las2oci`. :ref:`lasblock
+<lasblock>` can also be used as a LAS tiling process, although it is not so
+memory efficient.
+
+
+Indexing
+..............................................................................
+
+Gary Huber developed an octree-based spatial index for libLAS to speed up random,
+bounding-box-based queries to LAS files. It is released as part of libLAS 1.6,
+but its full implementation within the library is not yet complete. The index


More information about the Liblas-commits mailing list