Skip to content
Commits on Source (5)
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
BreakBeforeInheritanceComma: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
...
......@@ -106,6 +106,7 @@ test/unit/TestConfig.hpp
test/data/bpf/bpf.xml
test/data/bpf/bpf2nitf.xml
test/data/ept/addon/*
test/data/filters/attribute.xml
test/data/filters/chip.xml
test/data/filters/chipper.xml
......@@ -164,6 +165,7 @@ test/data/qfit/little-endian-conversion.xml
test/data/qfit/pipeline.xml
test/data/qfit/reader.xml
test/data/sbet/pipeline.xml
test/data/**/*.aux.xml
python/*.egg*
python/build/*
......
# .travis.yml
# Configure Travis CI service for http://github.com/PDAL
# NOTE: The | below in 'after_success' enables YAML block mode so that we
# can maintain newlines and write reasonable shell script.
sudo: required
services: docker
before_install:
- docker pull pdal/dependencies:alpine
- docker pull pdal/alpinebase:latest
script:
- docker run -v $TRAVIS_BUILD_DIR:/pdal -t pdal/dependencies:alpine /bin/sh -c "/pdal/scripts/ci/script.sh"
- docker run -v $TRAVIS_BUILD_DIR:/pdal -t pdal/alpinebase:latest /pdal/scripts/ci/script.sh
after_success:
- echo "secure travis:" "$TRAVIS_SECURE_ENV_VARS"
- sh -c 'if test "$TRAVIS_SECURE_ENV_VARS" = "true" -a "$TRAVIS_BRANCH" = "1.7-maintenance"; then echo "publish website"; ./scripts/ci/build_docs.sh; ./scripts/ci/add_deploy_key.sh; ./scripts/ci/deploy_website.sh $TRAVIS_BUILD_DIR/doc/build /tmp; fi'
after_success: |
if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" &&
"$TRAVIS_BRANCH" == "1.8-maintenance" &&
-n "$encrypted_6a5172b96922_key" ]]
then
cd scripts/ci
./after_success.sh $TRAVIS_BUILD_DIR $encrypted_6a5172b96922_key \
$encrypted_6a5172b96922_iv
fi
notifications:
on_success: always
......
......@@ -28,14 +28,14 @@ mark_as_advanced(CMAKE_VERBOSE_MAKEFILE)
# the next line is the ONLY place in the entire pdal system where
# the version info is hard-coded
set(PDAL_VERSION_STRING "1.8.0" CACHE STRING "PDAL version")
set(PDAL_VERSION_STRING "1.9.0" CACHE STRING "PDAL version")
DISSECT_VERSION()
GET_OS_INFO()
SET_INSTALL_DIRS()
set(PDAL_API_VERSION "7")
set(PDAL_BUILD_VERSION "8.0.0")
set(PDAL_API_VERSION "8")
set(PDAL_BUILD_VERSION "9.0.0")
# Name of C++ library
......@@ -115,7 +115,6 @@ set(PDAL_BUILD_TYPE ${CMAKE_BUILD_TYPE})
#------------------------------------------------------------------------------
include(${PDAL_CMAKE_DIR}/gdal.cmake)
include(${PDAL_CMAKE_DIR}/geos.cmake)
include(${PDAL_CMAKE_DIR}/geotiff.cmake) # Optional (not really)
include(${PDAL_CMAKE_DIR}/lazperf.cmake) # Optional
include(${PDAL_CMAKE_DIR}/laszip.cmake) # Optional
......@@ -259,7 +258,7 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
${PDAL_JSONCPP_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${ZSTD_INCLUDE_DIRS}
INTERFACE
PUBLIC
${GDAL_INCLUDE_DIR}
${LASZIP_INCLUDE_DIR}
)
......@@ -267,14 +266,12 @@ target_link_libraries(${PDAL_BASE_LIB_NAME}
PRIVATE
${CMAKE_THREAD_LIBS_INIT}
${GDAL_LIBRARY}
${GEOS_LIBRARY}
${GEOTIFF_LIBRARY}
${LASZIP_LIBRARY}
${LIBXML2_LIBRARIES}
${ZLIB_LIBRARIES}
${LIBLZMA_LIBRARIES}
${ZSTD_LIBRARIES}
${CURL_LIBRARIES}
${WINSOCK_LIBRARY}
${PDAL_REEXPORT}
${PDAL_UTIL_LIB_NAME}
......@@ -379,10 +376,9 @@ install(
EXPORT
PDALTargets
DESTINATION
"${PDAL_LIB_INSTALL_DIR}/pdal/cmake")
"${PDAL_LIB_INSTALL_DIR}/cmake/PDAL")
include(${PDAL_CMAKE_DIR}/config.cmake)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES)
export(PACKAGE PDAL)
# TODO: move under scripts/bash-completion ?
if (WITH_COMPLETION)
......
......@@ -17,7 +17,7 @@ We use Github's [pull requests](https://help.github.com/articles/using-pull-requ
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the [proper format](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
* Make sure you have added the necessary tests for your changes.
* [Run _all_ the tests](http://pdal.io/development/testing.html) to assure nothing else was accidentally broken.
* [Run _all_ the tests](https://pdal.io/project/testing.html) to assure nothing else was accidentally broken.
## Submitting Changes
......@@ -35,7 +35,7 @@ Fixes #123.
## Additional Resources
* [PDAL's coding conventions](http://pdal.io/development/conventions.html)
* [PDAL's coding conventions](https://pdal.io/project/conventions.html)
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
* #pdal IRC channel on freenode.org
......
This diff is collapsed.
This diff is collapsed.
PDAL
====
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2556738.svg)](https://doi.org/10.5281/zenodo.2556738)
[![Join the chat at https://gitter.im/PDAL/PDAL](https://badges.gitter.im/PDAL/PDAL.svg)](https://gitter.im/PDAL/PDAL?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/PDAL/PDAL.png?branch=master)](https://travis-ci.org/PDAL/PDAL)
......
================================================================================
1.9.0
================================================================================
Changes of Note
===============
- 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
============
- 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)
- 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)
- 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)
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
=================
- ``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
=========
- 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
================================================================================
......
......@@ -28,6 +28,7 @@ target_link_libraries(${PDAL_APP}
target_include_directories(${PDAL_APP} PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${PROJECT_BINARY_DIR}/include)
#------------------------------------------------------------------------------
......@@ -54,9 +55,7 @@ if(LIBXML2_FOUND)
"${PDAL_INCLUDE_DEFINITIONS} -I${LIBXML2_INCLUDE_DIR}")
endif()
set(PKGCONFIG_LIBRARY_DEFINITIONS "${PKGCONFIG_LIBRARY_DEFINITIONS} geos")
set(PDAL_INCLUDE_DEFINITIONS
"${PDAL_INCLUDE_DEFINITIONS} -I${GEOS_INCLUDE_DIR}")
set(PDAL_INCLUDE_DEFINITIONS ${PDAL_INCLUDE_DEFINITIONS})
if (LASZIP_FOUND)
set(PDAL_INCLUDE_DEFINITIONS
......
......@@ -4,18 +4,15 @@ os: Visual Studio 2015
platform: x64
configuration: Release
configuration:
- Testing
- Conda
matrix:
fast_finish: true
environment:
OSGEO4W_ROOT: C:\\OSGeo4W64
matrix:
- PDAL_OPTIONAL_COMPONENTS: ON
# Should speed up repository cloning
#
shallow_clone: true
clone_depth: 5
......@@ -25,41 +22,34 @@ clone_depth: 5
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
cache:
C:\Miniconda3-x64\pkgs -> appveyor.yml
install:
# make a temp directory for downloading osgeo4w-setup.exe
# this may not matter as much if part of the install step, as pdal has
# already been cloned, otherwise git would complain about a non-empty
# directory
- ps: mkdir C:\temp | out-null
- ps: mkdir $env:OSGEO4W_ROOT | out-null
# make an install directory for packacing
# get the OSGeo installer
- ps: (new-object net.webclient).DownloadFile("http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe", "C:\temp\osgeo4w-setup.exe")
# and install our dependencies
- C:\temp\osgeo4w-setup.exe -q -k -r -A -s http://download.osgeo.org/osgeo4w/ -a x86_64 -P eigen,gdal,geos,hexer,iconv,laszip,libgeotiff,libpq,libtiff,libxml2,msys,nitro,laz-perf,proj,zlib,python3-core,python3-devel,python3-numpy,oci,oci-devel,laz-perf,jsoncpp,xz-devel,zstd -R %OSGEO4W_ROOT% > NUL
- 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
- set PATH=%PATH%;C:\Program Files (x86)\CMake\bin
- ps: (new-object net.webclient).DownloadFile("http://curl.haxx.se/ca/cacert.pem", "c:\osgeo4w64\bin\curl-ca-bundle.crt")
- call scripts\\appveyor\\config.cmd
for:
-
matrix:
only:
- configuration: Testing
build_script:
- call scripts\\appveyor\\build.cmd
- call scripts\\appveyor\\test\\build.cmd
test_script:
- call scripts\\appveyor\\test.cmd
- call scripts\\appveyor\\test\\test.cmd
-
matrix:
only:
- configuration: Conda
# We need to install so the artifacts are ready
# for deployment for the OSGeo4W build for all
# other build types, no artifact is made
after_test:
- call scripts\\appveyor\\install.cmd
build_script:
- call scripts\\appveyor\\conda\\build.cmd
artifacts:
- path: pdal-$(APPVEYOR_REPO_COMMIT).tar.bz2
name: pdalosgeo4w
- path: pdal-$(APPVEYOR_REPO_COMMIT)-py37_appveyor.tar.bz2
name: pdalconda
type: file
deploy:
......@@ -70,10 +60,10 @@ deploy:
secret_access_key:
secure: cSqZlsaCxFwXgxJw0BLd7npMFvQk3Vbr74ZPLaBQWLKnOz1cKss9qab1SzSygwkh
on:
branch: 1.7-maintenance
branch: conda-appveyor
bucket: "pdal"
folder: "osgeo4w/"
artifact: pdalosgeo4w
folder: "conda/"
artifact: pdalconda
set_public: true
notifications:
......@@ -86,4 +76,3 @@ notifications:
incoming_webhook:
secure: KxbDvaPmsvNmYpsp0TH3m3hJr7PqQL1sxR8xILBzaF2Lbku03M3mJ/h787TvDGQGX3IlyZtfTP0wvSRqMl4nMmdvDQZoAe8+Gyfc7BOkYIg=
set(INCLUDE_INSTALL_DIR include/ CACHE PATH "include")
set(LIB_INSTALL_DIR lib/ CACHE PATH "lib")
set(LIB_INSTALL_DIR ${PDAL_LIB_INSTALL_DIR} CACHE PATH "lib")
set(SYSCONFIG_INSTALL_DIR etc/pdal/ CACHE PATH "sysconfig")
include(CMakePackageConfigHelpers)
......@@ -7,12 +7,12 @@ include(CMakePackageConfigHelpers)
set(PDAL_CONFIG_INCLUDE_DIRS
"${CMAKE_INSTALL_PREFIX}/include")
set(PDAL_CONFIG_LIBRARY_DIRS
"${CMAKE_INSTALL_PREFIX}/lib")
"${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
configure_package_config_file(
PDALConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/PDALConfig.cmake
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/pdal/cmake
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/PDAL
PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR)
write_basic_package_version_file(
......@@ -23,4 +23,4 @@ write_basic_package_version_file(
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/PDALConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/PDALConfigVersion.cmake
DESTINATION ${LIB_INSTALL_DIR}/pdal/cmake)
DESTINATION ${LIB_INSTALL_DIR}/cmake/PDAL)
......@@ -39,6 +39,7 @@ list(APPEND CPACK_SOURCE_IGNORE_FILES "/doc/presentations/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/doc/_static/logo/dongle/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/cmake/examples/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "pdal_features.hpp$")
list(APPEND CPACK_SOURCE_IGNORE_FILES "package.sh")
list(APPEND CPACK_SOURCE_IGNORE_FILES ".gz2")
list(APPEND CPACK_SOURCE_IGNORE_FILES ".bz2")
......
USR_LOCAL="/usr/local"
USR="/usr"
TIFF_HOME=$USR_LOCAL
LIBXML2_HOME=/usr/local/Cellar/libxml2/2.9.7/
LIBXML2_HOME=/usr/local/Cellar/libxml2/2.9.9_2/
WEBSOCKETPP_HOME=/Users/hobu/dev/git/websocketpp
SQLITE_HOME="/usr/local/opt/sqlite"
SO_EXT=dylib
......@@ -11,7 +11,6 @@ SO_EXT=dylib
ORACLE_HOME=$HOME/oracle
LAZPERF_HOME=$USR_LOCAL
export ORACLE_HOME
MATLAB_HOME=/Applications/MATLAB_R2017b.app
export GDAL_HOME=/usr/local/opt/gdal2
CONFIG="Unix Makefiles"
......@@ -35,15 +34,17 @@ CC=$CC CXX=$CXX cmake -G "$CONFIG" \
-DBUILD_PLUGIN_MBIO=ON \
-DBUILD_PLUGIN_CPD=OFF \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_PCL=ON \
-DBUILD_PLUGIN_PCL=OFF \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_I3S=ON \
-DBUILD_PLUGIN_RDBLIB=OFF \
-DBUILD_PLUGIN_RDBLIB=ON \
-DBUILD_PLUGIN_OPENSCENEGRAPH=OFF \
-DWITH_LAZPERF=ON \
-DWITH_LASZIP=ON \
-DWITH_EXAMPLES=ON \
-Drdb_DIR=/Users/hobu/dev/release/riegl/rdblib-2.1.5-x86_64-darwin/interface/cpp \
-DCURL_INCLUDE_DIR=/usr/local/opt/curl/include \
-DCURL_LIBRARY=/usr/local/opt/curl/lib/libcurl.dylib \
-DMRSID_INCLUDE_DIR=/Users/hobu/dev/release/mrsid/Lidar_DSDK/include \
-DMRSID_LIBRARY=/Users/hobu/dev/release/mrsid/Lidar_DSDK/lib/liblti_lidar_dsdk.dylib \
-DLIBXML2_INCLUDE_DIR=${LIBXML2_HOME}/include/libxml2 \
......@@ -51,9 +52,9 @@ CC=$CC CXX=$CXX cmake -G "$CONFIG" \
-DLazperf_DIR=${LAZPERF_HOME}/ \
-DSQLITE3_INCLUDE_DIR=${SQLITE_HOME}/include \
-DSQLITE3_LIBRARY=${SQLITE_HOME}/lib/libsqlite3.${SO_EXT} \
-DPYTHON_EXECUTABLE=/usr/local/bin/python2 \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ \
-DPYTHON_EXECUTABLE=python \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/\
-DOCI_CONNECTION="lidar/lidar@localhost:1521/xe.oracle.docker" \
-DPGPOINTCLOUD_TEST_DB_HOST="localhost"
# -DBUILD_PLUGIN_MATLAB=ON \
......
#
# GDAL/OGR support (required)
#
find_package(GDAL 1.9.0)
find_package(GDAL 2.2.0)
set_package_properties(GDAL PROPERTIES TYPE REQUIRED
PURPOSE "Provides general purpose raster, vector, and reference system support")
if (GDAL_FOUND)
include_directories("${GDAL_INCLUDE_DIR}")
mark_as_advanced(CLEAR GDAL_INCLUDE_DIR)
mark_as_advanced(CLEAR GDAL_LIBRARY)
else()
......
#
# GEOS (required)
#
find_package(GEOS QUIET 3.3)
set_package_properties(GEOS PROPERTIES TYPE REQUIRED
PURPOSE "Provides general purpose geometry support")
include_directories("${GEOS_INCLUDE_DIR}")
......@@ -9,6 +9,9 @@ if(HDF5_FOUND)
set(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_DIRS})
endif()
include_directories(${HDF5_INCLUDE_DIR})
if (WIN32)
add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB=1)
endif()
add_definitions(-DHAVE_HDF5=1)
set(PDAL_HAVE_HDF5 1)
endif()
......@@ -107,6 +107,7 @@ endmacro(PDAL_ADD_EXECUTABLE)
# ARGN :
# FILES the source files for the plugin
# LINK_WITH link plugin with libraries
# INCLUDES header directories
#
# The "generate_dimension_hpp" ensures that Dimension.hpp is built before
# attempting to build anything else in the "library".
......@@ -116,7 +117,7 @@ endmacro(PDAL_ADD_EXECUTABLE)
macro(PDAL_ADD_PLUGIN _name _type _shortname)
set(options)
set(oneValueArgs)
set(multiValueArgs FILES LINK_WITH)
set(multiValueArgs FILES LINK_WITH INCLUDES)
cmake_parse_arguments(PDAL_ADD_PLUGIN "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
if(WIN32)
......@@ -133,7 +134,9 @@ macro(PDAL_ADD_PLUGIN _name _type _shortname)
pdal_target_compile_settings(${${_name}})
target_include_directories(${${_name}} PRIVATE
${PROJECT_BINARY_DIR}/include
${PDAL_INCLUDE_DIR})
${PDAL_INCLUDE_DIR}
${PDAL_ADD_PLUGIN_INCLUDES}
)
target_link_libraries(${${_name}}
PRIVATE
${PDAL_BASE_LIB_NAME}
......@@ -164,10 +167,12 @@ endmacro(PDAL_ADD_PLUGIN)
# ARGN :
# FILES the source files for the test
# LINK_WITH link test executable with libraries
# INCLUDES header file directories
#
macro(PDAL_ADD_TEST _name)
set(options)
set(oneValueArgs)
set(multiValueArgs FILES LINK_WITH)
set(multiValueArgs FILES LINK_WITH INCLUDES)
cmake_parse_arguments(PDAL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (WIN32)
list(APPEND ${PDAL_ADD_TEST_FILES} ${PDAL_TARGET_OBJECTS})
......@@ -179,6 +184,7 @@ macro(PDAL_ADD_TEST _name)
target_include_directories(${_name} PRIVATE
${ROOT_DIR}
${PDAL_INCLUDE_DIR}
${PDAL_ADD_TEST_INCLUDES}
${PROJECT_SOURCE_DIR}/test/unit
${PROJECT_BINARY_DIR}/test/unit
${PROJECT_BINARY_DIR}/include)
......
###############################################################################
# CMake macro to find GDAL library.
#
# On success, the macro sets the following variables:
# GDAL_FOUND = if the library found
# GDAL_LIBRARY = full path to the library
# GDAL_INCLUDE_DIR = where to find the library headers
#
# On Unix, macro sets also:
# GDAL_VERSION_STRING = human-readable string containing version of the library
#
# Author of original: Magnus Homann (Quantum GIS)
# Modifications: Mateusz Loskot <mateusz@loskot.net>
#
###############################################################################
# Computes the realtionship between two version strings. A version
# string is a number delineated by '.'s such as 1.3.2 and 0.99.9.1.
# You can feed version strings with different number of dot versions,
# and the shorter version number will be padded with zeros: 9.2 <
# 9.2.1 will actually compare 9.2.0 < 9.2.1.
#
# Input: a_in - value, not variable
# b_in - value, not variable
# result_out - variable with value:
# -1 : a_in < b_in
# 0 : a_in == b_in
# 1 : a_in > b_in
#
# Written by James Bigler.
MACRO(COMPARE_VERSION_STRINGS a_in b_in result_out)
# Since SEPARATE_ARGUMENTS using ' ' as the separation token,
# replace '.' with ' ' to allow easy tokenization of the string.
STRING(REPLACE "." " " a ${a_in})
STRING(REPLACE "." " " b ${b_in})
SEPARATE_ARGUMENTS(a)
SEPARATE_ARGUMENTS(b)
# Check the size of each list to see if they are equal.
LIST(LENGTH a a_length)
LIST(LENGTH b b_length)
# Pad the shorter list with zeros.
# Note that range needs to be one less than the length as the for
# loop is inclusive (silly CMake).
IF(a_length LESS b_length)
# a is shorter
SET(shorter a)
MATH(EXPR range "${b_length} - 1")
MATH(EXPR pad_range "${b_length} - ${a_length} - 1")
ELSE(a_length LESS b_length)
# b is shorter
SET(shorter b)
MATH(EXPR range "${a_length} - 1")
MATH(EXPR pad_range "${a_length} - ${b_length} - 1")
ENDIF(a_length LESS b_length)
# PAD out if we need to
IF(NOT pad_range LESS 0)
FOREACH(pad RANGE ${pad_range})
# Since shorter is an alias for b, we need to get to it by by dereferencing shorter.
LIST(APPEND ${shorter} 0)
ENDFOREACH(pad RANGE ${pad_range})
ENDIF(NOT pad_range LESS 0)
SET(result 0)
FOREACH(index RANGE ${range})
IF(result EQUAL 0)
# Only continue to compare things as long as they are equal
LIST(GET a ${index} a_version)
LIST(GET b ${index} b_version)
# LESS
IF(a_version LESS b_version)
SET(result -1)
ENDIF(a_version LESS b_version)
# GREATER
IF(a_version GREATER b_version)
SET(result 1)
ENDIF(a_version GREATER b_version)
ENDIF(result EQUAL 0)
ENDFOREACH(index)
# Copy out the return result
SET(${result_out} ${result})
ENDMACRO(COMPARE_VERSION_STRINGS)
set (GDAL_VERSION_COUNT 3)
SET(GDAL_NAMES gdal)
IF(WIN32)
SET(OSGEO4W_IMPORT_LIBRARY gdal_i)
IF(DEFINED ENV{OSGEO4W_HOME})
SET(OSGEO4W_INCLUDE_DIR $ENV{OSGEO4W_ROOT}/include)
SET(OSGEO4W_LIB_DIR $ENV{OSGEO4W_ROOT}/lib)
ENDIF()
IF(MINGW)
FIND_PATH(GDAL_INCLUDE_DIR
gdal.h
PATH_PREFIXES gdal gdal-1.6
PATHS
/usr/local/include
/usr/include
c:/msys/local/include
${OSGEO4W_INCLUDE_DIR})
FIND_LIBRARY(GDAL_LIBRARY
NAMES ${GDAL_NAMES}
PATH_PREFIXES gdal gdal-1.6
PATHS
/usr/local/lib
/usr/lib
c:/msys/local/lib
${OSGEO4W_LIB_DIR})
ENDIF(MINGW)
IF(MSVC)
FIND_PATH(GDAL_INCLUDE_DIR
NAMES gdal.h
PATH_PREFIXES gdal
PATHS
"${OSGEO4W_INCLUDE_DIR}"
"$ENV{LIB_DIR}/include/gdal")
SET(GDAL_NAMES ${OSGEO4W_IMPORT_LIBRARY} ${GDAL_NAMES})
FIND_LIBRARY(GDAL_LIBRARY
NAMES ${GDAL_NAMES}
PATH_PREFIXES gdal
PATHS
"$ENV{LIB_DIR}/lib"
/usr/lib
c:/msys/local/lib
"${OSGEO4W_LIB_DIR}")
IF(GDAL_LIBRARY)
SET(GDAL_LIBRARY;odbc32;odbccp32 CACHE STRING INTERNAL)
ENDIF()
ENDIF(MSVC)
ELSEIF(UNIX)
# Try to use framework on Mac OS X
IF(APPLE)
SET(GDAL_MAC_PATH /Library/Frameworks/GDAL.framework/unix/bin)
ENDIF()
# Try to use GDAL_HOME location if specified
IF(DEFINED ENV{GDAL_HOME})
SET(GDAL_CONFIG_PREFER_PATH
"$ENV{GDAL_HOME}/bin" CACHE STRING "Search for gdal-config program in preferred location")
ENDIF()
# Try to use OSGeo4W installation
IF(DEFINED ENV{OSGEO4W_HOME})
SET(GDAL_CONFIG_PREFER_OSGEO4W_PATH
"$ENV{OSGEO4W_HOME}/bin" CACHE STRING "Search for gdal-config program provided by OSGeo4W")
ENDIF()
# Try to use FWTools installation
IF(DEFINED ENV{FWTOOLS_HOME})
SET(GDAL_CONFIG_PREFER_FWTOOLS_PATH
"$ENV{FWTOOLS_HOME}/bin_safe" CACHE STRING "Search for gdal-config program provided by FWTools")
ENDIF()
FIND_PROGRAM(GDAL_CONFIG gdal-config
HINTS
${GDAL_CONFIG_PREFER_PATH}
${GDAL_CONFIG_PREFER_OSGEO4W_PATH}
${GDAL_MAC_PATH}
/usr/local/bin/
/usr/bin/)
IF(GDAL_CONFIG)
# TODO: Replace the regex hacks with CMake version comparison feature:
# if(version1 VERSION_LESS version2)
# Extract GDAL version
EXEC_PROGRAM(${GDAL_CONFIG} ARGS --version OUTPUT_VARIABLE GDAL_VERSION_STATED)
SET(GDAL_VERSION_STRING "${GDAL_VERSION_STATED}" CACHE STRING "Version of GDAL package found")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION_STATED}")
STRING(REGEX REPLACE "([0-9]+)\\.(/^\\d{1,2}$/)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION_STATED}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" GDAL_VERSION_PATCH "${GDAL_VERSION_STATED}")
# Check for GDAL version
if (GDAL_FIND_VERSION)
COMPARE_VERSION_STRINGS( "${GDAL_VERSION_STATED}" "${GDAL_FIND_VERSION}" version_result)
IF (version_result LESS 0)
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION_STATED}). Use ${GDAL_FIND_VERSION} or higher requested.")
ENDIF()
set (GDAL_VERSION_STRING ${GDAL_VERSION_STATED})
set (GDAL_VERSION_COMPATIBLE true)
endif()
set (GDAL_FOUND TRUE)
# Set INCLUDE_DIR to prefix+include
EXEC_PROGRAM(${GDAL_CONFIG} ARGS --prefix OUTPUT_VARIABLE GDAL_PREFIX)
FIND_PATH(GDAL_INCLUDE_DIR
gdal.h
PATH_PREFIXES gdal
HINTS
${GDAL_PREFIX}/include/gdal
${GDAL_PREFIX}/include
/usr/local/include
/usr/include)
# Extract link dirs for rpath
EXEC_PROGRAM(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
# Split off the link dirs (for rpath)
# Use regular expression to match wildcard equivalent "-L*<endchar>"
# with <endchar> is a space or a semicolon
STRING(REGEX MATCHALL "[-][L]([^ ;])+" GDAL_LINK_DIRECTORIES_WITH_PREFIX "${GDAL_CONFIG_LIBS}")
#MESSAGE("DBG GDAL_LINK_DIRECTORIES_WITH_PREFIX=${GDAL_LINK_DIRECTORIES_WITH_PREFIX}")
# Remove prefix -L because we need the pure directory for LINK_DIRECTORIES
IF(GDAL_LINK_DIRECTORIES_WITH_PREFIX)
STRING(REGEX REPLACE "[-][L]" "" GDAL_LINK_DIRECTORIES "${GDAL_LINK_DIRECTORIES_WITH_PREFIX}" )
#MESSAGE("DBG GDAL_LINK_DIRECTORIES ${GDAL_LINK_DIRECTORIES}")
ENDIF()
# Split off the name
# use regular expression to match wildcard equivalent "-l*<endchar>"
# with <endchar> is a space or a semicolon
STRING(REGEX MATCHALL "[-][l]([^ ;])+" GDAL_LIB_NAME_WITH_PREFIX "${GDAL_CONFIG_LIBS}")
# Remove prefix -l because we need the pure name
IF(GDAL_LIB_NAME_WITH_PREFIX)
STRING(REGEX REPLACE "[-][l]" "" GDAL_LIB_NAME ${GDAL_LIB_NAME_WITH_PREFIX})
ENDIF()
IF(APPLE)
SET(GDAL_LIBRARY ${GDAL_LINK_DIRECTORIES}/lib${GDAL_LIB_NAME}.dylib CACHE STRING INTERNAL)
ELSE()
SET(GDAL_LIBRARY ${GDAL_LINK_DIRECTORIES}/lib${GDAL_LIB_NAME}.so CACHE STRING INTERNAL)
ENDIF()
ELSE()
MESSAGE("FindGDAL.cmake: gdal-config not found. Please set it manually: GDAL_CONFIG=${GDAL_CONFIG}")
ENDIF(GDAL_CONFIG)
ELSE()
MESSAGE("FindGDAL.cmake: unrecognized or unsupported operating system (use Unix or Windows)")
ENDIF()
# Handle the QUIETLY and REQUIRED arguments and set GDAL_FOUND to TRUE
# if all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
# Find GEOS
# ~~~~~~~~~
# Copyright (c) 2008, Mateusz Loskot <mateusz@loskot.net>
# (based on FindGDAL.cmake by Magnus Homann)
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# CMake module to search for GEOS library
#
# If it's found it sets GEOS_FOUND to TRUE
# and following variables are set:
# GEOS_INCLUDE_DIR
# GEOS_LIBRARY
#
IF(WIN32)
IF (MINGW)
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h /usr/local/include /usr/include c:/msys/local/include)
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c PATHS /usr/local/lib /usr/lib c:/msys/local/lib)
ENDIF (MINGW)
IF (MSVC)
# Try to use OSGeo4W installation
IF(DEFINED ENV{OSGEO4W_HOME})
SET(OSGEO4W_INCLUDE_DIR $ENV{OSGEO4W_ROOT}/include)
SET(OSGEO4W_LIB_DIR $ENV{OSGEO4W_ROOT}/lib)
ENDIF()
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h
$ENV{LIB_DIR}/include
$ENV{INCLUDE}
${OSGEO4W_INCLUDE_DIR})
FIND_LIBRARY(GEOS_LIBRARY NAMES geos geos_c PATHS
"$ENV{LIB}/lib"
$ENV{LIB}
#mingw
c:/msys/local/lib
${OSGEO4W_LIB_DIR}
)
IF (GEOS_LIBRARY)
SET (
GEOS_LIBRARY
GEOS_LIBRARY;odbc32;odbccp32
CACHE STRING INTERNAL)
ENDIF (GEOS_LIBRARY)
ENDIF (MSVC)
ELSE(WIN32)
IF(UNIX)
# try to use framework on mac
# want clean framework path, not unix compatibility path
IF (APPLE)
IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST"
OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY"
OR NOT CMAKE_FIND_FRAMEWORK)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
FIND_LIBRARY(GEOS_LIBRARY GEOS)
IF (GEOS_LIBRARY)
# they're all the same in a framework
SET (GEOS_INCLUDE_DIR ${GEOS_LIBRARY}/Headers CACHE PATH "Path to a file.")
SET (GEOS_CONFIG ${GEOS_LIBRARY}/Programs/geos-config CACHE FILEPATH "Path to a program.")
ENDIF (GEOS_LIBRARY)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
ENDIF ()
ENDIF (APPLE)
IF (NOT GEOS_INCLUDE_DIR OR NOT GEOS_LIBRARY OR NOT GEOS_CONFIG)
# didn't find OS X framework, and was not set by user
SET(GEOS_CONFIG_PREFER_PATH "$ENV{GEOS_HOME}/bin" CACHE STRING "preferred path to GEOS (geos-config)")
FIND_PROGRAM(GEOS_CONFIG geos-config
${GEOS_CONFIG_PREFER_PATH}
/usr/local/bin/
/usr/bin/
)
#MESSAGE("DBG GEOS_CONFIG ${GEOS_CONFIG}")
IF (GEOS_CONFIG)
EXEC_PROGRAM(${GEOS_CONFIG}
ARGS --version
OUTPUT_VARIABLE GEOS_VERSION)
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GEOS_VERSION_MAJOR "${GEOS_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GEOS_VERSION_MINOR "${GEOS_VERSION}")
IF (GEOS_VERSION_MAJOR LESS 3)
MESSAGE (FATAL_ERROR "GEOS version is too old (${GEOS_VERSION}). Use 3.0.0 or higher.")
ENDIF (GEOS_VERSION_MAJOR LESS 3)
# set INCLUDE_DIR to prefix+include
EXEC_PROGRAM(${GEOS_CONFIG}
ARGS --prefix
OUTPUT_VARIABLE GEOS_PREFIX)
FIND_PATH(GEOS_INCLUDE_DIR
geos_c.h
${GEOS_PREFIX}/include
/usr/local/include
/usr/include
)
## extract link dirs for rpath
EXEC_PROGRAM(${GEOS_CONFIG}
ARGS --libs
OUTPUT_VARIABLE GEOS_CONFIG_LIBS )
## split off the link dirs (for rpath)
## use regular expression to match wildcard equivalent "-L*<endchar>"
## with <endchar> is a space or a semicolon
STRING(REGEX MATCHALL "[-][L]([^ ;])+"
GEOS_LINK_DIRECTORIES_WITH_PREFIX
"${GEOS_CONFIG_LIBS}" )
#MESSAGE("DBG GEOS_LINK_DIRECTORIES_WITH_PREFIX=${GEOS_LINK_DIRECTORIES_WITH_PREFIX}")
## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
IF (GEOS_LINK_DIRECTORIES_WITH_PREFIX)
STRING(REGEX REPLACE "[-][L]" "" GEOS_LINK_DIRECTORIES ${GEOS_LINK_DIRECTORIES_WITH_PREFIX} )
ENDIF (GEOS_LINK_DIRECTORIES_WITH_PREFIX)
### XXX - mloskot: geos-config --libs does not return -lgeos_c, so set it manually
## split off the name
## use regular expression to match wildcard equivalent "-l*<endchar>"
## with <endchar> is a space or a semicolon
#STRING(REGEX MATCHALL "[-][l]([^ ;])+"
# GEOS_LIB_NAME_WITH_PREFIX
# "${GEOS_CONFIG_LIBS}" )
#MESSAGE("DBG GEOS_CONFIG_LIBS=${GEOS_CONFIG_LIBS}")
#MESSAGE("DBG GEOS_LIB_NAME_WITH_PREFIX=${GEOS_LIB_NAME_WITH_PREFIX}")
SET(GEOS_LIB_NAME_WITH_PREFIX -lgeos_c CACHE STRING INTERNAL)
## remove prefix -l because we need the pure name
IF (GEOS_LIB_NAME_WITH_PREFIX)
STRING(REGEX REPLACE "[-][l]" "" GEOS_LIB_NAME ${GEOS_LIB_NAME_WITH_PREFIX} )
ENDIF (GEOS_LIB_NAME_WITH_PREFIX)
#MESSAGE("DBG GEOS_LIB_NAME=${GEOS_LIB_NAME}")
IF (APPLE)
IF (NOT GEOS_LIBRARY)
# work around empty GEOS_LIBRARY left by framework check
# while still preserving user setting if given
# ***FIXME*** need to improve framework check so below not needed
SET(GEOS_LIBRARY ${GEOS_LINK_DIRECTORIES}/lib${GEOS_LIB_NAME}.dylib CACHE STRING INTERNAL FORCE)
ENDIF (NOT GEOS_LIBRARY)
ELSE (APPLE)
SET(GEOS_LIBRARY ${GEOS_LINK_DIRECTORIES}/lib${GEOS_LIB_NAME}.so CACHE STRING INTERNAL)
ENDIF (APPLE)
#MESSAGE("DBG GEOS_LIBRARY=${GEOS_LIBRARY}")
ELSE(GEOS_CONFIG)
MESSAGE("FindGEOS.cmake: geos-config not found. Please set it manually if you would also like it configured. GEOS_CONFIG=${GEOS_CONFIG}")
ENDIF(GEOS_CONFIG)
ENDIF(NOT GEOS_INCLUDE_DIR OR NOT GEOS_LIBRARY OR NOT GEOS_CONFIG)
ENDIF(UNIX)
ENDIF(WIN32)
IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
SET(GEOS_FOUND TRUE)
ENDIF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
if (NOT GEOS_INCLUDE_DIR OR NOT GEOS_LIBRARY)
include(SelectLibraryConfigurations)
select_library_configurations(GEOS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GEOS REQUIRED_VARS GEOS_LIBRARY GEOS_INCLUDE_DIR)
if(GEOS_FOUND)
set(GEOS_INCLUDE_DIRS ${GEOS_INCLUDE_DIR})
if(NOT GEOS_LIBRARIES)
set(GEOS_LIBRARIES ${GEOS_LIBRARY})
endif()
endif()
endif()
IF (GEOS_FOUND)
IF (NOT GEOS_FIND_QUIETLY)
MESSAGE(STATUS "Found GEOS: ${GEOS_LIBRARY}")
ENDIF (NOT GEOS_FIND_QUIETLY)
ELSE (GEOS_FOUND)
message(STATUS "Could not find GEOS")
ENDIF (GEOS_FOUND)