[Liblas-commits] hg-main-tree: add point count type get/set
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Mar 17 14:24:42 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/72d38ba3c5d1
changeset: 343:72d38ba3c5d1
user: Michael P. Gerlek <mpg at flaxen.com>
date: Thu Mar 17 14:24:23 2011 -0400
description:
add point count type get/set
Subject: hg-main-tree: merge
details: http://hg.libpc.orghg-main-tree/rev/39fb91c27f98
changeset: 344:39fb91c27f98
user: Michael P. Gerlek <mpg at flaxen.com>
date: Thu Mar 17 14:24:36 2011 -0400
description:
merge
diffstat:
include/libpc/Header.hpp | 6 +++-
include/libpc/drivers/oci/Reader.hpp | 4 +-
include/libpc/libpc.hpp | 6 +++
include/libpc/types.hpp | 55 ++++++++++++++++++++++++++++++++++++
src/CMakeLists.txt | 1 +
src/Header.cpp | 18 ++++++++++-
src/drivers/oci/Reader.cpp | 2 +-
7 files changed, 86 insertions(+), 6 deletions(-)
diffs (191 lines):
diff -r d33542c7db42 -r 39fb91c27f98 include/libpc/Header.hpp
--- a/include/libpc/Header.hpp Thu Mar 17 14:04:19 2011 -0400
+++ b/include/libpc/Header.hpp Thu Mar 17 14:24:36 2011 -0400
@@ -38,7 +38,7 @@
#include <iostream>
#include <boost/cstdint.hpp>
-#include <libpc/export.hpp>
+#include <libpc/libpc.hpp>
#include <libpc/Schema.hpp>
#include <libpc/Bounds.hpp>
#include <libpc/SpatialReference.hpp>
@@ -61,6 +61,9 @@
boost::uint64_t getNumPoints() const;
void setNumPoints(boost::uint64_t);
+ PointCountType getPointCountType() const;
+ void setPointCountType(PointCountType);
+
const Bounds<double>& getBounds() const;
void setBounds(const Bounds<double>&);
@@ -75,6 +78,7 @@
private:
Schema m_schema;
boost::uint64_t m_numPoints;
+ PointCountType m_pointCountType;
Bounds<double> m_bounds;
SpatialReference m_spatialReference;
Metadata::Array m_metadataArray;
diff -r d33542c7db42 -r 39fb91c27f98 include/libpc/drivers/oci/Reader.hpp
--- a/include/libpc/drivers/oci/Reader.hpp Thu Mar 17 14:04:19 2011 -0400
+++ b/include/libpc/drivers/oci/Reader.hpp Thu Mar 17 14:24:36 2011 -0400
@@ -35,7 +35,7 @@
#ifndef INCLUDED_LIBPC_DRIVER_OCI_READER_HPP
#define INCLUDED_LIBPC_DRIVER_OCI_READER_HPP
-#include <libpc/Reader.hpp>
+#include <libpc/Stage.hpp>
#include "common.hpp"
@@ -49,7 +49,7 @@
-class LIBPC_DLL Reader : public libpc::Reader
+class LIBPC_DLL Reader : public libpc::Stage
{
public:
diff -r d33542c7db42 -r 39fb91c27f98 include/libpc/libpc.hpp
--- a/include/libpc/libpc.hpp Thu Mar 17 14:04:19 2011 -0400
+++ b/include/libpc/libpc.hpp Thu Mar 17 14:24:36 2011 -0400
@@ -32,6 +32,12 @@
* OF SUCH DAMAGE.
****************************************************************************/
+#ifndef INCLUDED_LIBPC_HPP
+#define INCLUDED_LIBPC_HPP
+
#include <libpc/export.hpp>
#include <libpc/libpc_defines.h>
#include <libpc/libpc_config.hpp>
+#include <libpc/types.hpp>
+
+#endif
diff -r d33542c7db42 -r 39fb91c27f98 include/libpc/types.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/libpc/types.hpp Thu Mar 17 14:24:36 2011 -0400
@@ -0,0 +1,55 @@
+/******************************************************************************
+* Copyright (c) 2011, Michael P. Gerlek (mpg at flaxen.com)
+*
+* 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 Hobu, Inc. or Flaxen Geo Consulting 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 INCLUDED_TYPES_HPP
+#define INCLUDED_TYPES_HPP
+
+#include <libpc/export.hpp>
+#include <libpc/libpc_defines.h>
+#include <libpc/libpc_config.hpp>
+
+namespace libpc {
+
+
+enum PointCountType
+{
+ PointCount_Fixed, // getNumPoints will return a good, nonzero value
+ PointCount_Infinite, // getNumPoints will return 0; the stage has an unknown, and likely infinite, count
+ PointCount_Unknown // getNumPoints will return 0; the stage has an unknown, but constant, count
+};
+
+
+} // namespace
+
+#endif
diff -r d33542c7db42 -r 39fb91c27f98 src/CMakeLists.txt
--- a/src/CMakeLists.txt Thu Mar 17 14:04:19 2011 -0400
+++ b/src/CMakeLists.txt Thu Mar 17 14:24:36 2011 -0400
@@ -36,6 +36,7 @@
${LIBPC_HEADERS_DIR}/export.hpp
${LIBPC_HEADERS_DIR}/libpc.hpp
${LIBPC_HEADERS_DIR}/libpc_config.hpp
+ ${LIBPC_HEADERS_DIR}/types.hpp
${LIBPC_HEADERS_DIR}/Bounds.hpp
${LIBPC_HEADERS_DIR}/Color.hpp
${LIBPC_HEADERS_DIR}/Dimension.hpp
diff -r d33542c7db42 -r 39fb91c27f98 src/Header.cpp
--- a/src/Header.cpp Thu Mar 17 14:04:19 2011 -0400
+++ b/src/Header.cpp Thu Mar 17 14:24:36 2011 -0400
@@ -42,8 +42,9 @@
{
-Header::Header() :
- m_numPoints(0)
+Header::Header()
+ : m_numPoints(0)
+ , m_pointCountType(PointCount_Fixed)
{
return;
}
@@ -52,6 +53,7 @@
Header::Header(const Header& other)
{
this->m_numPoints = other.m_numPoints;
+ this->m_pointCountType = other.m_pointCountType;
this->m_schema = other.m_schema;
this->m_bounds = other.m_bounds;
this->m_spatialReference = other.m_spatialReference;
@@ -107,6 +109,18 @@
}
+PointCountType Header::getPointCountType() const
+{
+ return m_pointCountType;
+}
+
+
+void Header::setPointCountType(PointCountType pointCountType)
+{
+ m_pointCountType = pointCountType;
+}
+
+
const SpatialReference& Header::getSpatialReference() const
{
return m_spatialReference;
diff -r d33542c7db42 -r 39fb91c27f98 src/drivers/oci/Reader.cpp
--- a/src/drivers/oci/Reader.cpp Thu Mar 17 14:04:19 2011 -0400
+++ b/src/drivers/oci/Reader.cpp Thu Mar 17 14:24:36 2011 -0400
@@ -54,7 +54,7 @@
Reader::Reader(Options& options)
- : libpc::Reader()
+ : libpc::Stage()
, m_options(options)
{
More information about the Liblas-commits
mailing list