Skip to content
asterisk-labsPublic

About

Geospatial codec extensions for OpenZL

Topics

Resources

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

GeoZL

License BSD-3-Clause CI Coverage Python R-universe Julia npm Linux, macOS and Windows Built on OpenZL


GeoZL extends OpenZL with codecs designed for Earth observation data. It adds spatial prediction, NoData handling, efficient integer packing and bounded-error quantization for multidimensional numeric arrays. The same core is available from C, Python, R, Julia and JavaScript.

Bindings

Language Install Role Docs
Python pip install geozl full API and OpenZL nodes README
R install.packages("geozl", repos = "https://asterisk-labs.r-universe.dev") graph, compress, decompress, profile README
Julia Pkg.Registry.add(url="https://github.com/asterisk-labs/AsteriskRegistry"); Pkg.add("GeoZL") graph, compress, decompress, profile README
JavaScript npm install @asterisk-labs/geozl compress, decompress README

Quick start

import numpy as np
import geozl

y, x = np.mgrid[0:1024, 0:1024]
tile = (2000 + 8 * y + 5 * x).astype(np.uint16)

best = geozl.profile(tile)[0]["graph"]        # rank recipes on a sample
g = geozl.graph(tile, best)                   # build once, reuse per tile
frame = geozl.compress(tile, graph=g)
back = geozl.decompress(frame).view(np.uint16).reshape(tile.shape)

Codecs

codec CTid what it does
delta_w 0x72D701 residual against the west neighbour
delta_n 0x72D702 residual against the north neighbour
planar 0x72D703 predicts each pixel from W + N - NW
deinterleave 0x72D704 separates a two-lane interleaved stream
med 0x72D705 median edge detector predictor
average 0x72D706 floor average of the west and north neighbours
wp_static 0x72D707 weighted predictor with its weights in the frame
nodata 0x72D70C missing samples to a validity mask, holes filled
pfor 0x72D70D bit packs blocks of 256 and patches overflows
planar_zigzag 0x72D70F planar residuals and Zigzag in one pass
planar_zigzag_pfor 0x72D710 planar, Zigzag and PFOR as one codec
med_zigzag 0x72D711 MED residuals and Zigzag in one pass
planar_zigzag_pivco 0x72D712 planar and Zigzag, then PivCo or PFOR per byte lane
quant_linear 0x72D781 absolute bound: LINEAR:MAX_ERROR=V
quant_log 0x72D782 relative bound: LOG:MAX_ERROR=P%
quant_sqrt 0x72D783 noise-scaled bound: SQRT:MAX_ERROR=VN

The codec catalog documents each wire format.

AI agent skill

Install the GeoZL skill so coding agents know its graph recipes, bounded-error rules and codec internals.

npx skills add asterisk-labs/geozl

Development

make submodules
make test       # C tests and pytest
make help       # R, Julia, wasm, sanitizers and fuzzing

License

BSD-3-Clause.


Made with ♥ by

Asterisk Labs

About

Geospatial codec extensions for OpenZL

Topics

Resources

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages