Skip to content

Commit

Permalink
drivers.pipeline.reader needs to serialize the stage it owns, not itself
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Sep 17, 2012
1 parent 8b40fd7 commit 54c43b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/pdal/drivers/pipeline/Reader.hpp
Expand Up @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion src/drivers/pipeline/Reader.cpp
Expand Up @@ -35,7 +35,7 @@
#include <pdal/drivers/pipeline/Reader.hpp>

#include <pdal/PipelineReader.hpp>

#include <pdal/PipelineWriter.hpp>

namespace pdal
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 54c43b0

Please sign in to comment.