Skip to main content

Geospatial codec extensions for OpenZL.

Project description

geozl

License: BSD-3-Clause Platform C11 Built on OpenZL

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-0x72D7FF block. 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


Made with ♥ by

Asterisk Labs

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

geozl-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (20.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

geozl-0.1.0-py3-none-macosx_11_0_arm64.whl (17.1 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

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

File hashes

Hashes for geozl-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d012b9ea84eaaa61106ea520965b415b136f603aaa66ac33779f66fe8b28801d
MD5 90ffb7d196a445c081aca7fdaf91c051
BLAKE2b-256 6e41178b46d0afe9fb73c56a83f679f6582356534ea17b2a84d0e337bad3d3af

See more details on using hashes here.

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

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

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

Hashes for geozl-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 948988f6671de8987dc4d332493bf3e74737fd4100e86c5b5f2b4ff0819621bf
MD5 1f7d7d7899f8c58a5a07b5a8a47e7923
BLAKE2b-256 a1ac75c1297a6ae243adb918d101dcd488e1b596492b696852cd671ef6035c73

See more details on using hashes here.

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

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