Skip to content

Fix issue #201 : add PDAL reader #2014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f1e02cb
copy vdb dir as it
Husamm Feb 18, 2025
6bc28c1
rename the files
Husamm Feb 18, 2025
5e0f7ec
initial enablement
Husamm Feb 23, 2025
73ce036
Fixed review comments
Husamm Feb 25, 2025
9fcd61c
add support for other models
Husamm Mar 4, 2025
7048e05
remove ept and e57
Husamm Mar 10, 2025
878d5ac
first patch of tests
Husamm Mar 14, 2025
d8330f1
more tests
Husamm Mar 15, 2025
23d52c3
remove one test
Husamm Mar 15, 2025
a90c481
Add CI logic
Husamm Mar 18, 2025
70ccd01
syntax fix to configs jsons
Husamm Mar 27, 2025
1b67c16
fixes from CR
Husamm Mar 27, 2025
71b1cac
copy zlib install dep to proj install dep
Husamm Mar 27, 2025
ac3b28f
build proj, as gdal depend on it
Husamm Mar 27, 2025
77b1eb6
install sqllite
Husamm Mar 28, 2025
e3191a5
fix to install sqllite
Husamm Mar 28, 2025
d517c7d
Revert "fix to install sqllite"
Husamm Mar 29, 2025
5b39c7c
Revert "install sqllite"
Husamm Mar 29, 2025
3878a99
Revert "build proj, as gdal depend on it"
Husamm Mar 29, 2025
f626723
Revert "copy zlib install dep to proj install dep"
Husamm Mar 29, 2025
1ab0ccd
disable proj in gdal build
Husamm Mar 29, 2025
ad06471
Revert "disable proj in gdal build"
Husamm Mar 29, 2025
ccfb48b
Reapply "copy zlib install dep to proj install dep"
Husamm Mar 29, 2025
982d1a5
Reapply "build proj, as gdal depend on it"
Husamm Mar 29, 2025
caf5e62
copy zlib to sqlite
Husamm Mar 29, 2025
41a7901
clone and install sqlite
Husamm Mar 29, 2025
8a22ad8
try simplefied action
Husamm Apr 1, 2025
2f783ac
Revert "try simplefied action"
Husamm Apr 1, 2025
168ca03
update proj install
Husamm Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/actions/coverage-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ inputs:
openvdb_version:
description: 'Version of openvdb to build'
required: false
pdal_version:
description: 'Version of PDAL to build'
required: false
usd_version:
description: 'Version of usd to build'
required: false
Expand Down Expand Up @@ -60,6 +63,7 @@ runs:
occt_version: ${{inputs.occt_version}}
openexr_version: ${{inputs.openexr_version}}
openvdb_version: ${{inputs.openvdb_version}}
pdal_version: ${{inputs.pdal_version}}
usd_version: ${{inputs.usd_version}}

- name: Install VTK dependency
Expand All @@ -68,6 +72,7 @@ runs:
vtk_version: ${{inputs.vtk_version}}
raytracing_label: raytracing
openvdb_version: ${{inputs.openvdb_version}}
pdal_version: ${{inputs.pdal_version}}

# coverage build is done in source as it seems to be required for codecov
# CMAKE_MODULE_PATH is required because of
Expand All @@ -83,7 +88,7 @@ runs:
-DBUILD_TESTING=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
-DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/
-DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/:$(pwd)/../dependencies/install/lib/cmake/PDAL/
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/
-DF3D_COVERAGE=ON
-DF3D_MODULE_EXR=ON
Expand All @@ -96,6 +101,7 @@ runs:
-DF3D_PLUGIN_BUILD_OCCT=ON
-DF3D_PLUGIN_BUILD_USD=ON
-DF3D_PLUGIN_BUILD_VDB=ON
-DF3D_PLUGIN_BUILD_PDAL=ON
-DF3D_STRICT_BUILD=ON
-DF3D_TESTING_ENABLE_EGL_TESTS=ON
-DF3D_TESTING_ENABLE_EXTERNAL_GLFW=ON
Expand Down
100 changes: 100 additions & 0 deletions .github/actions/gdal-install-dep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: 'Install GDAL Dependency'
description: 'Install GDAL Dependency using cache when possible'

inputs:
cpu:
description: 'CPU architecture to build for'
required: false
default: 'x86_64'

runs:
using: "composite"
steps:

- name: Cache GDAL
id: cache-gdal
uses: actions/cache/restore@v4
with:
path: dependencies/gdal_install
key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0

