Skip to main content

Geospatial codec extensions for OpenZL.

Project description

geozl

License: BSD-3-Clause Coverage 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, and adding a codec covers extending geozl.

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.Planar(width=512)(c, g)
c.select_starting_graph(g)

Codecs

Two families, both registered as OpenZL custom codecs that chain like any other node. The call column is what you type to place the codec in the graph.

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 call CTid mode error
quant_linear geozl.lossy.QuantLinear(max_error, dtype) 0x72D780 ABS every value within max_error
quant_log reserved, not implemented yet 0x72D781 REL every value within rel_error of itself

Lossless

Namespace geozl.lossless, bit exact transforms of a tile.

codec call CTid what it does
delta_w geozl.lossless.DeltaW(width) 0x72D701 horizontal delta
delta_n geozl.lossless.DeltaN(width) 0x72D702 vertical delta
planar geozl.lossless.Planar(width) 0x72D703 predicts each pixel from W plus N minus NW
deinterleave geozl.lossless.Deinterleave() 0x72D704 splits an interleaved stream into two lanes, real and imaginary of a complex
med geozl.lossless.Med(width) 0x72D705 median edge detector, W plus N minus NW clamped to the neighbours
average geozl.lossless.Average(width) 0x72D706 floor average of W and N
wp_static geozl.lossless.WpStatic(width) 0x72D707 weighted predictor, fits a linear kernel over the neighbours and carries it in the frame

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.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (48.8 kB view details)

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

geozl-0.6.0-py3-none-macosx_11_0_arm64.whl (32.1 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file geozl-0.6.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.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a46556475c7bfd9a8d28ba7860dd233b425deac910563967edc08fed6c704989
MD5 605c26826773d768d53a3a9a01ce97d0
BLAKE2b-256 0371f35574dc01948da48e1260ab724d6eb2ea42797c3eb09b3bcf8ad31f60f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for geozl-0.6.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.6.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: geozl-0.6.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 32.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.6.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 452723c2f0048257699c03dd33b458a6ae1fb648d1602cffe23b03039c417735
MD5 c6b3b76e4be6763f4eca802be51bac7f
BLAKE2b-256 45223e3ea52f5836f00209c2def48d8a1b0d92b992805c395f8d6b395ff69ee9

See more details on using hashes here.

Provenance

The following attestation bundles were made for geozl-0.6.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