Skip to main content

Python API for executing PDAL CLI commands with native syntax support

Project description

exeqpdal

Alpha-stage, typed Python API for driving the PDAL command-line interface (CLI).

exeqpdal focuses on being a reliable subprocess wrapper around the PDAL CLI so that Python projects – including QGIS plugins – can assemble and run PDAL pipelines without shipping C++ bindings. The current release series is 0.1.0a* and is still stabilising APIs and coverage.

Features

  • Pythonic pipelines – build PDAL JSON using Reader, Filter, and Writer factories chained with the | operator, then execute with Pipeline.
  • CLI-first design – no native extensions; every operation delegates to the PDAL executable via subprocess.run.
  • Strict typing – the package ships py.typed, is developed under mypy --strict, and exposes typed factory helpers.
  • Convenience apps – wrappers for PDAL tools such as info, translate, merge, split, tile, and tindex.
  • Broad stage coverage – factories currently expose ~40 readers, 80+ filters, and 25 writers. Coverage is expanding; unsupported drivers can still be addressed through custom JSON.
  • QGIS-friendly – automatic PDAL discovery checks PATH, PDAL_EXECUTABLE, and common QGIS 3.4x Windows installs.

Prerequisites

  • Python 3.12+
  • PDAL CLI installed and accessible (system PATH, PDAL_EXECUTABLE, or detected in QGIS on Windows)

Installation

The first public alpha will be published to PyPI using GitHub Actions. Once the release is live, you can install it directly (include --pre while the project is in alpha):

pip install --pre exeqpdal

Until the package is uploaded, install from a local clone:

# From the project root
pip install -e .

# Or install with development extras
uv pip install -e ".[dev]"

Quick Start

Convert a File

import exeqpdal as pdal

pdal.translate("input.las", "output.laz")

Filter Ground Points

import exeqpdal as pdal

pipeline = (
    pdal.Reader.las("input.las")
    | pdal.Filter.range(limits="Classification[2:2]")
    | pdal.Writer.las("ground_only.las")
)
pipeline.execute()

Get File Information

from exeqpdal import info

info_data = info("input.las", stats=True)
print(info_data)

For more examples, see the examples documentation.

Supported Components

Factory helpers cover the most commonly used PDAL readers, writers, and filters. For the definitive driver reference, consult the PDAL documentation. If a driver is missing, you can still run it by injecting raw dictionaries into a Pipeline.

Error Handling

exeqpdal raises custom exceptions to surface PDAL CLI failures and configuration issues.

import exeqpdal as pdal

try:
    pipeline = pdal.Pipeline(
        pdal.Reader.las("non_existent_file.las") | pdal.Writer.las("output.las")
    )
    pipeline.execute()
except pdal.PipelineError as exc:
    print(f"Pipeline execution failed: {exc}")

Configuration

Custom PDAL Path

If PDAL is not in your system's PATH, you can set the path to the pdal executable manually:

import exeqpdal as pdal

pdal.set_pdal_path("/path/to/your/pdal")

Verbose Output

Enable verbose output to see the PDAL command being executed and its output:

import exeqpdal as pdal

pdal.set_verbose(True)

Project Status & Limitations

  • Pipeline.arrays is not yet implemented – it currently returns an empty list even after execution.
  • Integration tests use six LAZ/COPC test datasets in tests/test_data_laz/ covering various scenarios (filtered/non-filtered data, small/mid/large sizes, LAS/COPC formats). Tests automatically skip when PDAL or test data are unavailable. See tests/test_data_laz/DATASET.md for dataset details.
  • Stage coverage is broad but incomplete. Missing drivers can be added by extending the factory modules or by building custom JSON.

License

exeqpdal is licensed under the MIT License.

This project is a wrapper around the PDAL command-line tool, which is licensed under the BSD license. When using exeqpdal, you are also using PDAL, and you should be aware of its license.

If you are using exeqpdal in a QGIS plugin, you should also be aware of the QGIS license (GPLv2+).

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

exeqpdal-0.1.0a3.tar.gz (66.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exeqpdal-0.1.0a3-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file exeqpdal-0.1.0a3.tar.gz.

File metadata

  • Download URL: exeqpdal-0.1.0a3.tar.gz
  • Upload date:
  • Size: 66.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exeqpdal-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 91d6aa135c1bc9d3d9d24c0dc0d14578cb6e871c307149c2d1059d78f7f03b73
MD5 6627f017c9bb2980db5c398ab051602c
BLAKE2b-256 25fd32fc0539959e05eaeded6a04970c913d8277d67b93cd1c55a265e0a17c33

See more details on using hashes here.

Provenance

The following attestation bundles were made for exeqpdal-0.1.0a3.tar.gz:

Publisher: publish.yml on elgorrion/exeqpdal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exeqpdal-0.1.0a3-py3-none-any.whl.

File metadata

  • Download URL: exeqpdal-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exeqpdal-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 9840cc0633a7d9c87cd06ed05bcdb32ef47cf123c1d9054053b4f613ea96ec71
MD5 ddcb2ea33df825b6e319b263e83b1175
BLAKE2b-256 a50d539d7e70f9452307cd8f6e187eb6cbca1d5376f68a1135a87d682ff0a38d

See more details on using hashes here.

Provenance

The following attestation bundles were made for exeqpdal-0.1.0a3-py3-none-any.whl:

Publisher: publish.yml on elgorrion/exeqpdal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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