From 7c03620e3441a469c2f674f6f5f795d7d3369716 Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Wed, 9 May 2018 08:31:37 -0400 Subject: [PATCH] Check (#2006) * Add GDAL back to NITF writer. * Review changes for 1.7.2. * Writer, not reader. * add libraries to get things linking --- filters/FerryFilter.cpp | 2 +- filters/GreedyProjection.hpp | 2 +- io/LasWriter.cpp | 2 -- plugins/nitf/CMakeLists.txt | 1 + plugins/oci/CMakeLists.txt | 2 +- plugins/python/filters/CMakeLists.txt | 2 +- plugins/python/io/CMakeLists.txt | 2 +- plugins/sqlite/CMakeLists.txt | 1 + scripts/appveyor/config.cmd | 15 --------------- scripts/appveyor/install.cmd | 8 -------- test/unit/io/LasWriterTest.cpp | 1 + test/unit/io/TextReaderTest.cpp | 1 + 12 files changed, 9 insertions(+), 30 deletions(-) diff --git a/filters/FerryFilter.cpp b/filters/FerryFilter.cpp index 488a408f04..ea78fc4acf 100644 --- a/filters/FerryFilter.cpp +++ b/filters/FerryFilter.cpp @@ -90,7 +90,7 @@ void FerryFilter::addDimensions(PointLayoutPtr layout) for (auto& info : m_dims) { const Dimension::Id fromId = layout->findDim(info.m_fromName); - // Dimensions being created with the "=>Dim" syntax won't have + // Dimensions being created with the "=>Dim" syntax won't // be in the layout, so we have to assign a default type. Dimension::Type fromType = layout->dimType(fromId); if (fromType == Dimension::Type::None) diff --git a/filters/GreedyProjection.hpp b/filters/GreedyProjection.hpp index 3db5e190cd..31df1f1f32 100644 --- a/filters/GreedyProjection.hpp +++ b/filters/GreedyProjection.hpp @@ -39,7 +39,7 @@ #pragma once -// This is for M_PI on Windows. cmath +// This is for M_PI on Windows. #define _USE_MATH_DEFINES #include diff --git a/io/LasWriter.cpp b/io/LasWriter.cpp index b01d5bf56c..436243e678 100644 --- a/io/LasWriter.cpp +++ b/io/LasWriter.cpp @@ -789,8 +789,6 @@ bool LasWriter::processOne(PointRef& point) // called we know we're in stream mode. bool LasWriter::processPoint(PointRef& point) { - //ABELL - Need to do something about auto offset. - if (m_compression == LasCompression::LasZip) { if (!writeLasZipBuf(point)) diff --git a/plugins/nitf/CMakeLists.txt b/plugins/nitf/CMakeLists.txt index 7dd2558b42..2c506df3cf 100644 --- a/plugins/nitf/CMakeLists.txt +++ b/plugins/nitf/CMakeLists.txt @@ -35,6 +35,7 @@ PDAL_ADD_PLUGIN(writer_libname writer nitf io/tre_plugins.cpp LINK_WITH ${NITRO_LIBRARIES} + ${GDAL_LIBRARY} ) target_include_directories(${writer_libname} PRIVATE ${PDAL_VENDOR_DIR}/pdalboost diff --git a/plugins/oci/CMakeLists.txt b/plugins/oci/CMakeLists.txt index 0706bdcf16..1922b01118 100644 --- a/plugins/oci/CMakeLists.txt +++ b/plugins/oci/CMakeLists.txt @@ -46,7 +46,7 @@ if(BUILD_OCI_TESTS) PDAL_ADD_TEST(ocitest FILES test/OCITest.cpp - LINK_WITH ${reader_libname} ${writer_libname}) + LINK_WITH ${reader_libname} ${writer_libname} ${GDAL_LIBRARY} ${LIBXML2_LIBRARY}) target_include_directories(ocitest PRIVATE ${ORACLE_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) diff --git a/plugins/python/filters/CMakeLists.txt b/plugins/python/filters/CMakeLists.txt index 0802c92c18..b40b1e9b16 100644 --- a/plugins/python/filters/CMakeLists.txt +++ b/plugins/python/filters/CMakeLists.txt @@ -20,6 +20,6 @@ if (WITH_TESTS) FILES ../test/PythonFilterTest.cpp LINK_WITH - ${python_libname} + ${python_libname} ${PYTHON_LIBRARY} ) endif() diff --git a/plugins/python/io/CMakeLists.txt b/plugins/python/io/CMakeLists.txt index 9ba627f6c1..20ac632bec 100644 --- a/plugins/python/io/CMakeLists.txt +++ b/plugins/python/io/CMakeLists.txt @@ -25,5 +25,5 @@ if (WITH_TESTS) FILES ../test/NumpyReaderTest.cpp LINK_WITH - ${numpy_reader}) + ${numpy_reader} ${PYTHON_LIBRARY}) endif() diff --git a/plugins/sqlite/CMakeLists.txt b/plugins/sqlite/CMakeLists.txt index 22461373ae..dae6be86c3 100644 --- a/plugins/sqlite/CMakeLists.txt +++ b/plugins/sqlite/CMakeLists.txt @@ -42,6 +42,7 @@ if(BUILD_SQLITE_TESTS) ${reader_libname} ${writer_libname} ${SQLITE3_LIBRARY} + ${LIBXML2_LIBRARY} ) target_include_directories(sqlitetest PRIVATE ${PDAL_IO_DIR} diff --git a/scripts/appveyor/config.cmd b/scripts/appveyor/config.cmd index a785f9d269..6e287bc665 100644 --- a/scripts/appveyor/config.cmd +++ b/scripts/appveyor/config.cmd @@ -5,21 +5,6 @@ REM and install it to C:\pdalbin before letting AppVeyor upload it as REM an artifact to S3. SET PDAL_INSTALL_PREFIX="C:/OSGeo4W64/" - -REM if "%OSGEO4W_BUILD%"=="ON" ( -REM -REM SET PDAL_OPTIONAL_COMPONENTS=ON -REM SET PDAL_PLUGIN_INSTALL_PATH="C:/OSGeo4W64/bin" -REM set PDAL_BUILD_TESTS=OFF -REM -REM ) ELSE ( -REM -REM mkdir C:\pdalbin -REM SET PDAL_PLUGIN_INSTALL_PATH="C:\pdalbin" -REM set PDAL_BUILD_TESTS=ON -REM -REM ) - SET PDAL_PLUGIN_INSTALL_PATH="C:/OSGeo4W64/bin" set PDAL_BUILD_TESTS=ON diff --git a/scripts/appveyor/install.cmd b/scripts/appveyor/install.cmd index c4220aacf1..d7a833d135 100644 --- a/scripts/appveyor/install.cmd +++ b/scripts/appveyor/install.cmd @@ -1,13 +1,5 @@ @echo off - -REM if "%OSGEO4W_BUILD%" NEQ "ON" ( -REM REM only bother with this for OSGEO4W_BUILD situation -REM echo "Not building OSGeo4W package" -REM exit /b 0 -REM ) - - call %OSGEO4W_ROOT%\bin\o4w_env.bat call %OSGEO4W_ROOT%\bin\py3_env.bat call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 diff --git a/test/unit/io/LasWriterTest.cpp b/test/unit/io/LasWriterTest.cpp index 9607f018f6..88474f3caf 100644 --- a/test/unit/io/LasWriterTest.cpp +++ b/test/unit/io/LasWriterTest.cpp @@ -1118,6 +1118,7 @@ TEST(LasWriterTest, oversize_vlr) } +// Test auto scale/offset for streaming mode. TEST(LasWriterTest, issue1940) { StageFactory f; diff --git a/test/unit/io/TextReaderTest.cpp b/test/unit/io/TextReaderTest.cpp index ebf89955ed..51a6eb3614 100644 --- a/test/unit/io/TextReaderTest.cpp +++ b/test/unit/io/TextReaderTest.cpp @@ -212,6 +212,7 @@ TEST(TextReaderTest, strip_whitespace_from_dimension_names) } } +// Check that space-delimited files work with a CR/LF terminated file. TEST(TextReaderTest, issue1939) { TextReader reader;