Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into issue-3242
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Apr 5, 2021
2 parents fcb6a50 + db3e98b commit d57ca34
Show file tree
Hide file tree
Showing 101 changed files with 4,471 additions and 887 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,30 @@ on: [push, pull_request, workflow_dispatch]
jobs:
containers:
runs-on: ubuntu-latest
env:
PUSH_PACKAGES: ${{ github.repository_owner == 'PDAL' }}
steps:
- uses: actions/checkout@v2
- name: Lint
id: lint
run: |
echo "are we pushing packages" ${{ env.PUSH_PACKAGES }}
echo "event_name" ${{ github.event_name }}
echo "ref" ${{ github.ref }}
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
- name: Login to GitHub Container Registry
- if: ${{ env.PUSH_PACKAGES == 'true' }}
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Docker Hub
- if: ${{ env.PUSH_PACKAGES == 'true' }}
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -37,7 +47,7 @@ jobs:
- name: Build image
uses: docker/build-push-action@v2
with:
push: true
push: ${{ env.PUSH_PACKAGES == 'true' }}
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./scripts/docker/ubuntu/Dockerfile
Expand Down
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

cmake_minimum_required(VERSION 3.5)

project(PDAL VERSION 2.2.0 LANGUAGES CXX C)
project(PDAL VERSION 2.3.0 LANGUAGES CXX C)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)

set(ROOT_DIR "${PROJECT_SOURCE_DIR}")
Expand All @@ -30,7 +30,7 @@ mark_as_advanced(CMAKE_VERBOSE_MAKEFILE)
# Must be changed if there is an ABI change. This builds the SONAME
# that's embedded in the library itself.
#
set(PDAL_SOLIB_MAJOR 11)
set(PDAL_SOLIB_MAJOR 12)
#
# Change if there's a new release with no ABI change
#
Expand All @@ -39,7 +39,7 @@ set(PDAL_SOLIB_MINOR 0)
# Build number. Increment for builds within minor versions. Probably
# always 0 for PDAL
#
set(PDAL_SOLIB_BUILD 0)
set(PDAL_SOLIB_BUILD 1)


set(PDAL_API_VERSION ${PDAL_SOLIB_MAJOR})
Expand Down Expand Up @@ -129,6 +129,7 @@ include(${PDAL_CMAKE_DIR}/gdal.cmake)
include(${PDAL_CMAKE_DIR}/geotiff.cmake) # Optional (not really)
include(${PDAL_CMAKE_DIR}/lazperf.cmake) # Optional
include(${PDAL_CMAKE_DIR}/laszip.cmake) # Optional
include(${PDAL_CMAKE_DIR}/draco.cmake) # Optional
include(${PDAL_CMAKE_DIR}/threads.cmake)
include(${PDAL_CMAKE_DIR}/zlib.cmake)
include(${PDAL_CMAKE_DIR}/lzma.cmake)
Expand Down Expand Up @@ -251,6 +252,7 @@ if (NOT PDAL_HAVE_LAZPERF)
${PDAL_SRC_DIR}/compression/LazPerfVlrCompression.cpp)
list(REMOVE_ITEM SRCS ${LAZPERF_SRCS})
endif()

if (GDAL_VERSION VERSION_LESS 3.0.0)
file(GLOB PROJPIPELINE_FILTER_SRCS
${PDAL_FILTERS_DIR}/ProjPipelineFilter.cpp)
Expand Down
7 changes: 5 additions & 2 deletions apps/pdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ int App::execute(StringList& cmdArgs, LogPtr& log)
catch (arg_val_error const& e)
{
Utils::printError(e.what());
return -1;
return 1;
}

log = Log::makeLog("PDAL", m_log, m_logtiming);
Expand Down Expand Up @@ -371,8 +371,11 @@ int App::execute(StringList& cmdArgs, LogPtr& log)
gdal::unregisterDrivers();
}
else
{
log->get(LogLevel::Error) << "Command '" << m_command <<
"' not recognized" << std::endl << std::endl;
ret = 1;
}
return ret;
}

Expand All @@ -381,7 +384,7 @@ int App::execute(StringList& cmdArgs, LogPtr& log)
if (cmdArgs.size())
{
Utils::printError("Unexpected argument '" + cmdArgs[0] + "'.");
return -1;
return 1;
}

if (m_showVersion)
Expand Down
19 changes: 19 additions & 0 deletions cmake/draco.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
option(WITH_DRACO "Choose if Draco support should be built" TRUE)
find_package(Draco EXACT 1.3.6)

