Skip to content

Commit

Permalink
Sibling of 3bfb4b7
Browse files Browse the repository at this point in the history
  • Loading branch information
sunapi386 committed Apr 26, 2019
1 parent 051f10e commit 1326042
Show file tree
Hide file tree
Showing 143 changed files with 10,859 additions and 24,236 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,10 @@ include(${PDAL_CMAKE_DIR}/lzma.cmake)
include(${PDAL_CMAKE_DIR}/zstd.cmake)
include(${PDAL_CMAKE_DIR}/test.cmake)
include(${PDAL_CMAKE_DIR}/ctest.cmake)
include(${PDAL_CMAKE_DIR}/json.cmake)
include(${PDAL_CMAKE_DIR}/libxml2.cmake)
include(${PDAL_CMAKE_DIR}/dimension.cmake)
include(${PDAL_CMAKE_DIR}/arbiter.cmake)
include(${PDAL_CMAKE_DIR}/nlohmann.cmake)
include(${PDAL_CMAKE_DIR}/openssl.cmake) # Optional

#------------------------------------------------------------------------------
# generate the pdal_features.hpp header
Expand Down Expand Up @@ -177,6 +176,9 @@ add_subdirectory(dimbuilder)
add_subdirectory(vendor/pdalboost)
add_subdirectory(vendor/arbiter)
add_subdirectory(vendor/kazhdan)
if (NOT PDAL_HAVE_JSONCPP)
add_subdirectory(vendor/jsoncpp/dist)
endif()
add_subdirectory(pdal/util)
add_subdirectory(tools)
add_subdirectory(apps)
Expand Down Expand Up @@ -253,9 +255,9 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
${PDAL_VENDOR_DIR}
${PDAL_VENDOR_DIR}/eigen
${PDAL_VENDOR_DIR}/pdalboost
${PDAL_JSONCPP_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${ZSTD_INCLUDE_DIRS}
${NLOHMANN_INCLUDE_DIR}
PUBLIC
${GDAL_INCLUDE_DIR}
${LASZIP_INCLUDE_DIR}
Expand All @@ -275,6 +277,7 @@ target_link_libraries(${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${PDAL_ARBITER_LIB_NAME}
${PDAL_KAZHDAN_LIB_NAME}
${PDAL_JSONCPP_LIB_NAME}
INTERFACE
${PDAL_LIBDIR}
)
Expand Down
102 changes: 102 additions & 0 deletions RELEASENOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,46 @@ Enhancements
``spatialreference`` option. ``default_srs`` applies only if no
spatial reference exists in the source file. (#2194, #2195)
- Added some dimension detection capability to ``readers.pts``. (#2317)
- Hardened API use of LASzip in ``writers.las`` for points with data
format 6 and above and set the extended_point_type variable. (#2320,
#2329)
- .. rubric:: Changes of Note
:name: changes-of-note-1

- PDAL now requires at least version 2.2 of GDAL.
- Pipelines can optionally be specified as an array of stages (without
an encapsulating “pipeline” object).
- The location of installed cmake files has been changed to match the
cmake convention.
- ``filters.delaunay`` now uses the delaunator library instead of
geogram.
- PDAL no longer depends on the GEOS library. However, some polygon
functions will not work if PDAL isn’t built with a version of the
GDAL library that has GEOS support.
- PDAL now uses the standard cmake script to locate the necessary GDAL
files when building.
- ``readers.sbet`` now reads angles as degrees rather than radians.
(#2354)
- The ``tindex`` command now requires one of the subcommands ``create``
or ``merge``. It no longer accepts the ``merge`` option, which has
been replaced by the ``merge`` subcommand.
- The argument for the function ``PipelineManager::executeStream`` is
now of type ``StreamPointTable&`` instead of ``FixedPointTable&``.

.. _enhancements-1:

Enhancements
============

- All readers now accept the ``default_srs`` and ``override_srs``
options. ``override_srs`` is an alias for the existing
``spatialreference`` option. ``default_srs`` applies only if no
spatial reference exists in the source file. (#2194, #2195)
- Added some dimension detection capability to ``readers.pts``. (#2317)
- The build system now has enhanced conflict detection of mixed python
2/3 installations. Make sure that you have header
files/libraries/interpreter/numpy support for either python 2 or
python 3.
- Hardened API use of LASzip in ``writers.las`` for points with data
format 6 and above and set the extended_point_type variable. (#2320,
#2329)
Expand Down Expand Up @@ -91,7 +131,69 @@ Bug fixes
a crash in some circumstances.
- Generalized the python library re-loaded by PDAL when being used as a
python extension. This is only relevant on some Unix distributions.
- Support the ``libgeotiff`` path suffix when searching for the geotiff
library with cmake.
- Added a ``resolution`` option to ``readers.ept`` to limit the number
of points read. (#2331)
- ``readers.rxp`` now supports stream mode.
- Added the ``invert`` option to ``filters.head`` and ``filters.tail``.
- Added support for subcommands in kernels. (#2293)
- Fixed a bug in ``writers.gdal`` that might access invalid memory in
some situations. (#2448)

.. _new-stages-1:

New stages
==========

- ``filters.mongo`` - Filtering of points using the mongo expression
language.
- ``readers.tiledb`` - Reads points from the tileDB database.
- ``writers.tiledb`` - Writes points to the tileDB database.
- ``writers.ept_addon`` - Adds sidecar data to an existing EPT dataset.

.. _deprecated-stages-1:

Deprecated stages
=================

- ``filters.kdistance`` - Replaced by ``filters.nndistance``.
``filters.kdistance`` will be removed in the next PDAL release.
- ``filters.mongus`` - Replaces by ``filters.pmf`` and ``filters.smrf``

.. _bug-fixes-1:

Bug fixes
=========

- The tindex command now uses sufficient precision when using the
``fast_boundary`` option (#2271)
- ``filters.smrf`` and ``filters.pmf`` now process all points if the
``NumberOfReturns`` or ``ReturnNumber`` dimension is missing. This
fixes a regression introduced with PDAL 1.8. (#2275)
- The density command is now found by pdal. This fixes a regression
introduced with PDAL 1.8. (#2378)
- The ``scale=auto`` and ``offset=auto`` options now work with
``writers.bpf`` in stream mode. (#1983)
- Pipelines with diamond shapes now properly re-execute ancestor
stages. This fixes a regression introduced with PDAL 1.8. (#2290)
- ``filters.crop`` now uses the correct logic when the ``outside``
option is used in standard mode. (#2305)
- A bug in ``writers.gdal`` with streaming mode that caused an improper
location shift in some instances has been fixed. (#2292)
- Added an explicit dependency on the arbiter library for curl. This
fixes build issues on some Unix platforms. (#1822)
- Fixed a bug in ``filters.icp`` introduced by a change in PCL (see:
https://github.com/PointCloudLibrary/pcl/issues/2724) that improperly
removed a function call. (#2319)
- ``readers.tindex`` now provides a default of “EPSG:4326” for the
``filter_srs`` option. (#2316)
- Points in buffer corners are now properly placed in tiles in
``filters.splitter``. (#2372)
- Fixed reference counting in ``filters.python`` that might have caused
a crash in some circumstances.
- Generalized the python library re-loaded by PDAL when being used as a
python extension. This is only relevant on some Unix distributions.
================================================================================
1.8.0
================================================================================
Expand Down
3 changes: 2 additions & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ target_link_libraries(${PDAL_APP}
PRIVATE
${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${PDAL_JSONCPP_LIB_NAME}
${GDAL_LIBRARY}
${WINSOCK_LIBRARY}
)
target_include_directories(${PDAL_APP} PRIVATE
${NLOHMANN_INCLUDE_DIR}
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${PROJECT_BINARY_DIR}/include)
Expand Down
50 changes: 23 additions & 27 deletions apps/pdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include <string>
#include <vector>

#include <nlohmann/json.hpp>
#include <json/json.h>

#ifndef _WIN32
#include <csignal>
Expand Down Expand Up @@ -160,19 +160,18 @@ void App::outputDrivers()
}
else
{
NL::json j;
Json::Value array(Json::arrayValue);
for (auto name : stages)
{
std::string description = PluginManager<Stage>::description(name);
std::string link = PluginManager<Stage>::link(name);
j.push_back(
{ {"name", name},
{"description", description},
{"link", link}
}
);
Json::Value node(Json::objectValue);
node["name"] = name;
node["description"] = description;
node["link"] = link;
array.append(node);
}
m_out << j;
m_out << array;
}
}

Expand Down Expand Up @@ -218,16 +217,15 @@ void App::outputOptions(std::string const& stageName, std::ostream& strm)
{
std::ostringstream ostr;
args.dump3(ostr);
std::string json = ostr.str();

NL::json array;
try
{
array = NL::json::parse(ostr.str());
}
catch (NL::json::parse_error)
{}
Json::Reader jsonReader;
Json::Value array;
Json::Value object(Json::objectValue);
jsonReader.parse(json, array);

object[stageName] = array;

NL::json object = { stageName, array };
strm << object;
}
}
Expand All @@ -250,19 +248,17 @@ void App::outputOptions()
}
else
{
std::stringstream strm;
NL::json options;
std::ostringstream strm;
Json::Value options (Json::arrayValue);
for (auto const& n : nv)
{
outputOptions(n, strm);
NL::json j;
try
{
strm >> j;
}
catch (NL::json::parse_error&)
{}
options.push_back(j);
std::string json(strm.str());
Json::Reader jsonReader;
Json::Value array;
jsonReader.parse(json, array);
options.append(array);

strm.str("");
}
m_out << options;
Expand Down
2 changes: 1 addition & 1 deletion cmake/arbiter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

include(${PDAL_CMAKE_DIR}/curl.cmake)

set(PDAL_ARBITER_ENABLED 0)
if (CURL_FOUND)
set(PDAL_ARBITER_ENABLED 1)
set(PDAL_ARBITER_LIB_NAME pdal_arbiter)
endif()

26 changes: 26 additions & 0 deletions cmake/json.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
get_property(EXISTS GLOBAL PROPERTY _JSONCPP_INCLUDED)
if(EXISTS)
return()
endif()

find_package(JSONCPP 1.6.2)
set_package_properties(JSONCPP PROPERTIES TYPE OPTIONAL)

if (JSONCPP_FOUND)
set_package_properties(JSONCPP PROPERTIES TYPE OPTIONAL)
mark_as_advanced(CLEAR JSONCPP_INCLUDE_DIR)
mark_as_advanced(CLEAR JSONCPP_LIBRARY)
include_directories(${JSONCPP_INCLUDE_DIR})
set(PDAL_JSONCPP_LIB_NAME ${JSONCPP_LIBRARY})
set(PDAL_JSONCPP_INCLUDE_DIR ${JSONCPP_INCLUDE_DIR})
set(PDAL_HAVE_JSONCPP 1)
else()
unset(JSONCPP_INCLUDE_DIR CACHE)
unset(JSONCPP_LIBRARY CACHE)
unset(JSONCPP_ROOT_DIR CACHE)
set(PDAL_JSONCPP_LIB_NAME pdal_jsoncpp)
set(PDAL_JSONCPP_INCLUDE_DIR ${PDAL_VENDOR_DIR}/jsoncpp/dist)
set(PDAL_JSONCPP_SRC ${PDAL_JSONCPP_INCLUDE_DIR}/jsoncpp.cpp)
endif()

set_property(GLOBAL PROPERTY _JSONCPP_INCLUDED TRUE)

0 comments on commit 1326042

Please sign in to comment.