# Dependents: pdal, proj
- name: Install SQLite3 dependencies
if: steps.cache-gdal.outputs.cache-hit != 'true'
shell: bash
run: |
if [[ "${{runner.os}}" == "Linux" ]]; then
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev
elif [[ "${{runner.os}}" == "macOS" ]]; then
brew install sqlite
elif [[ "${{runner.os}}" == "Windows" ]]; then
choco install sqlite
fi

- name: Install PROJ Dependency
if: steps.cache-gdal.outputs.cache-hit != 'true'
uses: ./source/.github/actions/proj-install-dep
with:
cpu: ${{ inputs.cpu }}

- name: Checkout GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: OSGeo/gdal
path: './dependencies/gdal'
ref: v3.8.0

- name: Setup GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies
shell: bash
run: |
mkdir gdal_build
mkdir gdal_install

- name: Configure GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies/gdal_build
shell: bash
run: >
cmake ../gdal
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=../gdal_install
-DGDAL_USE_EXTERNAL_LIBS=ON
-DGDAL_ENABLE_DRIVER_GPKG=ON
-DGDAL_ENABLE_DRIVER_TIFF=ON
-DGDAL_ENABLE_DRIVER_NETCDF=OFF
-DGDAL_ENABLE_DRIVER_POSTGIS=OFF
-DGDAL_ENABLE_DRIVER_SHP=ON
-DGDAL_ENABLE_DRIVER_VRT=ON
-DGDAL_ENABLE_DRIVER_PDF=OFF
-DGDAL_ENABLE_DRIVER_OPENJPEG=OFF
-DGDAL_ENABLE_DRIVER_JPEG=ON
-DGDAL_ENABLE_DRIVER_PNG=ON
-DGDAL_USE_ZLIB=ON
-DGDAL_USE_LZMA=ON
-DGDAL_USE_ZSTD=ON
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/
${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }}
${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }}

- name: Build GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies/gdal_build
shell: bash
run: cmake --build . --parallel 2 --target install --config Release

- name: Copy to install
working-directory: ${{github.workspace}}/dependencies/gdal_install
shell: bash
run: cp -r ./* ../install/

- name: Save cache
if: steps.cache-gdal.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-gdal.outputs.cache-primary-key }}
path: dependencies/gdal_install
4 changes: 4 additions & 0 deletions .github/actions/generic-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ inputs:
openvdb_version:
description: 'Version of openvdb to build'
required: false
pdal_version:
description: 'Version of PDAL to build'
required: false
pybind11_version:
description: 'Version of pybind11 to build'
required: false
Expand All @@ -55,6 +58,7 @@ runs:
with:
cpu: ${{inputs.cpu}}
openvdb_version: ${{inputs.openvdb_version}}
pdal_version: ${{inputs.pdal_version}}

- name: Install Raytracing Dependencies
if: inputs.raytracing_label == 'raytracing'
Expand Down
85 changes: 85 additions & 0 deletions .github/actions/pdal-install-dep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: 'Install PDAL Dependency'
description: 'Install PDAL Dependency using cache when possible'
inputs:
cpu:
description: 'CPU architecture to build for'
required: false
default: 'x86_64'
version:
description: 'Version of PDAL to build'
required: true

runs:
using: "composite"
steps:

- name: Check required inputs
shell: bash
run: |
[[ "${{ inputs.version }}" ]] || { echo "version input is empty" ; exit 1; }

- name: Cache PDAL
id: cache-pdal
uses: actions/cache/restore@v4
with:
path: dependencies/pdal_install
key: pdal-${{inputs.version}}-${{runner.os}}-${{inputs.cpu}}-0

# Dependents (not version): vtk
- name: Checkout PDAL
if: steps.cache-pdal.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: PDAL/PDAL
path: './dependencies/pdal'
ref: ${{inputs.version}}

- name: Setup PDAL
if: steps.cache-pdal.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies
shell: bash
run: |
mkdir pdal_build
mkdir pdal_install

- name: Configure PDAL
if: steps.cache-pdal.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies/pdal_build
shell: bash
run: >
cmake ../pdal
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_STANDARD_REQUIRED=ON
-DCMAKE_CXX_EXTENSIONS=OFF
-DCMAKE_INSTALL_LIBDIR:PATH=lib
-DCMAKE_INSTALL_PREFIX=../pdal_install
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/
-DWITH_TESTS=OFF
-DWITH_COMPLETION=OFF
-DWITH_LASZIP=ON
-DWITH_ZSTD=ON
-DWITH_LZMA=ON
-DWITH_GDAL=ON
${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }}
${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }}

- name: Build PDAL
if: steps.cache-pdal.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies/pdal_build
shell: bash
run: cmake --build . --parallel 2 --target install --config Release

- name: Copy to install
working-directory: ${{github.workspace}}/dependencies/pdal_install
shell: bash
run: cp -r ./* ../install/

- name: Save cache
if: steps.cache-pdal.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-pdal.outputs.cache-primary-key }}
path: dependencies/pdal_install
80 changes: 80 additions & 0 deletions .github/actions/proj-install-dep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: 'Install PROJ Dependency'
description: 'Install PROJ Dependency using cache when possible'
inputs:
cpu:
description: 'CPU architecture to build for'
required: false
default: 'x86_64'

runs:
using: "composite"
steps:

- name: Cache PROJ
id: cache-proj
uses: actions/cache/restore@v4
with:
path: dependencies/proj_install
key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1

- name: Install SQLite3 dependencies
if: steps.cache-proj.outputs.cache-hit != 'true'
shell: bash
run: |
if [[ "${{runner.os}}" == "Linux" ]]; then
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev
elif [[ "${{runner.os}}" == "macOS" ]]; then
brew install sqlite
elif [[ "${{runner.os}}" == "Windows" ]]; then
choco install sqlite
fi

# Dependents: gdal
- name: Checkout PROJ
if: steps.cache-proj.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: OSGeo/PROJ
path: './dependencies/proj'
ref: 9.4.0

- name: Setup PROJ
if: steps.cache-proj.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies
shell: bash
run: |
mkdir proj_build
mkdir proj_install

- name: Configure PROJ
if: steps.cache-proj.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies/proj_build
shell: bash
run: >
cmake ../proj
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=../proj_install
-DCMAKE_PREFIX_PATH=$(pwd)/../install
-DBUILD_TESTING=OFF
${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }}
${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }}

- name: Build PROJ
if: steps.cache-proj.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/dependencies/proj_build
shell: bash
run: cmake --build . --parallel 2 --target install --config Release

- name: Copy to install
working-directory: ${{github.workspace}}/dependencies/proj_install
shell: bash
run: cp -r ./* ../install/

- name: Save cache
if: steps.cache-proj.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-proj.outputs.cache-primary-key }}
path: dependencies/proj_install
6 changes: 6 additions & 0 deletions .github/actions/static-analysis-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ inputs:
openvdb_version:
description: 'Version of openvdb to build'
required: true
pdal_version:
description: 'Version of PDAL to build'
required: true
usd_version:
description: 'Version of usd to build'
required: true
Expand Down Expand Up @@ -56,13 +59,15 @@ runs:
occt_version: ${{inputs.occt_version}}
openexr_version: ${{inputs.openexr_version}}
openvdb_version: ${{inputs.openvdb_version}}
pdal_version: ${{inputs.pdal_version}}
usd_version: ${{inputs.usd_version}}

- name: Install VTK dependency
uses: ./source/.github/actions/vtk-install-dep
with:
vtk_version: ${{inputs.vtk_version}}
openvdb_version: ${{inputs.openvdb_version}}
pdal_version: ${{inputs.pdal_version}}

- name: Setup Build Directory
shell: bash
Expand Down Expand Up @@ -91,6 +96,7 @@ runs:
-DF3D_PLUGIN_BUILD_OCCT=ON
-DF3D_PLUGIN_BUILD_USD=ON
-DF3D_PLUGIN_BUILD_VDB=ON
-DF3D_PLUGIN_BUILD_PDAL=ON
-DF3D_STRICT_BUILD=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Expand Down
15 changes: 15 additions & 0 deletions .github/actions/vtk-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
openvdb_version:
description: 'Version of openvdb to build'
required: false
pdal_version:
description: 'Version of PDAL to build'
required: false

runs:
using: "composite"
Expand Down Expand Up @@ -39,9 +42,21 @@ runs:
with:
cpu: ${{inputs.cpu}}

- name: Install GDAL
uses: ./.actions/gdal-install-dep
with:
cpu: ${{inputs.cpu}}

- name: Install OpenVDB
if: inputs.openvdb_version != ''
uses: ./.actions/openvdb-install-dep
with:
cpu: ${{inputs.cpu}}
version: ${{inputs.openvdb_version}}

- name: Install PDAL
if: inputs.pdal_version != ''
uses: ./.actions/pdal-install-dep
with:
cpu: ${{inputs.cpu}}
version: ${{inputs.pdal_version}}
Loading
Loading