Skip to content

Commit

Permalink
Remove BufferReader where it is no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
chambbj committed Sep 22, 2017
1 parent b6c18d6 commit 456520f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
16 changes: 2 additions & 14 deletions kernels/SortKernel.cpp
Expand Up @@ -34,7 +34,6 @@

#include "SortKernel.hpp"

#include <io/BufferReader.hpp>
#include <pdal/StageFactory.hpp>
#include <pdal/pdal_macros.hpp>

Expand Down Expand Up @@ -71,19 +70,7 @@ void SortKernel::addSwitches(ProgramArgs& args)
int SortKernel::execute()
{
Stage& readerStage = makeReader(m_inputFile, m_driverOverride);

PointTable table;
readerStage.prepare(table);
PointViewSet viewSetIn = readerStage.execute(table);

// the input PointViewSet will be used to populate a BufferReader that is
// consumed by the processing pipeline
PointViewPtr inView = *viewSetIn.begin();

BufferReader bufferReader;
bufferReader.addView(inView);

Stage& sortStage = makeFilter("filters.mortonorder", bufferReader);
Stage& sortStage = makeFilter("filters.mortonorder", readerStage);

Options writerOptions;
if (m_bCompress)
Expand All @@ -92,6 +79,7 @@ int SortKernel::execute()
writerOptions.add("forward_metadata", true);
Stage& writer = makeWriter(m_outputFile, sortStage, "", writerOptions);

PointTable table;
writer.prepare(table);
writer.execute(table);

Expand Down
2 changes: 0 additions & 2 deletions pdal/Kernel.cpp
Expand Up @@ -44,8 +44,6 @@

#include <pdal/pdal_config.hpp>

#include <io/BufferReader.hpp>

#include <memory>
#include <vector>

Expand Down
1 change: 0 additions & 1 deletion pdal/StageFactory.cpp
Expand Up @@ -101,7 +101,6 @@
#include <io/Ilvis2Reader.hpp>
#include <io/LasReader.hpp>
#include <io/OptechReader.hpp>
#include <io/BufferReader.hpp>
#include <io/PlyReader.hpp>
#include <io/PtsReader.hpp>
#include <io/QfitReader.hpp>
Expand Down

0 comments on commit 456520f

Please sign in to comment.