Skip to main content

Geospatial coordinate library: China datums (GCJ-02/BD-09) and geodetic transforms.

Project description

geocoordinates (language bindings)

UniFFI bindings for the geocoordinates geospatial library — China datums (GCJ-02 / BD-09), geodetic transforms.

A deliberately curated, flattened subset of the Rust API is exposed across the FFI boundary to Python, Kotlin, Swift, and TypeScript (Java consumes the Kotlin/JVM artifact). Generics, traits, operator overloads, and From/TryFrom conversions do not cross FFI, so they are re-expressed as flat records and free functions; approximate inverses keep their _fast / _refined names and carry an explicit max_error_m.

Surface

WGS-84 ↔ GCJ-02 ↔ BD-09 conversions (exact forward, approximate inverse with error bounds), Baidu Web Mercator, out_of_china, and haversine distance.

import geocoordinates_ffi as gc

gcj = gc.wgs84_to_gcj02(gc.Wgs84(lat=39.915, lon=116.404))
wgs = gc.gcj02_to_wgs84_refined(gcj)          # approximate inverse
print(wgs.lat, wgs.lon, "±", wgs.max_error_m, "m")

The WebAssembly/TypeScript bindings live in web/.

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.

geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (282.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

geocoordinates_rs-0.1.1-py3-none-macosx_11_0_arm64.whl (256.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

geocoordinates_rs-0.1.1-py3-none-macosx_10_12_x86_64.whl (256.4 kB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d8201e8e67e7b83e6dd910f7bb561531da884d54b742e0179a93103abc924cf4
MD5 1ec6da513731083544626ebb2efc663a
BLAKE2b-256 bd60d1a1c988f84129cd3ef734d53f89e24a1be20e6890c0767c8e44f1f04874

See more details on using hashes here.

Provenance

The following attestation bundles were made for geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-python.yml on justin13888/geocoordinates-rs

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

File details

Details for the file geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2a8cb7a3b8944c96675b656f331a43cc1f8504ef42a8a1c2619866b506f5b903
MD5 672b8f1635a4ec55ced7ba404a8a532f
BLAKE2b-256 4cdf5ce254af4a091bc5e6bfbaf8176804f670ab027e100a68b02ac0fa1e889e

See more details on using hashes here.

Provenance

The following attestation bundles were made for geocoordinates_rs-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on justin13888/geocoordinates-rs

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

File details

Details for the file geocoordinates_rs-0.1.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geocoordinates_rs-0.1.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd5ccd68dde376b0a8f80f06c495ed722b6b705248cd1b8b8c97f8a43382382c
MD5 9fb834b85cff3a715916167316af8432
BLAKE2b-256 dc14bbfb9f408c6da9f8843eb1dad255b5208cd5d7d8f877f52b04dd1f04acf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for geocoordinates_rs-0.1.1-py3-none-macosx_11_0_arm64.whl:

Publisher: release-python.yml on justin13888/geocoordinates-rs

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

File details

Details for the file geocoordinates_rs-0.1.1-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for geocoordinates_rs-0.1.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 89a07091bb84286bea8945e5c6e258dcfdcab82bee71e8b9d7d9c05dce045112
MD5 aca593620a3e4ad79baa6026904a93a6
BLAKE2b-256 ec2bc4dfdc5c961b95d850880cb8d3eda2bda373f8a93b90b197ea28997aabf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for geocoordinates_rs-0.1.1-py3-none-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on justin13888/geocoordinates-rs

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