From c82521d8077f9b0c745beab48530bc3da4e731d8 Mon Sep 17 00:00:00 2001 From: Craig de Stigter Date: Mon, 14 Oct 2024 12:19:04 +1300 Subject: [PATCH 1/2] Upgrade to PDAL 2.7.2 (from 2.6.0) --- CHANGELOG.md | 5 + .../pdal/arbiter-aws-no-sign-request.patch | 106 ------------------ .../vcpkg-overlay-ports/pdal/portfile.cmake | 3 +- .../vcpkg-overlay-ports/pdal/vcpkg.json | 4 +- 4 files changed, 8 insertions(+), 110 deletions(-) delete mode 100644 vcpkg-vendor/vcpkg-overlay-ports/pdal/arbiter-aws-no-sign-request.patch diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fdae9c0..4b446eaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Please note that compatibility for 0.x releases (software or repositories) isn't _When adding new entries to the changelog, please include issue/PR numbers wherever possible._ + +## Unreleased + +- Upgrade to PDAL 2.7 [#1005](https://github.com/koordinates/kart/pull/1005) + ## 0.15.3 - Replaces minimal patches with delta-filters - a more general-purpose way of filtering parts (inserts, updates, deletes) of JSON diffs when not all parts are required. [#998](https://github.com/koordinates/kart/pull/998) diff --git a/vcpkg-vendor/vcpkg-overlay-ports/pdal/arbiter-aws-no-sign-request.patch b/vcpkg-vendor/vcpkg-overlay-ports/pdal/arbiter-aws-no-sign-request.patch deleted file mode 100644 index b47a1dad..00000000 --- a/vcpkg-vendor/vcpkg-overlay-ports/pdal/arbiter-aws-no-sign-request.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/vendor/arbiter/arbiter.cpp b/vendor/arbiter/arbiter.cpp -index 1ccbfc89e..0a3b7e999 100644 ---- a/vendor/arbiter/arbiter.cpp -+++ b/vendor/arbiter/arbiter.cpp -@@ -1751,6 +1751,11 @@ namespace - else if (auto e = env("ARBITER_VERBOSE")) verbose = *e; - return (!verbose.empty()) && !!std::stol(verbose); - } -+ -+ bool doSignRequests() -+ { -+ return !env("AWS_NO_SIGN_REQUEST"); -+ } - } - - namespace drivers -@@ -1780,9 +1785,7 @@ std::unique_ptr S3::create( - if (auto p = env("AWS_PROFILE")) profile = *p; - } - -- auto auth(Auth::create(s, profile)); -- if (!auth) return std::unique_ptr(); -- -+ auto auth(doSignRequests() ? Auth::create(s, profile) : nullptr); - auto config = makeUnique(s, profile); - return makeUnique(pool, profile, std::move(auth), std::move(config)); - } -@@ -2142,7 +2145,7 @@ std::unique_ptr S3::tryGetSize( - "HEAD", - m_config->region(), - resource, -- m_auth->fields(), -+ authFields(), - query, - headers, - empty); -@@ -2178,7 +2181,7 @@ bool S3::get( - "GET", - m_config->region(), - resource, -- m_auth->fields(), -+ authFields(), - query, - headers, - empty); -@@ -2223,7 +2226,7 @@ std::vector S3::put( - "PUT", - m_config->region(), - resource, -- m_auth->fields(), -+ authFields(), - query, - headers, - data); -@@ -2373,6 +2376,11 @@ std::vector S3::glob(std::string path, bool verbose) const - return results; - } - -+S3::AuthFields S3::authFields() const -+{ -+ return m_auth ? m_auth->fields() : S3::AuthFields(); -+} -+ - S3::ApiV4::ApiV4( - const std::string verb, - const std::string& region, -@@ -2407,6 +2415,8 @@ S3::ApiV4::ApiV4( - m_headers.erase("Expect"); - } - -+ if (!m_authFields) return; -+ - const Headers normalizedHeaders( - std::accumulate( - m_headers.begin(), -diff --git a/vendor/arbiter/arbiter.hpp b/vendor/arbiter/arbiter.hpp -index c1faad41e..802b104f8 100644 ---- a/vendor/arbiter/arbiter.hpp -+++ b/vendor/arbiter/arbiter.hpp -@@ -4321,6 +4321,8 @@ private: - std::string path, - bool verbose) const override; - -+ AuthFields authFields() const; -+ - class ApiV4; - class Resource; - -@@ -4331,7 +4333,7 @@ private: - class S3::AuthFields - { - public: -- AuthFields(std::string access, std::string hidden, std::string token = "") -+ AuthFields(std::string access = "", std::string hidden = "", std::string token = "") - : m_access(access), m_hidden(hidden), m_token(token) - { } - -@@ -4339,6 +4341,8 @@ public: - const std::string& hidden() const { return m_hidden; } - const std::string& token() const { return m_token; } - -+ explicit operator bool() const { return m_access.size() || m_hidden.size() || m_token.size(); } -+ - private: - std::string m_access; - std::string m_hidden; diff --git a/vcpkg-vendor/vcpkg-overlay-ports/pdal/portfile.cmake b/vcpkg-vendor/vcpkg-overlay-ports/pdal/portfile.cmake index 350ab46b..cf507f3f 100644 --- a/vcpkg-vendor/vcpkg-overlay-ports/pdal/portfile.cmake +++ b/vcpkg-vendor/vcpkg-overlay-ports/pdal/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PDAL/PDAL REF "${VERSION}" - SHA512 66390a6fc6f898f7d7aa05d4a6ec428e9c7d2f6f0c835110bde2f6c452fa78fb5bf8e8db954153566bf771323bbb31d6153056659c536126721bf7561e91794f + SHA512 953cb0bc3ab79797352a3f8f4abb25b106d29f4057d7097b536c5b8b75a460da0066038e333581754239848cc9407d5e11c05678fe645b2115a02ea203b5be57 HEAD_REF master PATCHES fix-dependency.patch @@ -12,7 +12,6 @@ vcpkg_from_github( no-pkgconfig-requires.patch no-rpath.patch install-dimbuilder.patch - arbiter-aws-no-sign-request.patch # Merged upstream: https://github.com/connormanning/arbiter/pull/48 ) # Prefer pristine CMake find modules + wrappers and config files from vcpkg. diff --git a/vcpkg-vendor/vcpkg-overlay-ports/pdal/vcpkg.json b/vcpkg-vendor/vcpkg-overlay-ports/pdal/vcpkg.json index c0da5f67..00ee2d1c 100644 --- a/vcpkg-vendor/vcpkg-overlay-ports/pdal/vcpkg.json +++ b/vcpkg-vendor/vcpkg-overlay-ports/pdal/vcpkg.json @@ -1,6 +1,6 @@ { "name": "pdal", - "version": "2.6.0", + "version": "2.7.2", "port-version": 1, "description": "PDAL - Point Data Abstraction Library is a library for manipulating point cloud data.", "homepage": "https://pdal.io/", @@ -111,4 +111,4 @@ ] } } -} +} \ No newline at end of file From 3769760a6f4d05385672dad6cc4f48930d754faf Mon Sep 17 00:00:00 2001 From: Craig de Stigter Date: Mon, 14 Oct 2024 12:55:26 +1300 Subject: [PATCH 2/2] PDAL 2.7: Preserve extra dims in imported COPC --- kart/point_cloud/pdal_convert.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kart/point_cloud/pdal_convert.py b/kart/point_cloud/pdal_convert.py index 9567d3d4..fa156af9 100644 --- a/kart/point_cloud/pdal_convert.py +++ b/kart/point_cloud/pdal_convert.py @@ -23,7 +23,12 @@ def convert_tile_to_copc(source, dest): "type": "readers.las", "filename": str(source), }, - {"type": "writers.copc", "filename": str(dest), "forward": "all"}, + { + "type": "writers.copc", + "filename": str(dest), + "forward": "all", + "extra_dims": "all", + }, ] try: pdal_execute_pipeline(pipeline)