[Liblas-commits] hg: 10 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Dec 14 11:21:41 EST 2010
changeset f7651149ee11 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f7651149ee11
summary: try to avoid including geotiff/gdal include files from public liblas include files
changeset 3505a0cdc72c in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=3505a0cdc72c
summary: small fix for LASSRS_SetGTIF return type
changeset ce32a527954f in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=ce32a527954f
summary: preliminary pass on rfc2
changeset aeb3e5714db7 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=aeb3e5714db7
summary: preliminary implementation of RFC 2
changeset 9b91c2f30e9b in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=9b91c2f30e9b
summary: upstream merge
changeset 723b5d005a6d in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=723b5d005a6d
summary: proposed update to show how to run tests more directly
changeset 9ef8cffc9fb0 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=9ef8cffc9fb0
summary: updated to reflect WKT VLR and changes in WKT due to not going through geotiff
changeset 198697ed10ec in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=198697ed10ec
summary: update with various details
changeset 868e8b544b25 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=868e8b544b25
summary: final pass on srs overhaul - rfc2
changeset 71d43b1f074b in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=71d43b1f074b
summary: merge
diffstat:
CMakeLists.txt | 38 +-
apps/CMakeLists.txt | 40 +-
apps/las2las.cpp | 3 +-
apps/las2txt.cpp | 623 +++++++++++++++++++++++++
apps/laskernel.cpp | 31 +-
apps/laskernel.hpp | 3 +-
apps/oci_util.cpp | 48 +-
apps/oci_util.hpp | 2 +-
cmake/modules/BuildOSGeo4W.cmake | 1 +
doc/compilation.txt | 15 +-
doc/development/buildbot.txt | 55 ++-
doc/development/rfc/index.txt | 1 +
doc/development/rfc/rfc_2_spatialreference.txt | 174 ++++++
doc/tutorial/cpp.txt | 30 +-
hobu-config.bat | 7 +-
include/liblas/capi/las_version.h | 6 +-
include/liblas/capi/liblas.h | 13 +-
include/liblas/detail/fwd.hpp | 1 +
include/liblas/detail/reader/cachedreader.hpp | 22 +-
include/liblas/detail/reader/header.hpp | 1 -
include/liblas/detail/reader/point.hpp | 3 +-
include/liblas/detail/reader/reader.hpp | 29 +-
include/liblas/detail/writer/base.hpp | 10 +-
include/liblas/detail/writer/writer.hpp | 2 -
include/liblas/lasreader.hpp | 50 +-
include/liblas/lasspatialreference.hpp | 65 +-
include/liblas/lastransform.hpp | 1 +
include/liblas/lasversion.hpp | 58 +--
include/liblas/laswriter.hpp | 15 +-
include/liblas/liblas.hpp | 20 +-
include/liblas/utility.hpp | 2 +-
python/setup.py | 4 +-
schemas/LAS.xsd | 2 +-
schemas/las.xml | 247 +---------
src/CMakeLists.txt | 3 +-
src/detail/reader/cachedreader.cpp | 116 +++-
src/detail/reader/header.cpp | 2 +-
src/detail/reader/point.cpp | 18 +-
src/detail/reader/reader.cpp | 156 ++++-
src/detail/writer/base.cpp | 4 +-
src/detail/writer/header.cpp | 121 ++--
src/detail/writer/point.cpp | 22 +-
src/detail/writer/writer.cpp | 6 -
src/las_c_api.cpp | 87 ++-
src/lasfilter.cpp | 19 +-
src/lasindex.cpp | 38 +-
src/lasreader.cpp | 274 +---------
src/lasspatialreference.cpp | 174 ++++++-
src/lasversion.cpp | 113 ++++
src/laswriter.cpp | 70 +--
test/unit/lasheader_test.cpp | 2 +
test/unit/lasreader_test.cpp | 27 +-
test/unit/lasspatialreference_test.cpp | 149 +++++-
test/unit/laswriter_test.cpp | 36 +-
54 files changed, 1968 insertions(+), 1091 deletions(-)
diffs (truncated from 4722 to 300 lines):
diff -r 4bf2a228da87 -r 71d43b1f074b CMakeLists.txt
--- a/CMakeLists.txt Fri Nov 19 12:46:35 2010 -0800
+++ b/CMakeLists.txt Tue Dec 14 11:17:23 2010 -0500
@@ -150,8 +150,17 @@
# Boost C++ Libraries support - required
message(STATUS "Searching for Boost 1.38+ - done")
-set(Boost_USE_STATIC_LIBS ON)
-set(Boost_USE_MULTITHREADED ON)
+# Default to using static, multithreaded libraries for
+# linking under MSVC. This is because we show users how to
+# use boostpro.com installer and install those options when linking
+# on windows in the compilation documentation.
+if(WIN32)
+ if (MSVC)
+ set(Boost_USE_STATIC_LIBS ON)
+ set(Boost_USE_MULTITHREADED ON)
+ endif(MSVC)
+endif(WIN32)
+
# NOTE: Add iostreams to COMPONENTS list to enable bigfile_boost_iostreams_test
find_package(Boost 1.38 COMPONENTS program_options REQUIRED)
@@ -164,6 +173,23 @@
mark_as_advanced(CLEAR Boost_LIBRARY_DIRS)
link_directories(${Boost_LIBRARY_DIRS})
+
+
+# libxml2 support - optional, default=ON
+set(WITH_LIBXML2 FALSE CACHE BOOL "Choose if libxml2 support should be built ")
+
+if(WITH_LIBXML2)
+ find_package(LibXml2)
+ mark_as_advanced(CLEAR LIBXML2_INCLUDE_DIR)
+ mark_as_advanced(CLEAR LIBXML2_LIBRARIES)
+ if(LIBXML2_FOUND)
+ include_directories(${LIBXML2_INCLUDE_DIR})
+ add_definitions(-DHAVE_LIBXML2=1)
+ endif()
+endif()
+
+
+
# GeoTIFF support - optional, default=OFF
set(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
@@ -332,7 +358,7 @@
# Version information
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "6")
-SET(CPACK_PACKAGE_VERSION_PATCH "0b2")
+SET(CPACK_PACKAGE_VERSION_PATCH "0b3")
SET(OSGEO4W_UPSTREAM_RELEASE "1")
SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP;TBZ2")
@@ -364,6 +390,6 @@
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
-#if (WIN32)
-# include(BuildOSGeo4W)
-#endif(WIN32)
+if (WIN32)
+ include(BuildOSGeo4W)
+endif(WIN32)
diff -r 4bf2a228da87 -r 71d43b1f074b apps/CMakeLists.txt
--- a/apps/CMakeLists.txt Fri Nov 19 12:46:35 2010 -0800
+++ b/apps/CMakeLists.txt Tue Dec 14 11:17:23 2010 -0500
@@ -19,6 +19,7 @@
set(LASMERGE lasmerge)
set(LAS2LAS las2las)
set(LAS2LAS_OLD las2las-old)
+set(LAS2TXT_OLD las2txt-old)
set(LAS2TXT las2txt)
set(TXT2LAS txt2las)
set(TS2LAS ts2las)
@@ -47,8 +48,8 @@
endif()
set(LIBLAS_UTILITIES
- ${LASINFO_OLD} ${LASINFO} ${LASMERGE} ${LAS2LAS} ${LAS2TXT} ${TXT2LAS}
- ${LAS2OGR} ${LAS2OCI} ${LAS2LAS} ${LAS2LAS_OLD} ${LASBLOCK} ${TS2LAS})
+ ${LASINFO_OLD} ${LASINFO} ${LASMERGE} ${LAS2LAS} ${LAS2TXT_OLD} ${TXT2LAS}
+ ${LAS2OGR} ${LAS2OCI} ${LAS2LAS} ${LAS2LAS_OLD} ${LASBLOCK} ${TS2LAS} ${LAS2TXT} )
# TODO: Experimental and requires testing --mloskot
# Generate user-specific settings for Visual Studio project
@@ -82,15 +83,8 @@
link_directories(${Boost_LIBRARY_DIRS})
-set (LASKERNEL_SOURCES laskernel.cpp)
-add_library(${LASKERNEL_LIB_NAME} SHARED ${LASKERNEL_SOURCES})
-target_link_libraries(${LASKERNEL_LIB_NAME}
- ${LIBLAS_LIB_NAME})
-
-install(TARGETS ${LASKERNEL_LIB_NAME}
- RUNTIME DESTINATION ${LIBLAS_BIN_DIR}
- LIBRARY DESTINATION ${LIBLAS_LIB_DIR}
- ARCHIVE DESTINATION ${LIBLAS_LIB_DIR})
+# add_executable(lasschematest lasschematest.cpp laskernel.cpp)
+# target_link_libraries(lasschematest ${APPS_CPP_DEPENDENCIES} ${LIBXML2_LIBRARIES})
# Build lasinfo
if(LASINFO_OLD)
@@ -106,21 +100,27 @@
target_link_libraries(${LAS2LAS_OLD} ${LIBLAS_C_LIB_NAME})
endif()
+
if(LAS2LAS)
- add_executable(${LAS2LAS} las2las.cpp )
- target_link_libraries(${LAS2LAS} ${APPS_CPP_DEPENDENCIES} ${LASKERNEL_LIB_NAME})
+ add_executable(${LAS2LAS} las2las.cpp laskernel.cpp)
+ target_link_libraries(${LAS2LAS} ${APPS_CPP_DEPENDENCIES} )
endif()
if(LASINFO)
- add_executable(${LASINFO} lasinfo.cpp )
- target_link_libraries(${LASINFO} ${APPS_CPP_DEPENDENCIES} ${LASKERNEL_LIB_NAME} )
+ add_executable(${LASINFO} lasinfo.cpp laskernel.cpp )
+ target_link_libraries(${LASINFO} ${APPS_CPP_DEPENDENCIES} )
endif()
# Build las2txt
+if(LAS2TXT_OLD)
+ set(LAS2TXT_OLD_SRC lascommon.c ${LAS2TXT}.c)
+ add_executable(${LAS2TXT_OLD} ${LAS2TXT_OLD_SRC})
+ target_link_libraries(${LAS2TXT_OLD} ${LIBLAS_C_LIB_NAME})
+endif()
+
if(LAS2TXT)
- set(LAS2TXT_SRC lascommon.c ${LAS2TXT}.c)
- add_executable(${LAS2TXT} ${LAS2TXT_SRC})
- target_link_libraries(${LAS2TXT} ${LIBLAS_C_LIB_NAME})
+ add_executable( ${LAS2TXT} las2txt.cpp laskernel.cpp )
+ target_link_libraries(${LAS2TXT} ${APPS_CPP_DEPENDENCIES} )
endif()
# Build txt2las
@@ -157,8 +157,8 @@
# Build las2oci
if(LAS2OCI)
- add_executable(${LAS2OCI} las2oci.cpp oci_wrapper.cpp kdx_util.cpp oci_util.cpp )
- target_link_libraries(${LAS2OCI} ${APPS_CPP_DEPENDENCIES} ${ORACLE_LIBRARY} ${LASKERNEL_LIB_NAME})
+ add_executable(${LAS2OCI} las2oci.cpp oci_wrapper.cpp kdx_util.cpp oci_util.cpp laskernel.cpp )
+ target_link_libraries(${LAS2OCI} ${APPS_CPP_DEPENDENCIES} ${ORACLE_LIBRARY} )
endif()
if(BIGFILE_TEST)
diff -r 4bf2a228da87 -r 71d43b1f074b apps/las2las.cpp
--- a/apps/las2las.cpp Fri Nov 19 12:46:35 2010 -0800
+++ b/apps/las2las.cpp Tue Dec 14 11:17:23 2010 -0500
@@ -68,7 +68,8 @@
if (min_offset)
{
- liblas::property_tree::ptree tree = reader.Summarize();
+ liblas::property_tree::ptree tree = SummarizeReader(reader);
+
try
{
header.SetOffset(tree.get<double>("summary.points.minimum.x"),
diff -r 4bf2a228da87 -r 71d43b1f074b apps/las2txt.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/las2txt.cpp Tue Dec 14 11:17:23 2010 -0500
@@ -0,0 +1,623 @@
+/***************************************************************************
+ *
+ * Project: libLAS -- C/C++ read/write library for LAS LIDAR data
+ * Purpose: LAS translation to ASCII text with optional configuration
+ * Author: Martin Isenburg isenburg at cs.unc.edu
+ * Author: Howard Butler, hobu.inc at gmail.com
+ ***************************************************************************
+ * Copyright (c) 2010, Howard Butler, hobu.inc at gmail.com
+ *
+ * See LICENSE.txt in this source distribution for more information.
+ **************************************************************************/
+
+#include <liblas/liblas.hpp>
+#include "laskernel.hpp"
+#include <liblas/utility.hpp>
+
+#include <boost/cstdint.hpp>
+#include <boost/foreach.hpp>
+#include <boost/array.hpp>
+#include <boost/lexical_cast.hpp>
+
+#include <string>
+
+using namespace liblas;
+using namespace std;
+
+#ifdef _WIN32
+#define compare_no_case(a,b,n) _strnicmp( (a), (b), (n) )
+#else
+#define compare_no_case(a,b,n) strncasecmp( (a), (b), (n) )
+#endif
+
+
+std::string GetLabels(std::string const& parse_string,
+ std::string const& delimiter)
+{
+ std::ostringstream output;
+
+ boost::uint32_t i = 0;
+ for (;;)
+ {
+
+ switch (parse_string[i])
+ {
+ /* // the x coordinate */
+ case 'x':
+ output << "\"X\"";
+ break;
+ /* // the y coordinate */
+ case 'y':
+ output << "\"Y\"";
+ break;
+ /* // the z coordinate */
+ case 'z':
+ output << "\"Z\"";
+ break;
+ /* // the raw x coordinate */
+ case 'X':
+ output << "\"Raw X\"";
+ break;
+ /* // the raw y coordinate */
+ case 'Y':
+ output << "\"Raw Y\"";
+ break;
+ /* // the raw z coordinate */
+ case 'Z':
+ output << "\"Raw Z\"";
+ break;
+ /* // the gps-time */
+ case 't':
+ output << "\"Time\"";
+ break;
+ /* // the intensity */
+ case 'i':
+ output << "\"Intensity\"";
+ break;
+ /* the scan angle */
+ case 'a':
+ output << "\"Scan Angle\"";
+ break;
+ /* the number of the return */
+ case 'r':
+ output << "\"Return Number\"";
+ break;
+ /* the classification */
+ case 'c':
+ output << "\"Classification\"";
+ break;
+ /* the classification name */
+ case 'C':
+ output << "\"Classification Name\"";
+ break;
+ /* the user data */
+ case 'u':
+ output << "\"User Data\"";
+ break;
+ /* the number of returns of given pulse */
+ case 'n':
+ output << "\"Number of Returns\"";
+ break;
+ /* the red channel color */
+ case 'R':
+ output << "\"Red\"";
+ break;
+ /* the green channel color */
+ case 'G':
+ output << "\"Green\"";
+ break;
+ /* the blue channel color */
+ case 'B':
+ output << "\"Blue\"";
+ break;
+ case 'M':
+ output << "\"ID\"";
+ break;
+ case 'p':
+ output << "\"Point Source ID\"";
+ break;
+ /* the edge of flight line flag */
+ case 'e':
+ output << "\"Flight Line Edge\"";
+ break;
+ /* the direction of scan flag */
+ case 'd':
+ output << "\"Scan Direction\"";
+ break;
+ }
+
+ i++;
+
+ if (parse_string[i])
More information about the Liblas-commits
mailing list