Skip to content

Commit

Permalink
Pipelines are no longer a stage. Use PipelineManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed May 19, 2014
1 parent d89f977 commit 110bc7f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 253 deletions.
5 changes: 0 additions & 5 deletions include/pdal/Drivers.hpp
Expand Up @@ -51,8 +51,6 @@
#include <pdal/drivers/icebridge/Reader.hpp>
#endif

#include <pdal/drivers/pipeline/Reader.hpp>

#ifdef PDAL_HAVE_ORACLE
#ifndef USE_PDAL_PLUGIN_OCI
#include <pdal/drivers/oci/Reader.hpp>
Expand All @@ -74,11 +72,8 @@
#endif
#endif


#include <pdal/drivers/pipeline/Reader.hpp>
#include <pdal/drivers/qfit/Reader.hpp>
#include <pdal/drivers/terrasolid/Reader.hpp>

#include <pdal/drivers/text/Writer.hpp>

#ifdef PDAL_HAVE_ORACLE
Expand Down
98 changes: 0 additions & 98 deletions include/pdal/drivers/pipeline/Reader.hpp

This file was deleted.

22 changes: 0 additions & 22 deletions src/CMakeLists.txt
Expand Up @@ -301,26 +301,6 @@ endif()
endif()


#
# drivers/pipeline
#

set(PDAL_PIPELINE_PATH drivers/pipeline)
set(PDAL_PIPELINE_HEADERS "${PDAL_HEADERS_DIR}/${PDAL_PIPELINE_PATH}")
set(PDAL_PIPELINE_SRC "${PROJECT_SOURCE_DIR}/src/${PDAL_PIPELINE_PATH}")

set (PDAL_DRIVERS_PIPELINE_HPP
"${PDAL_PIPELINE_HEADERS}/Reader.hpp"
)

set (PDAL_DRIVERS_PIPELINE_CPP
"${PDAL_PIPELINE_SRC}/Reader.cpp"
)

list (APPEND PDAL_CPP ${PDAL_DRIVERS_PIPELINE_CPP} )
list (APPEND PDAL_HPP ${PDAL_DRIVERS_PIPELINE_HPP} )


#
# drivers/qfit
#
Expand Down Expand Up @@ -694,7 +674,6 @@ source_group("Header Files\\drivers\\caris" FILES ${PDAL_DRIVERS_CARIS_HPP})
source_group("Header Files\\drivers\\las" FILES ${PDAL_DRIVERS_LAS_HPP})
source_group("Header Files\\drivers\\nitf" FILES ${PDAL_DRIVERS_NITF_HPP})
source_group("Header Files\\drivers\\oci" FILES ${PDAL_DRIVERS_OCI_HPP})
source_group("Header Files\\drivers\\pipeline" FILES ${PDAL_DRIVERS_PIPELINE_HPP})
source_group("Header Files\\drivers\\qfit" FILES ${PDAL_DRIVERS_QFIT_HPP})
source_group("Header Files\\drivers\\sbet" FILES ${PDAL_DRIVERS_SBET_HPP})
source_group("Header Files\\drivers\\terrasolid" FILES ${PDAL_DRIVERS_TERRASOLID_HPP})
Expand All @@ -711,7 +690,6 @@ source_group("Source Files\\drivers\\caris" FILES ${PDAL_DRIVERS_CARIS_CPP})
source_group("Source Files\\drivers\\las" FILES ${PDAL_DRIVERS_LAS_CPP})
source_group("Source Files\\drivers\\nitf" FILES ${PDAL_DRIVERS_NITF_CPP})
source_group("Source Files\\drivers\\oci" FILES ${PDAL_DRIVERS_OCI_CPP})
source_group("Source Files\\drivers\\pipeline" FILES ${PDAL_DRIVERS_PIPELINE_CPP})
source_group("Source Files\\drivers\\qfit" FILES ${PDAL_DRIVERS_QFIT_CPP})
source_group("Source Files\\drivers\\sbet" FILES ${PDAL_DRIVERS_SBET_CPP})
source_group("Source Files\\drivers\\terrasolid" FILES ${PDAL_DRIVERS_TERRASOLID_CPP})
Expand Down
2 changes: 0 additions & 2 deletions src/StageFactory.cpp
Expand Up @@ -84,7 +84,6 @@ MAKE_READER_CREATOR(PgPcReader, pdal::drivers::pgpointcloud::Reader)
#endif
#endif

MAKE_READER_CREATOR(PipelineReader, pdal::drivers::pipeline::Reader)
MAKE_READER_CREATOR(QfitReader, pdal::drivers::qfit::Reader)
MAKE_READER_CREATOR(TerrasolidReader, pdal::drivers::terrasolid::Reader)

Expand Down Expand Up @@ -401,7 +400,6 @@ void StageFactory::registerKnownReaders()
#endif
#endif

REGISTER_READER(PipelineReader, pdal::drivers::pipeline::Reader);
REGISTER_READER(QfitReader, pdal::drivers::qfit::Reader);
REGISTER_READER(TerrasolidReader, pdal::drivers::terrasolid::Reader);
REGISTER_READER(BpfReader, pdal::BpfReader);
Expand Down
108 changes: 0 additions & 108 deletions src/drivers/pipeline/Reader.cpp

This file was deleted.

39 changes: 21 additions & 18 deletions test/unit/MetadataTest.cpp
Expand Up @@ -37,9 +37,10 @@
#include <iostream>
#include <string>

#include <pdal/Metadata.hpp>
#include <pdal/drivers/las/Reader.hpp>
#include <pdal/drivers/pipeline/Reader.hpp>
#include <pdal/Metadata.hpp>
#include <pdal/PipelineManager.hpp>
#include <pdal/PipelineReader.hpp>
#include "Support.hpp"

#include <boost/property_tree/xml_parser.hpp>
Expand Down Expand Up @@ -72,9 +73,9 @@ BOOST_AUTO_TEST_CASE(test_construction)

pdal::Bounds<double> b(1.1,2.2,3.3,101.1,102.2,103.3);

m.setValue<boost::uint32_t>(u32);
m.setValue<boost::uint32_t>(32);

BOOST_CHECK_EQUAL(m.getValue<boost::uint32_t>(), 32u);
BOOST_CHECK_EQUAL(m.getValue<boost::uint32_t>(), 32);
BOOST_CHECK_EQUAL(m.getType(), "nonNegativeInteger");

BOOST_CHECK_EQUAL(m.getValue<boost::int32_t>(), 32);
Expand Down Expand Up @@ -118,19 +119,19 @@ BOOST_AUTO_TEST_CASE(test_construction)
BOOST_CHECK_EQUAL(m.getType(), "integer");

m.setValue<boost::uint8_t>(u8);
BOOST_CHECK_EQUAL(m.getValue<boost::uint8_t>(), 8u);
BOOST_CHECK_EQUAL(m.getValue<boost::uint8_t>(), 8);
BOOST_CHECK_EQUAL(m.getType(), "nonNegativeInteger");

m.setValue<boost::uint16_t>(u16);
BOOST_CHECK_EQUAL(m.getValue<boost::uint16_t>(), 16u);
BOOST_CHECK_EQUAL(m.getValue<boost::uint16_t>(), 16);
BOOST_CHECK_EQUAL(m.getType(), "nonNegativeInteger");

m.setValue<boost::uint32_t>(u32);
BOOST_CHECK_EQUAL(m.getValue<boost::uint32_t>(), 32u);
BOOST_CHECK_EQUAL(m.getValue<boost::uint32_t>(), 32);
BOOST_CHECK_EQUAL(m.getType(), "nonNegativeInteger");

m.setValue<boost::uint64_t>(u64);
BOOST_CHECK_EQUAL(m.getValue<boost::uint64_t>(), 64u);
BOOST_CHECK_EQUAL(m.getValue<boost::uint64_t>(), 64);
BOOST_CHECK_EQUAL(m.getType(), "nonNegativeInteger");
}

Expand Down Expand Up @@ -201,22 +202,24 @@ BOOST_AUTO_TEST_CASE(test_metadata_stage)

Metadata file_metadata = reader.getMetadata();

BOOST_CHECK_EQUAL(file_metadata.toPTree().get_child("metadata").size(), 32u);
BOOST_CHECK_EQUAL(file_metadata.toPTree().get_child("metadata").size(),
32);

PointContext readerCtx;
Option option("filename", Support::datapath("pipeline/pipeline_metadata_reader.xml"));
Options options(option);

drivers::pipeline::Reader pipeline(options);
pipeline.prepare(readerCtx);

Metadata pipeline_metadata = pipeline.getMetadata();
BOOST_CHECK_EQUAL(pipeline_metadata.toPTree().get_child("metadata").size(), 32u);
PipelineManager mgr;
PipelineReader specReader(mgr);
specReader.readPipeline(
Support::datapath("pipeline/pipeline_metadata_reader.xml"));
Stage *stage = mgr.getStage();

stage->prepare(readerCtx);
Metadata pipeline_metadata = stage->getMetadata();
BOOST_CHECK_EQUAL(
pipeline_metadata.toPTree().get_child("metadata").size(), 32);
}

BOOST_AUTO_TEST_CASE(test_metadata_constructor_no_throw)
{

pdal::Bounds<double> b;
pdal::Metadata entry("name", b);
}
Expand Down

0 comments on commit 110bc7f

Please sign in to comment.