Skip to main content

Fast Python bindings for the A5 discrete global grid system

Project description

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

Project details


Download files

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

Source Distribution

a5_fast-0.2.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distributions

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

a5_fast-0.2.1-cp313-cp313-win_amd64.whl (166.4 kB view details)

Uploaded CPython 3.13Windows x86-64

a5_fast-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (315.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

a5_fast-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (308.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

a5_fast-0.2.1-cp313-cp313-macosx_11_0_arm64.whl (271.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

a5_fast-0.2.1-cp313-cp313-macosx_10_12_x86_64.whl (277.0 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

a5_fast-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (316.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

a5_fast-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (308.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

a5_fast-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (316.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

a5_fast-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (309.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

a5_fast-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (317.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

a5_fast-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (309.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

File details

Details for the file a5_fast-0.2.1.tar.gz.

File metadata

  • Download URL: a5_fast-0.2.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for a5_fast-0.2.1.tar.gz
Algorithm Hash digest
SHA256 477b5a5f8d6627f64e0f2f0fb372e500994cbf6911e15acd1006e94e6f296072
MD5 ca884ab7fb126bde8314d486cf882a26
BLAKE2b-256 249b2cd83592cfeba8857498e7e7b09629c118412391d6ac46b0ebbe71b4bdea

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1.tar.gz:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: a5_fast-0.2.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 166.4 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for a5_fast-0.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 011d2982cd76077c5b328cc35f54e76b4d5b32ec8778cd4be5766966c3114179
MD5 ab72ac8e2f631506a1097b7d9bc6a392
BLAKE2b-256 82ca59f0c210631a42289e03b7b123fecd34361385fd07bc1769ef5853a25300

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4176a9c50f28d28d611618618fc39bdbdcdfd3586e153d36b3217aedd65f418d
MD5 accd36caa447ffda65ab32f3559271fc
BLAKE2b-256 f9a7fb0ce37f34c14d69a99d37d57537759417fffefadd00a6413567ec63c4af

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7826f82fe8c9b5d6c302bd2bd192cd7268f0727a9fc763872e5722f98ea5857f
MD5 035ae67c7e76863a3927c700681c22ba
BLAKE2b-256 37dc26ceeaaa229e2af0ba020561c782ebe85a7dcbfe8ee0c1fbeef20c8de4a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56f2c38f671af0cb281fa8809b5e34cdc6af3fb8a2c7f2d7504d2b22bdd7107a
MD5 037dc8c60b4315e7ebbb011e2e8af0cd
BLAKE2b-256 2c780e59942485ed9774fd4c93d2362f9a52309240876831128a82243123705a

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3974dba13ccd6f80ed4697752517e157edd5ec9892dfb3829df5b268828237ea
MD5 87d9e47963bd19471a6188c557af5f31
BLAKE2b-256 248ddab089a64c9656f0d900bd876f0641f239181c2f9d990ae729f27b5d8c3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ddab3e444f7611d0753198451687797829982156fe1d71bcc6b935f5fb087a6
MD5 35ff4c74165693cb6b1ff13d0f5c4e7d
BLAKE2b-256 4a8a3fcb7a5a9eef9c9d529014da004da1ef9ca2ec11f9dc59f8a3542b7aa95c

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 53d704805249ed8acd60067137d6cb7a855cacc628abd58468371636166bb0b0
MD5 72ede59e480ae79d6971e504d5492a24
BLAKE2b-256 0f8d65b71e0ad327235890a37eeffd0244a6f989ec51dbe92d226159f99b2544

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9513095c29eb628f2e70f4fb18f8f9d62626ec2c376969300c71843b84378a81
MD5 5f42fc78eea4127d39bff1b2f84a43a0
BLAKE2b-256 469051cae939d532b279e0031f18d76215698faeff2284048abe43ba0d85d4bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 808943a79be1d94ac8396f6887293049e83ef5c53c811fcf5782288b29e30c22
MD5 7daff4a7df82dbd1408d7efe7cfa1c81
BLAKE2b-256 d740b62a5f031f2f7ded6a8b93069e220c3ee902cbf19c56ad1058ee7a49d541

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c8e78e7a5703a8cf905c81298f94a9f38ec9617dff37d72a2d9f4b036d68c4e
MD5 7459396a910a7c703b4409df46348739
BLAKE2b-256 287bfa192563ec064447029733a1160eab7a7ef2e0d36505a24c6f68a551dbff

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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

File details

Details for the file a5_fast-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for a5_fast-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e3815fe6f5a4ec31f672fbc251bd6b52ed9a336a17e0c6f952eb1942751101de
MD5 5f58a662e50a3f6e59010ddc3a233458
BLAKE2b-256 c6af4bc0cadf0a7a60bb7e81b69f1aeb145cd18a86dee52b2ba7fd08c566deed

See more details on using hashes here.

Provenance

The following attestation bundles were made for a5_fast-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on afterrealism/a5_fast

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