[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Aug 18 14:51:42 EDT 2010


changeset f03c876538ed in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f03c876538ed
summary: update to clean up some warnings on windows.

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

diffstat:

 CMakeLists.txt      |   4 ++++
 apps/chipper.hpp    |   2 +-
 apps/las2las2.cpp   |   6 +++---
 apps/laskernel.cpp  |  20 ++++++++++----------
 doc/compilation.txt |  11 +++++++++--
 5 files changed, 27 insertions(+), 16 deletions(-)

diffs (156 lines):

diff -r 6e298e1592d8 -r 9c65794516cf CMakeLists.txt
--- a/CMakeLists.txt	Wed Aug 18 10:46:10 2010 -0500
+++ b/CMakeLists.txt	Wed Aug 18 12:51:09 2010 -0600
@@ -126,6 +126,10 @@
   include_directories(${Boost_INCLUDE_DIRS})
 endif()
 
+# make these available for the user to set.
+mark_as_advanced(CLEAR Boost_INCLUDE_DIR) 
+mark_as_advanced(CLEAR Boost_LIBRARY_DIRS) 
+
 # libxml2 support - optional, default=ON
 set(WITH_LIBXML2 FALSE CACHE BOOL "Choose if libxml2 support should be built ")
 
diff -r 6e298e1592d8 -r 9c65794516cf apps/chipper.hpp
--- a/apps/chipper.hpp	Wed Aug 18 10:46:10 2010 -0500
+++ b/apps/chipper.hpp	Wed Aug 18 12:51:09 2010 -0600
@@ -46,7 +46,7 @@
         { return m_vec.begin(); }
     std::vector<PtRef>::iterator end()
         { return m_vec.end(); }
-    PtRef& operator[](uint32_t pos)
+    PtRef& operator[](boost::uint32_t pos)
         { return m_vec[pos]; }
     std::string Dir()
     {
diff -r 6e298e1592d8 -r 9c65794516cf apps/las2las2.cpp
--- a/apps/las2las2.cpp	Wed Aug 18 10:46:10 2010 -0500
+++ b/apps/las2las2.cpp	Wed Aug 18 12:51:09 2010 -0600
@@ -99,7 +99,7 @@
                 liblas::Header const& header,
                 std::vector<liblas::FilterI*>& filters,
                 std::vector<liblas::TransformI*>& transforms,
-                uint32_t split_size,
+                boost::uint32_t split_size,
                 bool verbose)
 {
 
@@ -195,7 +195,7 @@
 int main(int argc, char* argv[])
 {
 
-    uint32_t split_size;
+    boost::uint32_t split_size;
     std::string input;
     std::string output;
     
@@ -217,7 +217,7 @@
 
         file_options.add_options()
             ("help,h", "produce help message")
-            ("split,s", po::value<uint32_t>(&split_size)->default_value(0), "Split file into multiple files with each being this size in MB or less. If this value is 0, no splitting is done")
+            ("split,s", po::value<boost::uint32_t>(&split_size)->default_value(0), "Split file into multiple files with each being this size in MB or less. If this value is 0, no splitting is done")
             ("input,i", po::value< string >(), "input LAS file")
             ("output,o", po::value< string >(&output)->default_value("output.las"), "output LAS file")
             ("verbose,v", po::value<bool>(&verbose)->zero_tokens(), "Verbose message output")
diff -r 6e298e1592d8 -r 9c65794516cf apps/laskernel.cpp
--- a/apps/laskernel.cpp	Wed Aug 18 10:46:10 2010 -0500
+++ b/apps/laskernel.cpp	Wed Aug 18 12:51:09 2010 -0600
@@ -16,7 +16,7 @@
 {
     boost::char_separator<char> sep(SEPARATORS);
 
-    std::vector<uint16_t> returns;
+    std::vector<boost::uint16_t> returns;
     tokenizer tokens(return_string, sep);
     for (tokenizer::iterator t = tokens.begin(); t != tokens.end(); ++t) {
         returns.push_back(atoi((*t).c_str()));
@@ -32,7 +32,7 @@
 {
     boost::char_separator<char> sep(SEPARATORS);
 
-    std::vector<uint8_t> classes;
+    std::vector<boost::uint8_t> classes;
     tokenizer tokens(class_string, sep);
     for (tokenizer::iterator t = tokens.begin(); t != tokens.end(); ++t) {
         classes.push_back(atoi((*t).c_str()));
@@ -79,8 +79,8 @@
 
 liblas::FilterI*  MakeIntensityFilter(std::string intensities, liblas::FilterI::FilterType ftype) 
 {
-    liblas::ContinuousValueFilter<uint16_t>::filter_func f = &liblas::Point::GetIntensity;
-    liblas::ContinuousValueFilter<uint16_t>* intensity_filter = new liblas::ContinuousValueFilter<uint16_t>(f, intensities);
+    liblas::ContinuousValueFilter<boost::uint16_t>::filter_func f = &liblas::Point::GetIntensity;
+    liblas::ContinuousValueFilter<boost::uint16_t>* intensity_filter = new liblas::ContinuousValueFilter<boost::uint16_t>(f, intensities);
     intensity_filter->SetType(ftype);
     return intensity_filter;
 }
@@ -95,8 +95,8 @@
 
 liblas::FilterI*  MakeScanAngleFilter(std::string intensities, liblas::FilterI::FilterType ftype) 
 {
-    liblas::ContinuousValueFilter<int8_t>::filter_func f = &liblas::Point::GetScanAngleRank;
-    liblas::ContinuousValueFilter<int8_t>* intensity_filter = new liblas::ContinuousValueFilter<int8_t>(f, intensities);
+    liblas::ContinuousValueFilter<boost::int8_t>::filter_func f = &liblas::Point::GetScanAngleRank;
+    liblas::ContinuousValueFilter<boost::int8_t>* intensity_filter = new liblas::ContinuousValueFilter<boost::int8_t>(f, intensities);
     intensity_filter->SetType(ftype);
     return intensity_filter;
 }
@@ -115,7 +115,7 @@
 
 filtering_options.add_options()
     ("extent,e", po::value< string >(), "Extent window that points must fall within to keep.\nUse a comma-separated list, for example, \n  -e minx, miny, maxx, maxy\n  or \n  -e minx, miny, minz, maxx, maxy, maxz")
-    ("thin,t", po::value<uint32_t>()->default_value(0), "Simple decimation-style thinning.\nThin the file by removing every t'th point from the file.")
+    ("thin,t", po::value<boost::uint32_t>()->default_value(0), "Simple decimation-style thinning.\nThin the file by removing every t'th point from the file.")
     ("last_return_only", po::value<bool>()->zero_tokens(), "Keep last returns (cannot be used with --first_return_only)")
     ("first_return_only", po::value<bool>()->zero_tokens(), "Keep first returns (cannot be used with --last_return_only")
     ("keep-returns", po::value< string >(), "A comma-separated list of return numbers to keep in the output file: \n--keep-returns 1,2,3")
@@ -333,7 +333,7 @@
             std::vector<liblas::Color::value_type> rgb;
             for(tokenizer::iterator c = rgbs.begin(); c != rgbs.end(); ++c)
             {
-                rgb.push_back(atof((*c).c_str()));
+                rgb.push_back(atoi((*c).c_str()));
             }
             liblas::Color color(rgb[0], rgb[1], rgb[2]);
             colors.push_back(color);
@@ -359,7 +359,7 @@
             std::vector<liblas::Color::value_type> rgb;
             for(tokenizer::iterator c = rgbs.begin(); c != rgbs.end(); ++c)
             {
-                rgb.push_back(atof((*c).c_str()));
+                rgb.push_back(atoi((*c).c_str()));
             }
             liblas::Color color(rgb[0], rgb[1], rgb[2]);
             colors.push_back(color);
@@ -543,7 +543,7 @@
             oss << "Format version must dotted -- ie, '1.0' or '1.2', not " << format_string;
             throw std::runtime_error(oss.str());
         }
-        header.SetVersionMinor(static_cast<uint8_t>(minor)); 
+        header.SetVersionMinor(static_cast<boost::uint8_t>(minor)); 
     }
     if (vm.count("pad-header")) 
     {
diff -r 6e298e1592d8 -r 9c65794516cf doc/compilation.txt
--- a/doc/compilation.txt	Wed Aug 18 10:46:10 2010 -0500
+++ b/doc/compilation.txt	Wed Aug 18 12:51:09 2010 -0600
@@ -59,8 +59,15 @@
 `Boost`_
 ------------------------------------------------------------------------------
 
-`Boost`_ is required to build libLAS 1.6.  Set ``BOOST_INCLUDEDIR`` if 
-cmake cannot find it in a default location.
+`Boost`_ is required to build libLAS 1.6.  Set ``Boost_INCLUDE_DIR`` if 
+CMake cannot find it in a default location.  Additionally, set ``Boost_LIBRARY_DIRS`` 
+if it cannot find your libraries.
+
+.. note::
+
+    If you are building on Windows, http://www.boostpro.com/download/ has 
+    an excellent installer.  Make sure to select the program_options 
+    library to install when prompted.
 
 
 .. _optional_libraries:


More information about the Liblas-commits mailing list