Skip to main content

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

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
├── ci
├── 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]

radius assign

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdal_ign_macro-0.3.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

pdal_ign_macro-0.3.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file pdal_ign_macro-0.3.1.tar.gz.

File metadata

  • Download URL: pdal_ign_macro-0.3.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for pdal_ign_macro-0.3.1.tar.gz
Algorithm Hash digest
SHA256 dc5462f0964031a295668716798d9388969cfdc78d0602eae91bd3cbb8a62132
MD5 6401a053210412e9f9754d96cf44f36b
BLAKE2b-256 116704148c9341c9836c41a3b043545342dbc7111f1880a09107b00235b9387e

See more details on using hashes here.

File details

Details for the file pdal_ign_macro-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pdal_ign_macro-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8af1c09a0192d24e3a459ffdeb88ee415f3fbf8cfd54b7f813d472557a18b491
MD5 18b225abe04c0a4e94fd72b3ce03b93f
BLAKE2b-256 88142af5a6f07515ffc9c7c22dd2235c959808bacd1d47e08080ef6232ac68ac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page