Macros and pipelines for Pdal based on the https://github.com/IGNF/pdal-ign-plugin plugin
Project description
PlugIn IGN for PDAL
Compile
You need to have conda!
Create the ign_pdal_tools conda environment using the environment.yml file
to be able to run the compilation in this environment.
linux/mac
run ci/build.sh
Set the PDAL_DRIVER_PATH environment variable to point to ${THIS REPO}/install/lib
in order for pdal to find the plugins.
Windows
one day, maybe...
Architecture of the code
The code is structured as:
├── src
│ ├── plugin folder
│ │ ├── pluginFilter.cpp
│ │ ├── pluginFilter.h
│ │ ├── CMakeLists.txt
├── doc
│ ├── pluginFilter.md
├── examples # examples of usage of the code or the docker image
├── ci
├── pdal_ign_macro # Python module with ready-to-use filters combinations
│ ├── __init__.py
│ ├── macro.py
│ ├── version.py
│ └── *.py # Example scripts to use the plugin filters + the filters combinations contained in `macro`
├── test
├── CMakeLists.txt
├── environment*.yml
├── Dockerfile
├── pyproject.toml # Setup file to install the `macro` python module with pip
├── .github
└── .gitignore
Run the tests
Each plugin should have his own test. To run all tests:
python -m pytest -s
List of Filters
grid decimation [Deprecated: use the gridDecimation filter from the pdal repository]
Adding a filter
In order to add a filter, you have to add a new folder in the src directory :
├── src
│ ├── filter_my_new_PI
│ │ ├── my_new_PI_Filter.cpp
│ │ ├── my_new_PI_Filter.h
│ │ ├── CMakeLists.txt
The name of the folder informs of the plugIN nature (reader, writer, filter).
The code should respect the documentation proposed by pdal: build a pdal plugin. Be careful to change if the plugIn is a reader, a writer or a filter.
The CMakeList should contain:
file( GLOB_RECURSE GD_SRCS ${CMAKE_SOURCE_DIR} *)
PDAL_CREATE_PLUGIN(
TYPE filter
NAME my_new_PI
VERSION 1.0
SOURCES ${GD_SRCS}
)
install(TARGETS pdal_plugin_filter_my_new_PI)
You should complete the main CMakeList by adding the new plugIN:
add_subdirectory(src/filter_my_new_PI)
Each plugIN has his own md file in the doc directory, structured as the model.
Don't forget to update the list with a link to the documentation.
macro python module usage
The macro python module is installed in the project docker image so that it can be imported from anywhere in the
docker image.
Syntax to use it in a python script
from pdal_ign_macro import macro
marco.my_macro(...)
See the scripts folder for example usages of this module.
Docker
There are two docker files.
- The main Dockerfile use the official pdal version.
- The Dockerfile.pdal permit to use non official version of pdal (the master or a fork for exemple). See the "docker-build-pdal" command in Makefile
Usage from outside the docker image:
If you have a python script on your computer, you can mount its containing folder as a volume in order to run it in the docker image.
Example:
docker run \
-v /my/data/folder:/data \
-v /my/output/folder:/output \
-v /my/script/folder:/scripts \
pdal_ign_plugin \
python /scripts/my_script.py --input /data/my_data_file.las -o /output/my_output.las
Another example can be found in the ./example folder:
Run the following command to run the demo_script python script which copies an input las file into the output folder as a las1.4 file :
./examples/run_custom_script_in_docker_image.sh -i ./test/data/mnx/input/bat.laz -o ./tmp/demo -s ./examples/demo_script.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdal_ign_macro-0.5.0.tar.gz.
File metadata
- Download URL: pdal_ign_macro-0.5.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebfa821a0142e519f7bec2c86682a2542c19005fae6b04b93ba570cec6d508a0
|
|
| MD5 |
054565ef3af7a521e1f2b6cd410c3981
|
|
| BLAKE2b-256 |
cdb5ab20f0a9afc26428533958e1416121f6456e07b56e1588bb74dd0dc1b991
|
Provenance
The following attestation bundles were made for pdal_ign_macro-0.5.0.tar.gz:
Publisher:
cicd_release.yml on IGNF/pdal-ign-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdal_ign_macro-0.5.0.tar.gz -
Subject digest:
ebfa821a0142e519f7bec2c86682a2542c19005fae6b04b93ba570cec6d508a0 - Sigstore transparency entry: 229427963
- Sigstore integration time:
-
Permalink:
IGNF/pdal-ign-plugin@b6b1d7781812b50d7b63d847dff15912ad60c3ef -
Branch / Tag:
refs/tags/v0.5.0_fix_publish_pypi - Owner: https://github.com/IGNF
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cicd_release.yml@b6b1d7781812b50d7b63d847dff15912ad60c3ef -
Trigger Event:
push
-
Statement type:
File details
Details for the file pdal_ign_macro-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pdal_ign_macro-0.5.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
009e1fc06568ccff06258c8aa13e8980e5c5deb0c17bf031fbeef16ac84c0c71
|
|
| MD5 |
e77df95b64ec6fc2e682d077c00dc10d
|
|
| BLAKE2b-256 |
edcf23fc5c8e4c497df68d74e1ed32a3eac1af0aa34f68cc9c94a95f775ab762
|
Provenance
The following attestation bundles were made for pdal_ign_macro-0.5.0-py3-none-any.whl:
Publisher:
cicd_release.yml on IGNF/pdal-ign-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdal_ign_macro-0.5.0-py3-none-any.whl -
Subject digest:
009e1fc06568ccff06258c8aa13e8980e5c5deb0c17bf031fbeef16ac84c0c71 - Sigstore transparency entry: 229427968
- Sigstore integration time:
-
Permalink:
IGNF/pdal-ign-plugin@b6b1d7781812b50d7b63d847dff15912ad60c3ef -
Branch / Tag:
refs/tags/v0.5.0_fix_publish_pypi - Owner: https://github.com/IGNF
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cicd_release.yml@b6b1d7781812b50d7b63d847dff15912ad60c3ef -
Trigger Event:
push
-
Statement type: