Geospatial codec extensions for OpenZL.
Project description
Spatial predictors and near lossless quantizers, packaged as OpenZL custom codecs.
OpenZL models compression as a graph of codecs and ships the decode recipe inside every frame, so one universal decoder reads any frame. It compresses 1D streams and has no notion of a 2D raster. geozl adds the spatial codecs for it.
A geozl codec is one node in the OpenZL graph. It transforms the tile, a numeric stream, and carries whatever the decoder needs to invert it in the codec header inside the frame. The full rules live in the specification.
Status
geozl is experimental. The codecs, their parameters, and the codec header layout can change between versions with no migration path. Pin a version for anything you cannot regenerate.
[!WARNING] geozl codecs are not part of OpenZL. They register at runtime and take custom transform ids in the
0x72D700-0x72D7FFblock. A frame that uses them decodes only with a reader that has geozl registered, a frame of built-in OpenZL codecs stays portable. Whether any geozl codec lands in OpenZL upstream is undecided.
Install
pip install geozl
You compose the geozl codecs into an openzl.ext graph, they chain like any other node.
import openzl.ext as zl
import geozl
c = zl.Compressor()
g = zl.graphs.Compress()
g = zl.nodes.Zigzag()(c, g)
g = geozl.lossless.PlanarInt(width=512)(c, g)
c.select_starting_graph(g)
Codecs
Two families, both registered as OpenZL custom codecs that chain like any other node.
Near lossless
Quantizers, namespace geozl.lossy. A frame is no longer bit exact, carries one quantizer at the head, and bounds its error by the parameters in the frame. Each declares one error mode. ABS holds a fixed absolute tolerance, the same everywhere, for elevation, depth, coordinates. REL holds a fixed relative tolerance, a percentage of each value, for radiance, reflectance, SAR amplitude.
| codec | CTid | mode | error |
|---|---|---|---|
quant_linear |
0x72D780 |
ABS | every value within max_error |
quant_log |
0x72D781 |
REL | every value within rel_error of itself |
Lossless
Spatial predictors, namespace geozl.lossless. Each rewrites a tile as residuals against decoded neighbours, bit exact. They are reversible and domain agnostic, so these are the candidates to merge into OpenZL upstream.
| codec | CTid | what it does |
|---|---|---|
delta_w |
0x72D701 |
horizontal delta |
delta_n |
0x72D702 |
vertical delta |
planar |
0x72D703 |
predicts each pixel from W plus N minus NW |
License
BSD-3-Clause
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 Distributions
Built Distributions
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 geozl-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geozl-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d012b9ea84eaaa61106ea520965b415b136f603aaa66ac33779f66fe8b28801d
|
|
| MD5 |
90ffb7d196a445c081aca7fdaf91c051
|
|
| BLAKE2b-256 |
6e41178b46d0afe9fb73c56a83f679f6582356534ea17b2a84d0e337bad3d3af
|
Provenance
The following attestation bundles were made for geozl-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on asterisk-labs/geozl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geozl-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
d012b9ea84eaaa61106ea520965b415b136f603aaa66ac33779f66fe8b28801d - Sigstore transparency entry: 2036900829
- Sigstore integration time:
-
Permalink:
asterisk-labs/geozl@ad5b702646deee9131b3eab58ae9086c4841c9b3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/asterisk-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ad5b702646deee9131b3eab58ae9086c4841c9b3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file geozl-0.1.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: geozl-0.1.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
948988f6671de8987dc4d332493bf3e74737fd4100e86c5b5f2b4ff0819621bf
|
|
| MD5 |
1f7d7d7899f8c58a5a07b5a8a47e7923
|
|
| BLAKE2b-256 |
a1ac75c1297a6ae243adb918d101dcd488e1b596492b696852cd671ef6035c73
|
Provenance
The following attestation bundles were made for geozl-0.1.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on asterisk-labs/geozl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geozl-0.1.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
948988f6671de8987dc4d332493bf3e74737fd4100e86c5b5f2b4ff0819621bf - Sigstore transparency entry: 2036901434
- Sigstore integration time:
-
Permalink:
asterisk-labs/geozl@ad5b702646deee9131b3eab58ae9086c4841c9b3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/asterisk-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ad5b702646deee9131b3eab58ae9086c4841c9b3 -
Trigger Event:
push
-
Statement type: