Catalog PyPI
PACKAGE EXPLORERView in registry

a5-fast

PyPI

Fast Python bindings for the A5 discrete global grid system

a5dggsgeospatialgridspatial-index
Versions collected1
Direct dependencies0From release 0.2.1
Last observed20 Oct, 16:44 UTC

README

Version 0.2.1 documentation

a5_fast

Fast Python bindings for the A5 discrete global grid system, powered by Rust and PyO3.

Installation

pip install a5_fast

Usage

import a5_fast

# Convert (lon, lat) to a cell index at resolution 5
cell = a5_fast.lonlat_to_cell(13.4, 52.5, 5)

# Get the centre of a cell
lon, lat = a5_fast.cell_to_lonlat(cell)

# Get the boundary polygon of a cell
boundary = a5_fast.cell_to_boundary(cell)

# Batch convert coordinates (flat list: [lon0, lat0, lon1, lat1, ...])
cells = a5_fast.lonlat_to_cell_batch([13.4, 52.5, -73.9, 40.7], 5)

# Traverse the hierarchy
parent = a5_fast.cell_to_parent(cell)
children = a5_fast.cell_to_children(cell)

# Neighbours within k hops
disk = a5_fast.grid_disk(cell, 1)

# Compact / uncompact cell sets
compacted = a5_fast.compact(cells)
expanded = a5_fast.uncompact(compacted, 5)

# Hex conversion
hex_str = a5_fast.u64_to_hex(cell)
cell = a5_fast.hex_to_u64(hex_str)

# Metadata
res = a5_fast.get_resolution(cell)
area = a5_fast.cell_area(5)           # area in m² at resolution 5
n = a5_fast.get_num_cells(5)          # total cells at resolution 5
base = a5_fast.get_res0_cells()       # the 12 resolution-0 cells

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.131 Mar 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
afterrealism/a5_fast

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:44 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f156c3daa45bdf811f6cf31d59dbf694efe9fe8cb0d0370f408fc73505df2405