From 54c43b056e34d7773e52a18ad2c0d9fa7f1c7f3b Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Mon, 17 Sep 2012 11:23:28 -0500 Subject: [PATCH] drivers.pipeline.reader needs to serialize the stage it owns, not itself --- include/pdal/drivers/pipeline/Reader.hpp | 3 +++ src/drivers/pipeline/Reader.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/pdal/drivers/pipeline/Reader.hpp b/include/pdal/drivers/pipeline/Reader.hpp index 21b1c3c432..e4784a39fc 100644 --- a/include/pdal/drivers/pipeline/Reader.hpp +++ b/include/pdal/drivers/pipeline/Reader.hpp @@ -62,6 +62,9 @@ class PDAL_DLL Reader : public pdal::Reader virtual Metadata getMetadata() const; + // for xml serializion of pipelines + virtual boost::property_tree::ptree serializePipeline() const; + bool supportsIterator(StageIteratorType t) const; pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const; pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const; diff --git a/src/drivers/pipeline/Reader.cpp b/src/drivers/pipeline/Reader.cpp index 8fba007268..282534914b 100644 --- a/src/drivers/pipeline/Reader.cpp +++ b/src/drivers/pipeline/Reader.cpp @@ -35,7 +35,7 @@ #include #include - +#include namespace pdal { @@ -121,6 +121,11 @@ Metadata Reader::getMetadata() const return m_stage->getMetadata(); } +boost::property_tree::ptree Reader::serializePipeline() const +{ + return m_stage->serializePipeline(); +} + boost::property_tree::ptree Reader::toPTree() const { boost::property_tree::ptree tree = pdal::Reader::toPTree();