Skip to content

Commit

Permalink
merge the PCD writer in to drivers.text.writer, as it's just another …
Browse files Browse the repository at this point in the history
…output type, to eliminate a bunch of code duplication
  • Loading branch information
hobu committed Nov 19, 2012
1 parent 0f4ca56 commit 61c44bf
Show file tree
Hide file tree
Showing 6 changed files with 325 additions and 665 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Expand Up @@ -485,7 +485,6 @@ if(WITH_PYTHON)
endif()
endif()

set (USE_PDAL_PLUGIN_PCD FALSE CACHE BOOL "Build the PCD driver as a plugin rather than embedding")
set (USE_PDAL_PLUGIN_TEXT FALSE CACHE BOOL "Build the text driver as a plugin rather than embedding")
set (USE_PDAL_PLUGIN_SOCI FALSE CACHE BOOL "Build the soci driver as a plugin rather than embedding")
set (USE_PDAL_PLUGIN_OCI FALSE CACHE BOOL "Build the oci driver as a plugin rather than embedding")
Expand Down
115 changes: 0 additions & 115 deletions include/pdal/drivers/pcd/Writer.hpp

This file was deleted.

9 changes: 9 additions & 0 deletions include/pdal/drivers/text/Writer.hpp
Expand Up @@ -102,6 +102,15 @@ class PDAL_DLL Writer : public pdal::Writer
std::size_t pointIndex) const;

void WriteHeader(pdal::Schema const& schema);

void WriteGeoJSONHeader(pdal::Schema const& schema);
void WriteCSVHeader(pdal::Schema const& schema);
void WritePCDHeader(pdal::Schema const& schema);

void WriteCSVBuffer(const PointBuffer& data);
void WriteGeoJSONBuffer(const PointBuffer& data);
void WritePCDBuffer(const PointBuffer& data);

std::vector<boost::tuple<std::string, std::string> > getDimensionOrder(pdal::Schema const& schema) const;
FileStreamPtr m_stream;
bool bWroteHeader;
Expand Down
37 changes: 0 additions & 37 deletions src/CMakeLists.txt
Expand Up @@ -374,28 +374,6 @@ if (GDAL_FOUND)
list (APPEND PDAL_HPP ${PDAL_DRIVERS_NITF_HPP} )
endif()



#
# drivers/pcd
#
set(PDAL_PCD_PATH drivers/pcd)
set(PDAL_PCD_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_PCD_PATH})
set(PDAL_PCD_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_PCD_PATH})

set(PDAL_DRIVERS_PCD_HPP
${PDAL_PCD_HEADERS}/Writer.hpp
)

set (PDAL_DRIVERS_PCD_CPP
${PDAL_PCD_SRC}/Writer.cpp
)

if (NOT USE_PDAL_PLUGIN_PCD)
list (APPEND PDAL_CPP ${PDAL_DRIVERS_PCD_CPP} )
list (APPEND PDAL_HPP ${PDAL_DRIVERS_PCD_HPP} )
endif()

#
# drivers/soci
#
Expand Down Expand Up @@ -669,21 +647,6 @@ if (USE_PDAL_PLUGIN_TEXT)
endif()
endif()

if (USE_PDAL_PLUGIN_PCD)
set(PDAL_PCD_WRITER_LIB_NAME pdal_plugin_writer_pcd)
add_library(${PDAL_PCD_WRITER_LIB_NAME} SHARED ${PDAL_DRIVERS_PCD_CPP})
target_link_libraries(${PDAL_PCD_WRITER_LIB_NAME}
${PDAL_LIB_NAME})
set_target_properties(${PDAL_PCD_WRITER_LIB_NAME}
PROPERTIES SOVERSION "${PDAL_LIB_SOVERSION}" )
if (APPLE)
set_target_properties(
${PDAL_PCD_WRITER_LIB_NAME}
PROPERTIES
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()

if (WITH_SOCI)
if (USE_PDAL_PLUGIN_SOCI)
set(PDAL_SOCI_WRITER_LIB_NAME pdal_plugin_writer_soci)
Expand Down

0 comments on commit 61c44bf

Please sign in to comment.