Last active
October 5, 2018 18:46
-
-
Save hobu/9046a04e9b1b5bdb74fa28f854200145 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/kernels/InfoKernel.cpp b/kernels/InfoKernel.cpp | |
index 02e2a1e59..59ce930ca 100644 | |
@@ -302,6 +305,17 @@ void InfoKernel::dump(PointTableRef table, MetadataNode& root) | |
else | |
root.add(m_hexbinStage->getMetadata().clone("boundary")); | |
} | |
+ | |
+ pdal::PipelineWriter::TagMap tags; | |
+ PipelineWriter::generateTags(m_manager.getStage(), tags); | |
+ | |
+ MetadataNode pipeline; | |
+ m_manager.getStage()->serialize(pipeline, tags); | |
+ root.add(pipeline.clone("pipeline")); | |
} | |
diff --git a/pdal/PipelineWriter.cpp b/pdal/PipelineWriter.cpp | |
index 91fb74be1..7c97970f1 100644 | |
--- a/pdal/PipelineWriter.cpp | |
+++ b/pdal/PipelineWriter.cpp | |
@@ -41,9 +41,12 @@ | |
namespace pdal | |
{ | |
-namespace | |
+ | |
+namespace PipelineWriter | |
{ | |
+ | |
+ | |
std::string generateTag(Stage *stage, PipelineWriter::TagMap& tags) | |
{ | |
auto tagExists = [tags](const std::string& tag) | |
@@ -77,11 +80,6 @@ void generateTags(Stage *stage, PipelineWriter::TagMap& tags) | |
tags[stage] = generateTag(stage, tags); | |
} | |
-} // anonymous namespace | |
- | |
-namespace PipelineWriter | |
-{ | |
- | |
PDAL_DLL void writePipeline(Stage *stage, const std::string& filename) | |
{ | |
std::ostream *out = Utils::createFile(filename, false); | |
diff --git a/pdal/PipelineWriter.hpp b/pdal/PipelineWriter.hpp | |
index 043bbd4fb..f9b6c9777 100644 | |
--- a/pdal/PipelineWriter.hpp | |
+++ b/pdal/PipelineWriter.hpp | |
@@ -50,6 +50,7 @@ namespace PipelineWriter | |
PDAL_DLL void writePipeline(Stage *s, const std::string& filename); | |
PDAL_DLL void writePipeline(Stage *s, std::ostream& strm); | |
+ PDAL_DLL void generateTags(Stage *stage, PipelineWriter::TagMap& tags); | |
} | |
} // namespace pdal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment