[Liblas-commits] hg: Add sorting support to reduce memory use.
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Mar 8 14:37:34 EST 2011
details: http://hg.liblas.orghg/rev/6e3e617261fe
changeset: 2898:6e3e617261fe
user: Andrew Bell <andrew.bell.ia at gmail.com>
date: Tue Mar 08 13:14:06 2011 -0600
description:
Add sorting support to reduce memory use.
Subject: hg: Merge
details: http://hg.liblas.orghg/rev/294e04679171
changeset: 2899:294e04679171
user: Andrew Bell <andrew.bell.ia at gmail.com>
date: Tue Mar 08 13:23:04 2011 -0600
description:
Merge
diffstat:
.hgtags | 1 +
CMakeLists.txt | 4 +-
apps/las2las.cpp | 39 +-
apps/las2oci.cpp | 2 +-
apps/lasinfo.cpp | 4 +-
cmake/modules/FindLASzip.cmake | 3 +-
doc/_static/files/libLAS-Howard-Butler-ILMF-2011.pdf | 0
doc/compilation.txt | 4 +-
doc/conf.py | 3 +
doc/development/index.txt | 2 +-
doc/development/release_plan.txt | 190 --
doc/development/wkt.txt | 190 ++
doc/download.txt | 29 +-
doc/images/osgeo4w-lasinfo-output.png | 0
doc/index.txt | 10 +-
doc/lastools.txt | 17 +-
doc/osgeo4w.txt | 52 +-
doc/start.txt | 9 +-
doc/tutorial/cpp.txt | 349 +++-
doc/zip/index.txt | 54 -
hobu-config.bat | 15 +-
include/liblas/bounds.hpp | 2 +-
include/liblas/capi/las_version.h | 6 +-
include/liblas/chipper.hpp | 56 +-
include/liblas/detail/private_utility.hpp | 2 +-
include/liblas/external/property_tree/detail/exception_implementation.hpp | 4 +-
include/liblas/external/property_tree/detail/file_parser_error.hpp | 4 +-
include/liblas/external/property_tree/detail/info_parser_error.hpp | 4 +-
include/liblas/external/property_tree/detail/info_parser_read.hpp | 4 +-
include/liblas/external/property_tree/detail/info_parser_utils.hpp | 4 +-
include/liblas/external/property_tree/detail/info_parser_write.hpp | 4 +-
include/liblas/external/property_tree/detail/info_parser_writer_settings.hpp | 4 +-
include/liblas/external/property_tree/detail/json_parser_error.hpp | 4 +-
include/liblas/external/property_tree/detail/json_parser_read.hpp | 4 +-
include/liblas/external/property_tree/detail/json_parser_write.hpp | 4 +-
include/liblas/external/property_tree/detail/ptree_implementation.hpp | 4 +-
include/liblas/external/property_tree/detail/ptree_utils.hpp | 4 +-
include/liblas/external/property_tree/detail/rapidxml.hpp | 4 +-
include/liblas/external/property_tree/detail/xml_parser_error.hpp | 4 +-
include/liblas/external/property_tree/detail/xml_parser_flags.hpp | 4 +-
include/liblas/external/property_tree/detail/xml_parser_read_rapidxml.hpp | 4 +-
include/liblas/external/property_tree/detail/xml_parser_utils.hpp | 4 +-
include/liblas/external/property_tree/detail/xml_parser_write.hpp | 4 +-
include/liblas/external/property_tree/detail/xml_parser_writer_settings.hpp | 4 +-
include/liblas/external/property_tree/exceptions.hpp | 4 +-
include/liblas/external/property_tree/id_translator.hpp | 4 +-
include/liblas/external/property_tree/info_parser.hpp | 4 +-
include/liblas/external/property_tree/ini_parser.hpp | 4 +-
include/liblas/external/property_tree/json_parser.hpp | 4 +-
include/liblas/external/property_tree/ptree.hpp | 4 +-
include/liblas/external/property_tree/ptree_fwd.hpp | 4 +-
include/liblas/external/property_tree/ptree_serialization.hpp | 4 +-
include/liblas/external/property_tree/stream_translator.hpp | 4 +-
include/liblas/external/property_tree/string_path.hpp | 4 +-
include/liblas/external/property_tree/xml_parser.hpp | 4 +-
include/liblas/liblas.hpp | 35 +-
include/liblas/transform.hpp | 1 +
liblas-osgeo4w-init.bat | 2 +-
liblas-osgeo4w-start.bat.tmpl | 6 +-
python/README.txt | 94 +
python/scripts/oci2las.py | 92 +-
python/setup.py | 18 +-
python/tests/Header.txt | 2 +-
src/c_api.cpp | 370 ++--
src/chipper.cpp | 186 +-
src/detail/reader/reader.cpp | 3 +-
src/detail/zippoint.cpp | 762 +++++-----
src/gt_citation.h | 50 +
src/gt_wkt_srs.cpp | 74 +-
src/gt_wkt_srs.h | 46 +
src/gt_wkt_srs_for_gdal.h | 48 +
src/header.cpp | 2 +-
src/point.cpp | 60 +-
src/spatialreference.cpp | 35 +
src/tifvsi.h | 39 +
src/variablerecord.cpp | 2 +-
test/unit/point_test.cpp | 27 +-
test/unit/variablerecord_test.cpp | 2 +-
78 files changed, 1909 insertions(+), 1210 deletions(-)
diffs (truncated from 4937 to 300 lines):
diff -r 109c69fe418c -r 294e04679171 .hgtags
--- a/.hgtags Thu Jan 27 09:30:18 2011 -0600
+++ b/.hgtags Tue Mar 08 13:23:04 2011 -0600
@@ -13,3 +13,4 @@
d779dd09e547cd56c48ae5d3da3959193fc07cb0 1.0.0b1
e4baaf6287a20b01e0fbe3632a37c3c559ca9ca2 0.9.6
f93c63e4384fd4ad3fae69b72db3643455539919 1.0.1
+d1bf7693076ccd8245bd98acea9a1a10553be066 1.6.0
diff -r 109c69fe418c -r 294e04679171 CMakeLists.txt
--- a/CMakeLists.txt Thu Jan 27 09:30:18 2011 -0600
+++ b/CMakeLists.txt Tue Mar 08 13:23:04 2011 -0600
@@ -11,11 +11,11 @@
SET(LIBLAS_VERSION_MAJOR "1")
SET(LIBLAS_VERSION_MINOR "6")
-SET(LIBLAS_VERSION_PATCH "0b4")
+SET(LIBLAS_VERSION_PATCH "0")
set(VERSION "${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}")
SET(LIBLAS_LIB_SOVERSION "2.0.0")
SET(LIBLAS_C_LIB_SOVERSION "2.0.0")
-SET(OSGEO4W_UPSTREAM_RELEASE "2")
+SET(OSGEO4W_UPSTREAM_RELEASE "1")
if(WIN32)
# Name of C++ library
diff -r 109c69fe418c -r 294e04679171 apps/las2las.cpp
--- a/apps/las2las.cpp Thu Jan 27 09:30:18 2011 -0600
+++ b/apps/las2las.cpp Tue Mar 08 13:23:04 2011 -0600
@@ -88,6 +88,24 @@
std::cout << std::endl;
}
reader.Reset();
+
+ // If we have any reprojection going on, we have to reset the offsets
+ // of the HeaderPtr that is applied to the points as they are reprojected
+ // or things will get screwed up when we go to re-assign the header
+ // as we write the points with the min-offset
+ std::vector<liblas::TransformPtr> transforms = reader.GetTransforms();
+ std::vector<liblas::TransformPtr> new_transforms;
+ for (std::size_t i = 0; i < transforms.size(); i++)
+ {
+ liblas::TransformPtr transform = transforms[i];
+
+ if (dynamic_cast<liblas::ReprojectionTransform*>(transform.get()))
+ {
+ dynamic_cast<liblas::ReprojectionTransform*>(transform.get())->SetHeaderPtr(liblas::HeaderPtr(new liblas::Header(header)));
+ }
+ new_transforms.push_back(transform);
+ }
+ reader.SetTransforms(new_transforms);
}
std::ostream* ofs = NULL;
@@ -118,13 +136,24 @@
boost::int32_t split_bytes_count = 1024*1024*split_mb;
boost::uint32_t split_points_count = 0;
int fileno = 2;
-
+
+ liblas::HeaderPtr ptr = liblas::HeaderPtr(new liblas::Header(header));
+
while (reader.ReadNextPoint())
{
-
- liblas::Point const& p = reader.GetPoint();
- summary->AddPoint(p);
- writer->WritePoint(p);
+ if (min_offset)
+ {
+ liblas::Point p = reader.GetPoint();
+ summary->AddPoint(p);
+ p.SetHeaderPtr(ptr);
+ writer->WritePoint(p);
+ }
+ else
+ {
+ liblas::Point const& p = reader.GetPoint();
+ summary->AddPoint(p);
+ writer->WritePoint(p);
+ }
if (verbose)
term_progress(std::cout, (i + 1) / static_cast<double>(size));
i++;
diff -r 109c69fe418c -r 294e04679171 apps/las2oci.cpp
--- a/apps/las2oci.cpp Thu Jan 27 09:30:18 2011 -0600
+++ b/apps/las2oci.cpp Tue Mar 08 13:23:04 2011 -0600
@@ -707,7 +707,7 @@
if (vm.count("help"))
{
- std::cout << GetInvocationHeader()<<file_options<<"\n"<<transform_options<<"\n"<<filtering_options<<"\n";
+ std::cout << GetInvocationHeader()<<file_options<<"\n"<<transform_options<<"\n"<<header_options<<"\n"<<filtering_options<<"\n";
std::cout <<"\nFor more information, see the full documentation for las2oci at:\n";
std::cout << " http://liblas.org/utilities/las2oci.html\n";
diff -r 109c69fe418c -r 294e04679171 apps/lasinfo.cpp
--- a/apps/lasinfo.cpp Thu Jan 27 09:30:18 2011 -0600
+++ b/apps/lasinfo.cpp Tue Mar 08 13:23:04 2011 -0600
@@ -204,7 +204,7 @@
liblas::Point const& p = reader.GetPoint();
if (output_xml) {
liblas::property_tree::ptree tree;
- tree = p.GetPTree();
+ tree.add_child("points.point", p.GetPTree());
liblas::property_tree::write_xml(std::cout, tree);
exit(0);
}
@@ -236,7 +236,7 @@
verbose
);
- liblas::Header const& header = reader.GetHeader();
+ header = reader.GetHeader();
// Add the header to the summary so we can get more detailed
// info
diff -r 109c69fe418c -r 294e04679171 cmake/modules/FindLASzip.cmake
--- a/cmake/modules/FindLASzip.cmake Thu Jan 27 09:30:18 2011 -0600
+++ b/cmake/modules/FindLASzip.cmake Tue Mar 08 13:23:04 2011 -0600
@@ -44,7 +44,8 @@
/usr/include
/usr/local/include
/tmp/lasjunk/include
- ${OSGEO4W_ROOT_DIR}/include)
+ ${OSGEO4W_ROOT_DIR}/include
+ NO_DEFAULT_PATH)
SET(LASZIP_NAMES ${OSGEO4W_IMPORT_LIBRARY} laszip)
diff -r 109c69fe418c -r 294e04679171 doc/_static/files/libLAS-Howard-Butler-ILMF-2011.pdf
Binary file doc/_static/files/libLAS-Howard-Butler-ILMF-2011.pdf has changed
diff -r 109c69fe418c -r 294e04679171 doc/compilation.txt
--- a/doc/compilation.txt Thu Jan 27 09:30:18 2011 -0600
+++ b/doc/compilation.txt Tue Mar 08 13:23:04 2011 -0600
@@ -255,12 +255,12 @@
::
- $ lasinfo -c ../test/data/TO_core_last_zoom.las
+ $ lasinfo ../test/data/TO_core_last_clip.las
---------------------------------------------------------
Header Summary
---------------------------------------------------------
- File Name: ../test/data/TO_core_last_zoom.las
+ File Name: ../test/data/TO_core_last_clip.las
Version: 1.0
Source ID: 0
Reserved: 0
diff -r 109c69fe418c -r 294e04679171 doc/conf.py
--- a/doc/conf.py Thu Jan 27 09:30:18 2011 -0600
+++ b/doc/conf.py Tue Mar 08 13:23:04 2011 -0600
@@ -214,6 +214,9 @@
pdf_language = "en_US"
pdf_fit_mode = "overflow"
pdf_use_toc = True
+pdf_splittables = True
+pdf_appendices = []
+pdf_baseurl = 'http://liblas.org'
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
diff -r 109c69fe418c -r 294e04679171 doc/development/index.txt
--- a/doc/development/index.txt Thu Jan 27 09:30:18 2011 -0600
+++ b/doc/development/index.txt Tue Mar 08 13:23:04 2011 -0600
@@ -17,8 +17,8 @@
format_elements
Motivation <http://www.youtube.com/watch?v=u6XAPnuFjJc>
2010 Annual Report <annual_report_2010>
- Release Plan <release_plan>
RFCs <rfc/index>
+ LAS 1.4 WKT Proposal <wkt>
Authors
diff -r 109c69fe418c -r 294e04679171 doc/development/release_plan.txt
--- a/doc/development/release_plan.txt Thu Jan 27 09:30:18 2011 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-.. _release_plan:
-
-******************************************************************************
-libLAS 1.6.0 Release Notes and Schedule
-******************************************************************************
-
-
-:Author: Howard Butler
-:Contact: hobu.inc at gmail dot com
-:Date: 10/12/2010
-
-.. contents::
- :depth: 3
- :backlinks: none
-
-Even though there has not been a major release of libLAS since April of 2009,
-development has continued on the library. A number of new features, updates,
-and bug fixes have been developed for the next libLAS release, to be called
-`libLAS 1.6`. This section outlines some of the work that has (or will) gone
-on.
-
-Major features
-------------------------------------------------------------------------------
-
-The following are upcoming major features for libLAS 1.6.
-
-Significant internal refactoring of C++ reading/writing code
-..............................................................................
-
-The C++ reader and writer code of libLAS was a bit inflexible, and contained
-significant duplication. Giant updates would be required to the code as the
-ASPRS LAS standard committee adds new versions of the
-specification. Additionally, the old code's design was a bit rigid for
-adding more generic things.
-
-The reduction in duplication means going to only one place to make changes to
-the code. In addition to not repeating ourselves, it provides us more
-flexibility to add new features and extensibility to allow the reader and
-writers to be overridden by user code.
-
-Rudimentary LAS 1.3 support
-..............................................................................
-
-Support for reading and writing LAS 1.3 *point* data is not provided in
-libLAS 1.6. Support for reading point formats 4 or 5 is not yet complete,
-however.
-
-Generic interfaces
-..............................................................................
-
-A number of generic interfaces have been added to libLAS to support dynamic
-polymorphism. See <liblas/liblas.hpp> for the C++ interfaces. By implementing
-these interfaces, you can add your own reader/writer implementations as well
-as provide custom filtering and transformation capability.
-
-Schema description support
-..............................................................................
-
-Though it is specifically allowed by the standard but not widely implemented,
-it is possible to store extra data attached to each point after the requisite
-PointFormat data are stored. There is neither a regularized way to describe
-these data nor a way to capture metadata about this. To this end, I have
-proposed an XML schema document that could be stored in a VLR as well as
-schema-aware reader and writer implementations that can utilize that VLR to
-work with the data. See <https://lidarbb.cr.usgs.gov/index.php?showtopic=9075>
-for more details on the initial proposal of schema support.
-
-Alternative formats
-..............................................................................
-
-Support for reading the TerraSolid bin format as well as writing the
-Oracle Point Cloud format will be provided for libLAS 1.6, but this code will
-be moving to a new home shortly. See `libPC`_ for more details on these
-developments
-
-Generic spatial indexing
-..............................................................................
-
-A octree-based spatial index was developed 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
-can store its data within VLRs (requires a file rewrite) in addition to
-in a file alongside the .las file.
-
-Rewritten :ref:`lasinfo <lasinfo>` and :ref:`las2las <las2las>`
-..............................................................................
-
-:ref:`lasinfo <lasinfo>` and :ref:`las2las <las2las>` have been completely
-rewritten to take advantage of faster access and summary methods within the
-libLAS C++ API. In addition to nearly double the speed of the previous
-libLAS-provided lasinfo and las2las implementations, both applications
-gained a number of features including much more expressive filtering and
-more detailed header and file transformation. The old versions of :ref:`lasinfo <lasinfo_old>`
-and :ref:`las2las <las2las_old>` are still available to people who have
-embedded them in processes and applications. They are now called ``lasinfo-old`` and
-``las2las-old``.
-
-Migration to CMake
-..............................................................................
-
-
-libLAS has migrated to CMake to manage compilation. See `libLAS Compilation
-<http://liblas.org/compilation.html>`__ for specific details how to use CMake
-to build libLAS from source.
-
-Minor features
-------------------------------------------------------------------------------
-
-Caching reader
-..............................................................................
-
-A reader implementation that provides data caching will be provided at
-libLAS 1.6. If your data reading involves reading the data in multiple passes
-through the file, you can utilize the cached reader to cache the points
-(up to the size of the entire file) for faster repeated and random access.
-
-Seek support
-..............................................................................
-
-It is now possible to seek to a specific point in the file and start reading
-points. This can significantly speed up the "random sampling" access strategy
More information about the Liblas-commits
mailing list