if (WITH_DRACO)
set_package_properties(Draco PROPERTIES TYPE RECOMMENDED
PURPOSE "Provides Draco compression")
if(Draco_FOUND)
include_directories(${draco_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${draco_LIBRARIES})
set(PDAL_HAVE_DRACO 1)
set(BUILD_PLUGIN_DRACO 1)
set(DRACO_LIBRARY "draco")
else()
set(WITH_DRACO FALSE)
endif()
else()
set(WITH_DRACO FALSE)
endif()
3 changes: 3 additions & 0 deletions cmake/execinfo.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#
# Unwind
#
set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
find_package(Libexecinfo QUIET)
set(FPHSA_NAME_MISMATCHED 0)

3 changes: 3 additions & 0 deletions cmake/gtest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ endif()
set(GOOGLETEST_VERSION 1.10.0)
add_subdirectory(vendor/gtest)

set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
find_package(absl QUIET)
set(FPHSA_NAME_MISMATCHED 0)

if (absl_FOUND)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
cmake_policy(SET CMP0079 NEW)
Expand Down
3 changes: 3 additions & 0 deletions cmake/tiledb.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#
# TileDB support
#
set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
find_package(TileDB QUIET 1.4.1 REQUIRED)
set(FPHSA_NAME_MISMATCHED 0)

set_package_properties(TileDB PROPERTIES
TYPE OPTIONAL
URL "https://www.tiledb.io"
Expand Down
4 changes: 4 additions & 0 deletions cmake/unwind.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#
# Unwind
#

set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
find_package(Libunwind QUIET)
set(FPHSA_NAME_MISMATCHED 0)

8 changes: 3 additions & 5 deletions dimbuilder/DimBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ bool DimBuilder::parseArgs(int argc, char *argv[])
}
catch (arg_error& err)
{
std::cerr << err.m_error << "\n";
return false;
throw dimbuilder_error(err.what());
}
return true;
}
Expand All @@ -124,7 +123,7 @@ bool DimBuilder::execute()
std::ifstream in(m_input);

if (!in)
return false;
throw dimbuilder_error("Can't open input file.");

NL::json root;
try
Expand All @@ -133,8 +132,7 @@ bool DimBuilder::execute()
}
catch (NL::json::parse_error& err)
{
std::cerr << err.what() << "\n";
return false;
throw dimbuilder_error(err.what());
}

NL::json dims;
Expand Down
Binary file added doc/_static/logo/pdal-logo-big.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def process_dimensions():


spelling_word_list_filename='spelling_wordlist.txt'
bibtex_bibfiles = ['./stages/references.bib','./workshop/bibliography.bib']


# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/filters.assign.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ that provides for assignment of values to points. The generic expression is:

.. code-block::
"values" : "Dimension = ValueExpression [WHERE ConditionalExpression)]"
"value" : "Dimension = ValueExpression [WHERE ConditionalExpression)]"
``Dimension`` is the name of a PDAL dimension.

Expand Down
105 changes: 105 additions & 0 deletions doc/stages/filters.gpstimeconvert.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
.. _filters.gpstimeconvert:

filters.gpstimeconvert
======================

The **gpstimeconvert** filter converts between three GPS time standards found in
lidar data:

1. GPS time (gt)
2. GPS standard time (gst), also known as GPS adjusted time
3. GPS week seconds (gws)

Since GPS week seconds are ambiguous (they reset to 0 at the start of each new
GPS week), care must be taken when they are the source or destination of a
conversion:

* When converting from GPS week seconds, the GPS week number must be known. This
is accomplished by specifying the start_date_ (in the GMT time zone) on which
the data collection started. The filter will resolve the ambiguity using the
supplied start date.
* When converting from GPS week seconds and the times span a new GPS week, the
presence or absence of week second wrapping must be specified with the
wrapped_ option. Wrapped week seconds reset to 0 at the start of a new week;
unwrapped week seconds are allowed to exceed 604800 (60x60x24x7) seconds.
* When converting to GPS week seconds, the week second wrapping preference
should be specified with the wrap_ option.

.. note::

The filter assumes points are ordered by ascending time, which can be
accomplished by running :ref:`filters.sort` prior to
``filters.gpstimeconvert``. Note that GPS week second times that span a new
GPS week should not be sorted unless they are unwrapped.

Example #1
----------
Convert from GPS time to GPS standard time.

.. code-block:: json
[
"input.las",
{
"type":"filters.gpstimeconvert",
"conversion":"gt2gst"
},
"output.las"
]
Example #2
----------
Convert from GPS standard time to unwrapped GPS week seconds.

.. code-block:: json
[
"input.las",
{
"type":"filters.sort",
"dimension":"GpsTime",
"order":"ASC"
},
{
"type":"filters.gpstimeconvert",
"conversion":"gst2gws",
"wrap":false
}
]
Example #3
----------
Convert from wrapped GPS week seconds to GPS time.

.. code-block:: json
[
"input.las",
{
"type":"filters.gpstimeconvert",
"conversion":"gws2gt",
"start_date":"2020-12-12",
"wrapped":true
},
"output.las"
]
Options
-------

conversion
The time conversion. Must be one of the following: "gst2gt", "gst2gws",
"gt2gst", "gt2gws", "gws2gst", or "gws2gt". [Required]

_`start_date`
When the input times are in GPS week seconds, the date on which the data
collection started must be supplied in the GMT time zone. Must be in
"YYYY-MM-DD" format. [Required for the "gws2gt" and "gws2gst" conversions]

_`wrap`
Whether to output wrapped (true) or unwrapped (false) GPS week seconds.
[Default: false]

_`wrapped`
Specifies whether input GPS week seconds are wrapped (true) or unwrapped
(false). [Default: false]
4 changes: 4 additions & 0 deletions doc/stages/filters.reprojection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,7 @@ out_axis_ordering
An array of numbers that override the axis order for the out_srs.
"2, 1" for example would swap X and Y, which may be commonly needed for
something like "EPSG:4326".

error_on_failure
If true and reprojection of any point fails, throw an exception that terminates
PDAL . [Default: false]

0 comments on commit d57ca34

Please sign in to comment.