CLI tool for visualizing GDALG workflows
Project description
gdalgviz
A Python library to visualise GDAL pipelines.
Installation
Requires graphviz to be installed on the system, and has a dependency on the graphviz Python package.
On Windows:
$GVIZ_PATH = "C:\Program Files\Graphviz\bin"
$env:PATH = "$GVIZ_PATH;$env:PATH"
pip install gdalgviz
gdalgviz --version
Usage
Passing a pipeline as a JSON file (tee.json):
gdalgviz ./examples/tee.json ./examples/tee.svg
Passing a pipeline as a string:
gdalgviz --pipeline "gdal vector pipeline ! read in.tif ! reproject --dst-crs=EPSG:32632 ! select --fields fid,geom" ./examples/pipeline.svg
- Handles both JSON and text input. See JSON Schema
- Supports nested pipelines. These allow sub-pipelines to be run in parallel and merged later.
- Supports tee - the operation is named "tee" because it splits the stream, like the letter "T": one input, multiple outputs, and allows saving of intermediate results
This library does not execute the GDAL pipeline, it only visualizes it. The actual execution of the pipeline is done by GDAL itself.
from osgeo import gdal
gdal.UseExceptions()
with gdal.alg.pipeline(pipeline="read byte.tif ! reproject --dst-crs EPSG:4326 --resampling cubic") as alg:
ds = alg.Output()
Development
pip install -e .[dev]
black .
ruff check . --fix
# mypy .
pytest tests
gdalgviz ./examples/tee.json ./examples/tee.svg
gdalgviz --pipeline "gdal vector pipeline ! read in.tif ! reproject --dst-crs=EPSG:32632 ! select --fields fid,geom" ./examples/pipeline.svg
RoadMap
- Add JSON schema validation
- Add colour coding of the graph depending on if the command is raster, vector etc.
- Add types to the codebase
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 gdalgviz-0.1.0.tar.gz.
File metadata
- Download URL: gdalgviz-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7d138b0e7810f646663a0dcb6835845793451f418524ace22c41700d1983534
|
|
| MD5 |
e6665592746e0b15e87ee4203edfef3f
|
|
| BLAKE2b-256 |
bde5c653aa531e264b045828942fa49a521d742cb155b3e6acca0312f7dc19b1
|
Provenance
The following attestation bundles were made for gdalgviz-0.1.0.tar.gz:
Publisher:
main.yml on geographika/gdalgviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gdalgviz-0.1.0.tar.gz -
Subject digest:
c7d138b0e7810f646663a0dcb6835845793451f418524ace22c41700d1983534 - Sigstore transparency entry: 952524870
- Sigstore integration time:
-
Permalink:
geographika/gdalgviz@3a68061b45c50fa9e234f90a356df6a7717a4143 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/geographika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@3a68061b45c50fa9e234f90a356df6a7717a4143 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gdalgviz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gdalgviz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f582a2dbdb5390bfee57de4a599300ff30f79007c4aed12e9c0620d4022912f
|
|
| MD5 |
091b6c1d68e73c78310d2b92ac9b711c
|
|
| BLAKE2b-256 |
bfd3b1f4abb2ef343caaaf453cb67b7971b4a141b47600a7a7aea5f7f9e549db
|
Provenance
The following attestation bundles were made for gdalgviz-0.1.0-py3-none-any.whl:
Publisher:
main.yml on geographika/gdalgviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gdalgviz-0.1.0-py3-none-any.whl -
Subject digest:
6f582a2dbdb5390bfee57de4a599300ff30f79007c4aed12e9c0620d4022912f - Sigstore transparency entry: 952524875
- Sigstore integration time:
-
Permalink:
geographika/gdalgviz@3a68061b45c50fa9e234f90a356df6a7717a4143 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/geographika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@3a68061b45c50fa9e234f90a356df6a7717a4143 -
Trigger Event:
push
-
Statement type: