[Liblas-commits] hg: 3 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Jun 16 13:41:23 EDT 2010
changeset 52d3c9a996d9 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=52d3c9a996d9
summary: whitespace normalization
changeset a2fb7f93f144 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=a2fb7f93f144
summary: use a proper enum for FilterType for FilterI
changeset 30d9cff944fb in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=30d9cff944fb
summary: pdf options
diffstat:
apps/las2las2.cpp | 2 +-
cmake/modules/BuildOSGeo4W.cmake | 51 +++++++++++++++++----------------------
doc/conf.py | 5 ++-
include/liblas/lasfilter.hpp | 18 +++++++++++--
include/liblas/liblas.hpp | 21 +++++++++++++++-
src/lasfilter.cpp | 10 +++----
6 files changed, 65 insertions(+), 42 deletions(-)
diffs (247 lines):
diff -r 0dbb4a3bcd09 -r 30d9cff944fb apps/las2las2.cpp
--- a/apps/las2las2.cpp Tue Jun 15 19:52:34 2010 -0600
+++ b/apps/las2las2.cpp Wed Jun 16 12:41:00 2010 -0500
@@ -181,7 +181,7 @@
liblas::ClassificationFilter* class_filter = new ClassificationFilter(classes);
- class_filter->SetKeep(true);
+ class_filter->SetType(liblas::FilterI::eInclusion);
filters.push_back(class_filter);
liblas::BoundsFilter* bounds_filter = 0;
diff -r 0dbb4a3bcd09 -r 30d9cff944fb cmake/modules/BuildOSGeo4W.cmake
--- a/cmake/modules/BuildOSGeo4W.cmake Tue Jun 15 19:52:34 2010 -0600
+++ b/cmake/modules/BuildOSGeo4W.cmake Wed Jun 16 12:41:00 2010 -0500
@@ -39,28 +39,24 @@
macro (make_directories)
add_custom_command(
- TARGET make_osgeo4w_directories
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${libLAS_SOURCE_DIR}/osgeo4w DEPENDS osgeo4w
- )
- foreach(directory ${OSGEO4W_DIRECTORIES})
+ TARGET make_osgeo4w_directories
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${libLAS_SOURCE_DIR}/osgeo4w DEPENDS osgeo4w
+ )
+ foreach(directory ${OSGEO4W_DIRECTORIES})
STRING(REGEX REPLACE "/" "_" target "${directory}" )
add_custom_command(
- TARGET make_osgeo4w_directories
- COMMAND ${CMAKE_COMMAND} -E make_directory ${directory}
- )
+ TARGET make_osgeo4w_directories
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${directory}
+ )
- endforeach()
+ endforeach()
endmacro(make_directories)
-# add_custom_target(CopyOSGeo4WFiles
-# COMMAND ${CMAKE_COMMAND} -E echo "Copying OSGeo4W files...")
-
-
add_custom_target(copy ALL COMMENT "Copying OSGeo4W files")
add_dependencies( copy make_osgeo4w_directories )
@@ -71,17 +67,14 @@
file(GLOB_RECURSE COPY_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${GLOBPAT})
-# MESSAGE(STATUS " files to copy ${COPY_FILES} ${DESTINATION}")
- foreach(FILENAME ${COPY_FILES})
- set(SRC "${FILENAME}")
+ foreach(FILENAME ${COPY_FILES})
+ set(SRC "${FILENAME}")
set(DST "${DESTINATION}")
-
-
- add_custom_command(
- TARGET copy
- COMMAND ${CMAKE_COMMAND} -E copy ${SRC} ${DST}
- )
- endforeach(FILENAME)
+ add_custom_command(
+ TARGET copy
+ COMMAND ${CMAKE_COMMAND} -E copy ${SRC} ${DST}
+ )
+ endforeach(FILENAME)
endmacro(copy_files)
@@ -93,9 +86,9 @@
MESSAGE(STATUS " Tarring ${source} to ${destination}")
add_custom_command(
- TARGET tar
- COMMAND ${CMAKE_COMMAND} -E chdir ${source} cmake -E tar czf ${destination} ${base_path}/
- )
+ TARGET tar
+ COMMAND ${CMAKE_COMMAND} -E chdir ${source} cmake -E tar czf ${destination} ${base_path}/
+ )
endmacro(tar_directories)
@@ -116,11 +109,11 @@
add_custom_target(osgeo4w
- COMMAND ${CMAKE_COMMAND} -E echo "Making OSGeo4W build")
+ COMMAND ${CMAKE_COMMAND} -E echo "Making OSGeo4W build")
add_custom_command(
- TARGET osgeo4w
- COMMAND ${CMAKE_COMMAND} -E echo "Making OSGeo4W build"
- )
+ TARGET osgeo4w
+ COMMAND ${CMAKE_COMMAND} -E echo "Making OSGeo4W build"
+ )
add_dependencies( osgeo4w tar )
add_dependencies( las2las2 osgeo4w )
diff -r 0dbb4a3bcd09 -r 30d9cff944fb doc/conf.py
--- a/doc/conf.py Tue Jun 15 19:52:34 2010 -0600
+++ b/doc/conf.py Wed Jun 16 12:41:00 2010 -0500
@@ -179,13 +179,14 @@
pdf_documents = [
- ('index', u'libLAS', u'libLAS Documentation', u'The libLAS Team'),
+ ('docs', u'libLAS', u'libLAS Documentation', u'The libLAS Team'),
]
# A comma-separated list of custom stylesheets. Example:
pdf_stylesheets = ['liblas']
pdf_language = "en_US"
pdf_fit_mode = "overflow"
-pdf_appendices = ''
+pdf_use_toc = True
+
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
diff -r 0dbb4a3bcd09 -r 30d9cff944fb include/liblas/lasfilter.hpp
--- a/include/liblas/lasfilter.hpp Tue Jun 15 19:52:34 2010 -0600
+++ b/include/liblas/lasfilter.hpp Wed Jun 16 12:41:00 2010 -0500
@@ -53,6 +53,19 @@
namespace liblas
{
+// class FilterI:
+// {
+// public:
+//
+// void SetType(FilterType t) {m_type = t;}
+// FilterType GetType() const {return m_type;}
+// private:
+//
+// FilterI(FilterI const& other);
+// FilterI& operator=(FilterI const& rhs);
+//
+// FilterType m_type;
+// };
class BoundsFilter: public FilterI
{
@@ -61,7 +74,7 @@
BoundsFilter(double minx, double miny, double maxx, double maxy);
BoundsFilter(double minx, double miny, double maxx, double maxy, double minz, double maxz);
bool filter(const Point& point);
- void SetKeep(bool bKeep) {detail::ignore_unused_variable_warning(bKeep); return;}
+ // void SetKeep(bool bKeep) {detail::ignore_unused_variable_warning(bKeep); return;}
private:
double mins[3];
double maxs[3];
@@ -80,11 +93,10 @@
ClassificationFilter(std::vector<liblas::uint8_t> classes);
bool filter(const Point& point);
- void SetKeep(bool bKeep) {m_keep = bKeep;}
+
private:
std::vector<liblas::uint8_t> m_classes;
- bool m_keep;
ClassificationFilter(ClassificationFilter const& other);
ClassificationFilter& operator=(ClassificationFilter const& rhs);
diff -r 0dbb4a3bcd09 -r 30d9cff944fb include/liblas/liblas.hpp
--- a/include/liblas/liblas.hpp Tue Jun 15 19:52:34 2010 -0600
+++ b/include/liblas/liblas.hpp Wed Jun 16 12:41:00 2010 -0500
@@ -188,10 +188,29 @@
{
public:
+ /// Determines whether or not the filter keeps or rejects points that meet
+ /// filtering criteria
+ enum FilterType
+ {
+ eExclusion = 0, ///< Filter removes point that meet the criteria of filter(const Point& point)
+ eInclusion = 1 ///< Filter keeps point that meet the criteria of filter(const Point& point)
+ };
+
virtual bool filter(const Point& point) = 0;
- virtual void SetKeep(bool bKeep) = 0;
+ void SetType(FilterType t) {m_type = t;}
+ FilterType GetType() const {return m_type; }
virtual ~FilterI() {};
+ FilterI(FilterType t) {m_type = t;}
+
+ private:
+
+ FilterI(FilterI const& other);
+ FilterI& operator=(FilterI const& rhs);
+
+ FilterType m_type;
+
+
};
/// Defines public interface to LAS transform implementation.
diff -r 0dbb4a3bcd09 -r 30d9cff944fb src/lasfilter.cpp
--- a/src/lasfilter.cpp Tue Jun 15 19:52:34 2010 -0600
+++ b/src/lasfilter.cpp Wed Jun 16 12:41:00 2010 -0500
@@ -45,10 +45,8 @@
namespace liblas {
-
ClassificationFilter::ClassificationFilter( std::vector<liblas::uint8_t> classes ) :
-m_classes(classes),
-m_keep(true)
+ FilterI(eInclusion), m_classes(classes)
{
}
@@ -66,7 +64,7 @@
for (i = m_classes.begin(); i != m_classes.end(); ++i) {
if (cls == *i) {
- if (m_keep == true) {
+ if (GetType() == eInclusion) {
output = true;
} else {
output = false;
@@ -80,7 +78,7 @@
}
-BoundsFilter::BoundsFilter( double minx, double miny, double maxx, double maxy )
+BoundsFilter::BoundsFilter( double minx, double miny, double maxx, double maxy ) : FilterI(eInclusion)
{
mins[0] = minx;
mins[1] = miny;
@@ -91,7 +89,7 @@
m_2d = true;
}
-BoundsFilter::BoundsFilter( double minx, double miny, double maxx, double maxy, double minz, double maxz )
+BoundsFilter::BoundsFilter( double minx, double miny, double maxx, double maxy, double minz, double maxz ) : FilterI(eInclusion)
{
mins[0] = minx;
mins[1] = miny;
More information about the Liblas-commits
mailing list