[Liblas-commits] hg: 4 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Dec 22 17:20:41 EST 2010
changeset 13ca14ee6fe2 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=13ca14ee6fe2
summary: only do header numpoints check if we're not compressed
changeset 15d4948d6e12 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=15d4948d6e12
summary: set the high bit on point format, iff compressed mode
changeset fca5d6f1d9f5 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=fca5d6f1d9f5
summary: switch back to default compression mode; clean up throws
changeset 18c365b031b6 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=18c365b031b6
summary: pull-merge
diffstat:
apps/lasindex_test.cpp | 2 +-
include/liblas/bounds.hpp | 599 +++++++
include/liblas/classification.hpp | 244 +++
include/liblas/color.hpp | 170 ++
include/liblas/detail/index/indexoutput.hpp | 2 +-
include/liblas/detail/reader/header.hpp | 6 +-
include/liblas/detail/reader/reader.hpp | 1 -
include/liblas/detail/writer/base.hpp | 2 +-
include/liblas/detail/writer/header.hpp | 2 +-
include/liblas/detail/writer/point.hpp | 6 +-
include/liblas/dimension.hpp | 243 +++
include/liblas/error.hpp | 90 +
include/liblas/factory.hpp | 4 +-
include/liblas/filter.hpp | 396 ++++
include/liblas/header.hpp | 445 +++++
include/liblas/index.hpp | 571 +++++++
include/liblas/iterator.hpp | 6 +-
include/liblas/lasbounds.hpp | 599 -------
include/liblas/lasclassification.hpp | 244 ---
include/liblas/lascolor.hpp | 170 --
include/liblas/lasdimension.hpp | 243 ---
include/liblas/laserror.hpp | 90 -
include/liblas/lasfilter.hpp | 396 ----
include/liblas/lasheader.hpp | 445 -----
include/liblas/lasindex.hpp | 571 -------
include/liblas/laspoint.hpp | 253 ---
include/liblas/lasreader.hpp | 152 -
include/liblas/lasschema.hpp | 180 --
include/liblas/lasspatialreference.hpp | 212 --
include/liblas/lastransform.hpp | 215 --
include/liblas/lasvariablerecord.hpp | 160 --
include/liblas/lasversion.hpp | 101 -
include/liblas/laswriter.hpp | 116 -
include/liblas/liblas.hpp | 28 +-
include/liblas/point.hpp | 253 +++
include/liblas/reader.hpp | 152 +
include/liblas/schema.hpp | 179 ++
include/liblas/spatialreference.hpp | 212 ++
include/liblas/transform.hpp | 215 ++
include/liblas/utility.hpp | 4 +-
include/liblas/variablerecord.hpp | 160 ++
include/liblas/version.hpp | 56 +
include/liblas/writer.hpp | 116 +
src/CMakeLists.txt | 63 +-
src/c_api.cpp | 2129 ++++++++++++++++++++++++++
src/classification.cpp | 143 +
src/color.cpp | 99 +
src/detail/reader/cachedreader.cpp | 2 -
src/detail/reader/header.cpp | 10 +-
src/detail/reader/reader.cpp | 2 -
src/detail/reader/zipreader.cpp | 10 +-
src/detail/writer/header.cpp | 11 +-
src/detail/writer/point.cpp | 6 +-
src/detail/writer/writer.cpp | 2 -
src/detail/writer/zipwriter.cpp | 10 +-
src/dimension.cpp | 199 ++
src/error.cpp | 77 +
src/filter.cpp | 253 +++
src/header.cpp | 925 +++++++++++
src/index.cpp | 2156 +++++++++++++++++++++++++++
src/las_c_api.cpp | 2139 --------------------------
src/lasclassification.cpp | 143 -
src/lascolor.cpp | 99 -
src/lasdimension.cpp | 199 --
src/laserror.cpp | 77 -
src/lasfilter.cpp | 253 ---
src/lasheader.cpp | 925 -----------
src/lasindex.cpp | 2156 ---------------------------
src/laspoint.cpp | 953 -----------
src/lasreader.cpp | 197 --
src/lasschema.cpp | 778 ---------
src/lasspatialreference.cpp | 871 ----------
src/lastransform.cpp | 531 ------
src/lasvariablerecord.cpp | 246 ---
src/lasversion.cpp | 134 -
src/laswriter.cpp | 126 -
src/point.cpp | 953 +++++++++++
src/reader.cpp | 197 ++
src/schema.cpp | 778 +++++++++
src/spatialreference.cpp | 871 ++++++++++
src/transform.cpp | 531 ++++++
src/variablerecord.cpp | 246 +++
src/version.cpp | 134 +
src/writer.cpp | 126 +
test/unit/bounds_test.cpp | 2 +-
test/unit/classification_test.cpp | 2 +-
test/unit/common.cpp | 2 +-
test/unit/common.hpp | 2 -
test/unit/error_test.cpp | 2 +-
test/unit/header_test.cpp | 3 -
test/unit/point_test.cpp | 11 +-
test/unit/reader_iterator_test.cpp | 3 -
test/unit/reader_test.cpp | 4 +-
test/unit/transform_test.cpp | 2 +-
test/unit/variablerecord_test.cpp | 1 -
test/unit/writer_test.cpp | 6 +-
96 files changed, 14017 insertions(+), 14094 deletions(-)
diffs (truncated from 28786 to 300 lines):
diff -r f18ae657c29b -r 18c365b031b6 apps/lasindex_test.cpp
--- a/apps/lasindex_test.cpp Wed Dec 22 12:53:50 2010 -0800
+++ b/apps/lasindex_test.cpp Wed Dec 22 14:20:33 2010 -0800
@@ -17,7 +17,7 @@
#include <typeinfo>
#include <vector>
-#include <liblas/lasindex.hpp>
+#include <liblas/index.hpp>
using namespace liblas;
using namespace boost;
diff -r f18ae657c29b -r 18c365b031b6 include/liblas/bounds.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/liblas/bounds.hpp Wed Dec 22 14:20:33 2010 -0800
@@ -0,0 +1,599 @@
+/******************************************************************************
+ * $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_LASBOUNDS_HPP_INCLUDED
+#define LIBLAS_LASBOUNDS_HPP_INCLUDED
+
+#include <liblas/detail/fwd.hpp>
+#include <liblas/point.hpp>
+#include <liblas/transform.hpp>
+#include <liblas/detail/private_utility.hpp>
+#include <liblas/export.hpp>
+// boost
+#include <boost/cstdint.hpp>
+
+#include <boost/concept_check.hpp>
+// std
+#include <cmath>
+#include <limits>
+#include <string>
+#include <sstream>
+#include <vector>
+
+
+namespace liblas {
+
+template <typename T>
+class LAS_DLL Range
+{
+public:
+ T min;
+ T max;
+
+ typedef T value_type;
+
+ Range(T mmin=std::numeric_limits<T>::max(), T mmax=std::numeric_limits<T>::min())
+ : min(mmin), max(mmax) {}
+
+
+ Range(Range const& other)
+ : min(other.min)
+ , max(other.max)
+ {
+ }
+
+ Range& operator=(Range<T> const& rhs)
+ {
+ if (&rhs != this)
+ {
+ min = rhs.min;
+ max = rhs.max;
+ }
+ return *this;
+ }
+
+ bool operator==(Range<T> const& rhs) const
+ {
+ return equal(rhs);
+ }
+
+ bool operator!=(Range const& rhs) const
+ {
+ return !(equal(rhs));
+ }
+
+ bool equal(Range const& other) const
+ {
+
+ if (!(detail::compare_distance(min, other.min))
+ || !(detail::compare_distance(max, other.max)))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ bool overlaps(Range const& r) const
+ {
+ return min <= r.max && max >= r.min;
+ }
+
+ bool contains(Range const& r) const
+ {
+ return min <= r.min && r.max <= max;
+ }
+
+ bool contains(T v) const
+ {
+ return min <= v && v <= max;
+ }
+
+ bool empty(void) const
+ {
+ return detail::compare_distance(min, std::numeric_limits<T>::max()) && detail::compare_distance(max, std::numeric_limits<T>::min());
+ }
+
+ void shift(T v)
+ {
+ min += v;
+ max += v;
+ }
+
+ void scale(T v)
+ {
+ min *= v;
+ max *= v;
+ }
+
+ void clip(Range const& r)
+ {
+ if (r.min > min)
+ min = r.min;
+ if (r.max < max)
+ max = r.max;
+ }
+
+ void grow(T v)
+ {
+ if (v < min)
+ min = v;
+ if (v > max)
+ max = v;
+ }
+
+ void grow(Range const& r)
+ {
+ grow(r.min);
+ grow(r.max);
+ }
+
+ T length() const
+ {
+ return max - min;
+ }
+};
+
+template <typename T>
+class Bounds
+{
+public:
+
+ typedef T value_type;
+ typedef typename std::vector< Range<T> >::size_type size_type;
+
+ typedef typename std::vector< Range<T> > RangeVec;
+private:
+
+ RangeVec ranges;
+
+public:
+
+Bounds<T>()
+{
+ ranges.resize(0);
+}
+
+Bounds(Bounds const& other)
+ :
+ ranges(other.ranges)
+{
+}
+
+Bounds(RangeVec const& rngs)
+ :
+ ranges(rngs)
+{
+}
+
+Bounds( T minx,
+ T miny,
+ T minz,
+ T maxx,
+ T maxy,
+ T maxz)
+{
+ ranges.resize(3);
+
+ ranges[0].min = minx;
+ ranges[1].min = miny;
+ ranges[2].min = minz;
+
+ ranges[0].max = maxx;
+ ranges[1].max = maxy;
+ ranges[2].max = maxz;
+
+#ifdef DEBUG
+ verify();
+#endif
+
+}
+
+Bounds( T minx,
+ T miny,
+ T maxx,
+ T maxy)
+{
+
+ ranges.resize(2);
+
+ ranges[0].min = minx;
+ ranges[1].min = miny;
+
+ ranges[0].max = maxx;
+ ranges[1].max = maxy;
+
+#ifdef DEBUG
+ verify();
+#endif
+
+}
+
+Bounds( const Point& min, const Point& max)
+{
+ ranges.resize(3);
+
+ ranges[0].min = min.GetX();
+ ranges[1].min = min.GetY();
+ ranges[2].min = min.GetZ();
+
+ ranges[0].max = max.GetX();
+ ranges[1].max = max.GetY();
+ ranges[2].max = max.GetZ();
+
+#ifdef DEBUG
+ verify();
+#endif
+
+}
+
+
+// Bounds( Vector const& low, Vector const& high)
+// {
+// if (low.size() != high.size() ) {
+// std::ostringstream msg;
+// msg << "Bounds dimensions are not equal. Low bounds dimensions are " << low.size()
+// << " and the high bounds are " << high.size();
+// throw std::runtime_error(msg.str());
+// }
+// mins.resize(low.size());
+//
+// mins = low;
+// maxs = high;
+//
+// #ifdef DEBUG
+// verify();
+// #endif
More information about the Liblas-commits
mailing list