From 8dc1841bd4fc7d55d952294f7e4aa97c1049cf14 Mon Sep 17 00:00:00 2001 From: Bradley J Chambers Date: Wed, 22 Oct 2014 22:01:09 -0400 Subject: [PATCH] update Sort from Application to Kernel --- apps/pdal.cpp | 4 ++-- include/pdal/kernel/Sort.hpp | 6 +++--- src/kernel/Sort.cpp | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/pdal.cpp b/apps/pdal.cpp index 78259cc21a..a3fd148b05 100644 --- a/apps/pdal.cpp +++ b/apps/pdal.cpp @@ -164,8 +164,8 @@ int main(int argc, char* argv[]) if (boost::iequals(action, "sort")) { - pdal::kernel::Sort app(count, args); - return app.run(); + pdal::kernel::Sort app; + return app.run(count, args, "sort"); } if (boost::iequals(action, "pipeline")) diff --git a/include/pdal/kernel/Sort.hpp b/include/pdal/kernel/Sort.hpp index 885c3fd057..782b253fe2 100644 --- a/include/pdal/kernel/Sort.hpp +++ b/include/pdal/kernel/Sort.hpp @@ -34,17 +34,17 @@ #pragma once -#include "Application.hpp" +#include namespace pdal { namespace kernel { -class PDAL_DLL Sort : public Application +class PDAL_DLL Sort : public Kernel { public: - Sort(int argc, const char* argv[]); + Sort(); int execute(); private: diff --git a/src/kernel/Sort.cpp b/src/kernel/Sort.cpp index 69add59ba7..49c311998a 100644 --- a/src/kernel/Sort.cpp +++ b/src/kernel/Sort.cpp @@ -44,8 +44,8 @@ namespace pdal namespace kernel { -Sort::Sort(int argc, const char* argv[]) : - Application(argc, argv, "sort"), m_bCompress(false), m_bForwardMetadata(false) +Sort::Sort() : + Kernel(), m_bCompress(false), m_bForwardMetadata(false) {} @@ -174,7 +174,8 @@ int Sort::execute() // process the data, grabbing the PointBufferSet for visualization of the PointBufferSet pbSetOut = writer->execute(ctx); - visualize(*pbSetOut.begin()); + if (isVisualize()) + visualize(*pbSetOut.begin()); //visualize(*pbSetIn.begin(), *pbSetOut.begin()); return 0;