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.0a2.tar.gz (66.3 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.0a2-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: exeqpdal-0.1.0a2.tar.gz
  • Upload date:
  • Size: 66.3 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.0a2.tar.gz
Algorithm Hash digest
SHA256 b8e747bb3f126357364178c2ced21cb2e74186ebf66c27bddef14ea65814df17
MD5 005f3bbaa066dfaa6f6385ad9493872e
BLAKE2b-256 9d6651840609c17f3a928790448af4604ba925edd70096b84ad80d0b1868e063

See more details on using hashes here.

Provenance

The following attestation bundles were made for exeqpdal-0.1.0a2.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.0a2-py3-none-any.whl.

File metadata

  • Download URL: exeqpdal-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 27.4 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.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 06b9df9994b0924dbebee3d115c49bddabe1177c13fd36f91a7c702173f481ba
MD5 5df8904d1b53753106adba8b4c022958
BLAKE2b-256 462ca6dbd61a0da58cc068fdae2f1e94cbf9875ec5f83cf84960c468e094595f

See more details on using hashes here.

Provenance

The following attestation bundles were made for exeqpdal-0.1.0a2-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