[Liblas-commits] hg-main-tree: rollback to r847 sto start this mess
over again :)
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Jul 20 11:25:43 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/50f7d0d2b5fa
changeset: 886:50f7d0d2b5fa
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Jul 20 10:25:35 2011 -0500
description:
rollback to r847 sto start this mess over again :)
diffstat:
apps/CMakeLists.txt | 8 +-
apps/pc2pc.cpp | 102 +++---
apps/pcinfo.cpp | 10 +-
apps/pcview/main.cpp | 26 +-
apps/qfit2las.cpp | 111 -------
include/pdal/Filter.hpp | 10 +-
include/pdal/FilterIterator.hpp | 20 +-
include/pdal/MultiFilter.hpp | 9 +-
include/pdal/MultiFilterIterator.hpp | 12 +-
include/pdal/Options.hpp | 133 ++------
include/pdal/PipelineManager.hpp | 58 +--
include/pdal/Reader.hpp | 4 +-
include/pdal/ReaderIterator.hpp | 2 +-
include/pdal/Stage.hpp | 57 +---
include/pdal/StageFactory.hpp | 121 --------
include/pdal/StageIterator.hpp | 14 +-
include/pdal/Writer.hpp | 16 +-
include/pdal/drivers/faux/Reader.hpp | 8 +-
include/pdal/drivers/faux/Writer.hpp | 5 +-
include/pdal/drivers/las/Reader.hpp | 8 +-
include/pdal/drivers/las/Writer.hpp | 7 +-
include/pdal/drivers/liblas/Reader.hpp | 8 +-
include/pdal/drivers/liblas/Writer.hpp | 6 +-
include/pdal/drivers/oci/Reader.hpp | 8 +-
include/pdal/drivers/oci/Writer.hpp | 5 +-
include/pdal/drivers/qfit/Reader.hpp | 6 +-
include/pdal/drivers/terrasolid/Reader.hpp | 5 +-
include/pdal/exceptions.hpp | 7 -
include/pdal/filters/ByteSwapFilter.hpp | 11 +-
include/pdal/filters/ByteSwapFilterIterator.hpp | 2 +-
include/pdal/filters/CacheFilter.hpp | 9 +-
include/pdal/filters/CacheFilterIterator.hpp | 3 +-
include/pdal/filters/Chipper.hpp | 20 +-
include/pdal/filters/ColorFilter.hpp | 7 +-
include/pdal/filters/CropFilter.hpp | 13 +-
include/pdal/filters/DecimationFilter.hpp | 7 +-
include/pdal/filters/MosaicFilter.hpp | 6 +-
include/pdal/filters/ReprojectionFilter.hpp | 8 +-
include/pdal/filters/ScalingFilter.hpp | 11 +-
include/pdal/pdal.hpp | 5 -
mpg-config.bat | 8 +-
src/CMakeLists.txt | 2 -
src/Filter.cpp | 13 +-
src/FilterIterator.cpp | 39 +-
src/MultiFilter.cpp | 36 ++-
src/MultiFilterIterator.cpp | 15 +-
src/Options.cpp | 64 +--
src/PipelineManager.cpp | 338 +----------------------
src/Reader.cpp | 2 +-
src/Schema.cpp | 113 +++----
src/Stage.cpp | 129 ++------
src/StageFactory.cpp | 244 -----------------
src/StageIterator.cpp | 10 +-
src/Writer.cpp | 21 +-
src/drivers/faux/Reader.cpp | 41 +--
src/drivers/faux/Writer.cpp | 5 +-
src/drivers/las/Header.cpp | 18 +-
src/drivers/las/Reader.cpp | 15 +-
src/drivers/las/Writer.cpp | 33 +-
src/drivers/liblas/Reader.cpp | 15 +-
src/drivers/liblas/Writer.cpp | 20 +-
src/drivers/oci/Reader.cpp | 14 +-
src/drivers/oci/Writer.cpp | 58 +---
src/drivers/qfit/Reader.cpp | 16 +-
src/drivers/terrasolid/Reader.cpp | 20 +-
src/filters/ByteSwapFilter.cpp | 15 +-
src/filters/ByteSwapFilterIterator.cpp | 12 +-
src/filters/CacheFilter.cpp | 21 +-
src/filters/CacheFilterIterator.cpp | 14 +-
src/filters/Chipper.cpp | 36 +-
src/filters/ChipperIterator.cpp | 4 +-
src/filters/ColorFilter.cpp | 8 +-
src/filters/ColorFilterIterator.cpp | 6 +-
src/filters/CropFilter.cpp | 19 +-
src/filters/CropFilterIterator.cpp | 6 +-
src/filters/DecimationFilter.cpp | 14 +-
src/filters/DecimationFilterIterator.cpp | 10 +-
src/filters/MosaicFilter.cpp | 37 +-
src/filters/MosaicFilterIterator.cpp | 4 +-
src/filters/ReprojectionFilter.cpp | 15 +-
src/filters/ReprojectionFilterIterator.cpp | 6 +-
src/filters/ScalingFilter.cpp | 30 +-
src/filters/ScalingFilterIterator.cpp | 8 +-
test/data/1.2-with-color.laz | 0
test/data/1.2-with-color_LIBLAS.laz | 0
test/data/1.2-with-color_NATIVE.laz | 0
test/data/pipeline1.xml | 25 -
test/unit/ByteSwapFilterTest.cpp | 21 +-
test/unit/CMakeLists.txt | 1 -
test/unit/CacheFilterTest.cpp | 40 +-
test/unit/ChipperTest.cpp | 22 +-
test/unit/ColorFilterTest.cpp | 2 +-
test/unit/CropFilterTest.cpp | 14 +-
test/unit/DecimationFilterTest.cpp | 18 +-
test/unit/DimensionLayoutTest.cpp | 2 +-
test/unit/FauxReaderTest.cpp | 62 +--
test/unit/FauxWriterTest.cpp | 58 +--
test/unit/LasReaderTest.cpp | 94 +++---
test/unit/LasWriterTest.cpp | 81 ++--
test/unit/LiblasReaderTest.cpp | 94 +++---
test/unit/LiblasWriterTest.cpp | 91 +++---
test/unit/MosaicFilterTest.cpp | 38 +-
test/unit/OptionsTest.cpp | 90 +-----
test/unit/PipelineManagerTest.cpp | 33 +--
test/unit/PointBufferCacheTest.cpp | 2 +-
test/unit/QFITReaderTest.cpp | 13 +-
test/unit/ReprojectionFilterTest.cpp | 51 +-
test/unit/SpatialReferenceTest.cpp | 42 +-
test/unit/StageFactoryTest.cpp | 173 ------------
test/unit/TerraSolidTest.cpp | 4 +-
110 files changed, 1036 insertions(+), 2477 deletions(-)
diffs (truncated from 7012 to 300 lines):
diff -r 21b2be098ff0 -r 50f7d0d2b5fa apps/CMakeLists.txt
--- a/apps/CMakeLists.txt Tue Jul 19 14:54:44 2011 -0500
+++ b/apps/CMakeLists.txt Wed Jul 20 10:25:35 2011 -0500
@@ -23,11 +23,10 @@
set(PC2PC pc2pc)
set(PCINFO pcinfo)
-set(QFIT2LAS qfit2las)
set(PDAL_UTILITIES
- ${PCINFO} ${PC2PC} ${PCVIEW} ${QFIT2LAS})
+ ${PCINFO} ${PC2PC} ${PCVIEW})
#------------------------------------------------------------------------------
@@ -61,11 +60,6 @@
target_link_libraries(${PC2PC} ${APPS_CPP_DEPENDENCIES} )
endif()
-if(QFIT2LAS)
- add_executable(${QFIT2LAS} qfit2las.cpp Application.cpp Application.hpp)
- target_link_libraries(${QFIT2LAS} ${APPS_CPP_DEPENDENCIES} )
-endif()
-
#------------------------------------------------------------------------------
# Targets installation
diff -r 21b2be098ff0 -r 50f7d0d2b5fa apps/pc2pc.cpp
--- a/apps/pc2pc.cpp Tue Jul 19 14:54:44 2011 -0500
+++ b/apps/pc2pc.cpp Wed Jul 20 10:25:35 2011 -0500
@@ -118,34 +118,29 @@
return 1;
}
- Options writerOptions;
- writerOptions.add("filename", m_outputFile);
+ std::ostream* ofs = Utils::createFile(m_outputFile);
if (hasOption("native"))
{
- Options readerOptions;
- readerOptions.add("filename", m_inputFile);
- DataStagePtr reader(new pdal::drivers::las::LasReader(readerOptions));
+ pdal::drivers::las::LasReader reader(m_inputFile);
- const boost::uint64_t numPoints = reader->getNumPoints();
+ const boost::uint64_t numPoints = reader.getNumPoints();
- WriterPtr writer(new pdal::drivers::las::LasWriter(reader, writerOptions));
+ pdal::drivers::las::LasWriter writer(reader, *ofs);
//BUG: handle laz writer.setCompressed(false);
//writer.setPointFormat( reader.getPointFormatNumber() );
- writer->write(numPoints);
+ writer.write(numPoints);
}
else if (hasOption("oracle-writer"))
{
#ifdef PDAL_HAVE_ORACLE
- Options readerOptions;
- readerOptions.add("filename", m_inputFile);
- DataStagePtr reader(new pdal::drivers::las::LasReader(readerOptions));
+ pdal::drivers::las::LasReader reader(m_inputFile);
- const boost::uint64_t numPoints = reader->getNumPoints();
+ const boost::uint64_t numPoints = reader.getNumPoints();
boost::property_tree::ptree load_tree;
@@ -167,20 +162,15 @@
boost::uint32_t capacity = tree.get<boost::uint32_t>("capacity");
- pdal::Options cacheOptions;
- cacheOptions.add("max_cache_blocks", 1);
- cacheOptions.add("cache_block_size", capacity);
- DataStagePtr cache(new pdal::filters::CacheFilter(reader, cacheOptions));
+
+ pdal::filters::CacheFilter cache(reader, 1, capacity);
+ pdal::filters::Chipper chipper(cache, capacity);
+ pdal::filters::ByteSwapFilter swapper(chipper);
- pdal::Options chipperOptions;
- cacheOptions.add("max_partition_size", capacity);
- DataStagePtr chipper(new pdal::filters::Chipper(cache, chipperOptions));
+
+ pdal::filters::ScalingFilter scalingFilter(swapper, false);
- DataStagePtr swapper(new pdal::filters::ByteSwapFilter(chipper, Options::empty()));
-
- DataStagePtr scalingFilter(new pdal::filters::ScalingFilter(swapper, false));
-
- DataStagePtr reprojectionFilter(new pdal::filters::ReprojectionFilter(scalingFilter, in_ref, out_ref));
+ pdal::filters::ReprojectionFilter reprojectionFilter(scalingFilter, in_ref, out_ref);
// convert to ints, using custom scale factor
@@ -192,19 +182,19 @@
double offsety = oracle_options.get<double>("offset.y");
double offsetz = oracle_options.get<double>("offset.z");
- DataStagePtr descalingFilter(new pdal::filters::ScalingFilter ( reprojectionFilter,
+ pdal::filters::ScalingFilter descalingFilter( reprojectionFilter,
scalex, offsetx,
scaley, offsety,
scalez, offsetz,
- true));
+ true);
- WriterPtr writer(new pdal::drivers::oci::Writer(descalingFilter, options));
+ pdal::drivers::oci::Writer writer(descalingFilter, options);
// pdal::filters::CacheFilter cache(reader, 1, capacity);
// pdal::filters::Chipper chipper(cache, capacity);
// pdal::drivers::oci::Writer writer(chipper, options);
- writer->write(numPoints);
+ writer.write(numPoints);
boost::property_tree::ptree output_tree;
// output_tree.put_child(writer.getName(), options.GetPTree());
// boost::property_tree::write_xml(m_xml, output_tree);
@@ -235,14 +225,14 @@
{
pdal::SpatialReference out_ref(out_wkt);
- DataStagePtr reader(new pdal::drivers::oci::Reader(options));
- pdal::SpatialReference in_ref(reader->getSpatialReference());
+ pdal::drivers::oci::Reader reader(options);
+ pdal::SpatialReference in_ref(reader.getSpatialReference());
- DataStagePtr swapper(new pdal::filters::ByteSwapFilter(reader, Options::empty()));
+ pdal::filters::ByteSwapFilter swapper(reader);
- DataStagePtr scalingFilter(new pdal::filters::ScalingFilter(swapper, false));
+ pdal::filters::ScalingFilter scalingFilter(swapper, false);
- DataStagePtr reprojectionFilter(new pdal::filters::ReprojectionFilter(scalingFilter, in_ref, out_ref));
+ pdal::filters::ReprojectionFilter reprojectionFilter(scalingFilter, in_ref, out_ref);
// convert to ints, using custom scale factor
@@ -254,34 +244,34 @@
double offsety = las_options.get<double>("offset.y");
double offsetz = las_options.get<double>("offset.z");
- DataStagePtr descalingFilter(new pdal::filters::ScalingFilter(reprojectionFilter,
- scalex, offsetx,
- scaley, offsety,
- scalez, offsetz,
- true));
+ pdal::filters::ScalingFilter descalingFilter( reprojectionFilter,
+ scalex, offsetx,
+ scaley, offsety,
+ scalez, offsetz,
+ true);
- pdal::drivers::las::LasWriterPtr writer(new pdal::drivers::las::LasWriter(descalingFilter, writerOptions));
+ pdal::drivers::las::LasWriter writer(descalingFilter, *ofs);
if (compress)
- writer->setCompressed(true);
- writer->setChunkSize(oracle_options.get<boost::uint32_t>("capacity"));
- writer->write(0);
+ writer.setCompressed(true);
+ writer.setChunkSize(oracle_options.get<boost::uint32_t>("capacity"));
+ writer.write(0);
} else
{
pdal::SpatialReference out_ref(out_wkt);
- DataStagePtr reader(new pdal::drivers::oci::Reader(options));
- pdal::SpatialReference in_ref(reader->getSpatialReference());
- DataStagePtr swapper(new pdal::filters::ByteSwapFilter(reader, Options::empty()));
+ pdal::drivers::oci::Reader reader(options);
+ pdal::SpatialReference in_ref(reader.getSpatialReference());
+ pdal::filters::ByteSwapFilter swapper(reader);
- pdal::drivers::las::LasWriterPtr writer(new pdal::drivers::las::LasWriter(swapper, writerOptions));
+ pdal::drivers::las::LasWriter writer(swapper, *ofs);
if (compress)
- writer->setCompressed(true);
+ writer.setCompressed(true);
- writer->setChunkSize(oracle_options.get<boost::uint32_t>("capacity"));
- writer->write(0);
+ writer.setChunkSize(oracle_options.get<boost::uint32_t>("capacity"));
+ writer.write(0);
}
@@ -302,21 +292,21 @@
else
{
- pdal::Options readerOptions;
- readerOptions.add("filename", m_inputFile);
- pdal::drivers::liblas::LiblasReaderPtr reader(new pdal::drivers::liblas::LiblasReader(readerOptions));
+ pdal::drivers::liblas::LiblasReader reader(m_inputFile);
- const boost::uint64_t numPoints = reader->getNumPoints();
+ const boost::uint64_t numPoints = reader.getNumPoints();
- pdal::drivers::liblas::LiblasWriterPtr writer(new pdal::drivers::liblas::LiblasWriter(reader, writerOptions));
+ pdal::drivers::liblas::LiblasWriter writer(reader, *ofs);
//BUG: handle laz writer.setCompressed(false);
- writer->setPointFormat( reader->getPointFormat() );
+ writer.setPointFormat( reader.getPointFormat() );
- writer->write(numPoints);
+ writer.write(numPoints);
}
+ Utils::closeFile(ofs);
+
return 0;
}
diff -r 21b2be098ff0 -r 50f7d0d2b5fa apps/pcinfo.cpp
--- a/apps/pcinfo.cpp Tue Jul 19 14:54:44 2011 -0500
+++ b/apps/pcinfo.cpp Wed Jul 20 10:25:35 2011 -0500
@@ -13,8 +13,6 @@
#include <pdal/drivers/las/Reader.hpp>
#include <pdal/drivers/liblas/Reader.hpp>
#include <pdal/Utils.hpp>
-#include <pdal/Options.hpp>
-
#ifdef PDAL_HAVE_MRSID
#include <pdal/drivers/mrsid/Reader.hpp>
#endif
@@ -82,7 +80,7 @@
return 1;
}
- pdal::DataStage* reader = NULL;
+ pdal::Stage* reader = NULL;
size_t ext = m_inputFile.find_last_of('.');
if (ext != std::string::npos)
{
@@ -90,15 +88,13 @@
if (!m_inputFile.substr(ext).compare("las") ||
!m_inputFile.substr(ext).compare("laz"))
{
- Options opts;
- opts.add("filename", m_inputFile, "file to read from");
if (hasOption("native"))
{
- reader = new pdal::drivers::las::LasReader(opts);
+ reader = new pdal::drivers::las::LasReader(m_inputFile);
}
else
{
- reader = new pdal::drivers::liblas::LiblasReader(opts);
+ reader = new pdal::drivers::liblas::LiblasReader(m_inputFile);
}
}
#ifdef PDAL_HAVE_MRSID
diff -r 21b2be098ff0 -r 50f7d0d2b5fa apps/pcview/main.cpp
--- a/apps/pcview/main.cpp Tue Jul 19 14:54:44 2011 -0500
+++ b/apps/pcview/main.cpp Wed Jul 20 10:25:35 2011 -0500
@@ -132,7 +132,7 @@
class ThreadArgs
{
public:
- ThreadArgs(Controller& controller, pdal::DataStage& stage, boost::uint32_t startPoint, boost::uint32_t numPoints)
+ ThreadArgs(Controller& controller, pdal::Stage& stage, boost::uint32_t startPoint, boost::uint32_t numPoints)
: m_controller(controller)
, m_stage(stage)
, m_startPoint(startPoint)
@@ -141,7 +141,7 @@
{ }
Controller& m_controller;
- pdal::DataStage& m_stage;
+ pdal::Stage& m_stage;
boost::uint32_t m_startPoint;
boost::uint32_t m_numPoints;
boost::uint32_t m_numRead;
@@ -157,14 +157,14 @@
static void givePointsToEngine(ThreadArgs* threadArgs)
{
Controller& controller = threadArgs->m_controller;
- pdal::DataStage& stage = threadArgs->m_stage;
+ pdal::Stage& stage = threadArgs->m_stage;
boost::uint32_t startPoint = threadArgs->m_startPoint;
boost::uint32_t numPoints = threadArgs->m_numPoints;
const pdal::Schema& schema = stage.getSchema();
const pdal::SchemaLayout schemaLayout(schema);
- pdal::StageSequentialIteratorPtr iter = stage.createSequentialIterator();
+ pdal::StageSequentialIterator* iter = stage.createSequentialIterator();
pdal::PointBuffer buffer(schemaLayout, numPoints);
More information about the Liblas-commits
mailing list