Python geodetic coordinate conversions written in rust
Project description
rustmap3d
Simple, fast, and ergonomic geodetic coordinate conversions
Installation
# add to an existing project
uv add rustmap3d
# pip install it directly
uv pip install rustmap3d
# pip install without uv
pip install rustmap3d
Examples
import rustmap3d
# wgs84 geodetic conversions
lla = rustmap3d.ecef2lla(x, y, z)
ecef = rustmap3d.lla2ecef(lat, lon, alt)
...
# local conversions
ecef_uvw = rustmap3d.enu2ecef_uvw(e, n, u, lat_ref, lon_ref)
ecef = rustmap3d.enu2ecef(e, n, u, lat_ref, lon_ref)
ecef_uvw = rustmap3d.ned2ecef_uvw(n, e, d, lat_ref, lon_ref)
ecef = rustmap3d.ned2ecef(n, e, d, lat_ref, lon_ref)
# enu, ned, aer
...
# local rotations
enu_quat = rustmap3d.enu2ecef_quat(lat, lon)
enu_dcm = rustmap3d.enu2ecef_dcm(lat, lon)
# enu, ned
# Conversions
dd = rustmap3d.dms2dd("25:22:44.738N") #> 25.37909389
dms = rustmap3d.dd2dms(25.37909389, is_lat=true) #> "25:22:44.738N"
lat, lon = rustmap3d.ll2dms(25.37909389, -138.7895679) #> "25:22:44.738N", "138:47:22.444W"
...
# distance functions
lat, lon = rustmap3d.vincenty_direct(lat_deg, lon_deg, range_m, bearing_deg)
range_m, bearing_ab, bearing_ba = rustmap3d.vincenty_inverse(lat_a, lon_a, lat_b, lon_b)
Comparison with similar packages
- 🚀🚀 Blazingly fast - written in rust (see benchmarks)
- Zero dependencies
- Dead simple api modeled after pymap3d and matlab
- Exposes rotations (both quaternions and 3x3 matrices)
Benchmarks
Compared to pymap3d
Note: This is comparing single calls of python floats, not vectorized numpy performance. Vectorized batched conversions will be implemented in the future
- ~50x faster for lla2ecef
- ~400x faster for ecef2lla
# Run benchmarks
uv run pytest --benchmark-histogram="./docs/benchmarks" bench/
Build From Source
Uses standard maturin build process
uv run maturin build -r # build a whl
uv run maturin dev -r # build a dev package similar to -e
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rustmap3d-0.2.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 778.2 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18924f8dcd2038795121f76fbccf4952423b9ef78d4af36e26b022433c1c2e65
|
|
| MD5 |
8516a19a51136765dcce60cd1e8856e1
|
|
| BLAKE2b-256 |
5144070ebb57f6a30a1b3621a03aa4020b6060fa4dae9048041da97b84dd0c39
|
File details
Details for the file rustmap3d-0.2.1-cp313-cp313-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp313-cp313-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 303.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aefdaaff8cb9334845c7003a6cd3d036fe7ada06dcb747d8a039b9380ec0810
|
|
| MD5 |
c8ae352e4dff065dcc7dee8444c53efe
|
|
| BLAKE2b-256 |
06c71b95f76c432d11ae034e4ffb956541597a13aee27f81e6a29a054404c093
|
File details
Details for the file rustmap3d-0.2.1-cp313-cp313-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp313-cp313-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 280.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
404ad4b1fca5ab4e6ba2dd73068af7eb67ef86c86cca8d84c614167741295217
|
|
| MD5 |
426e98a4fa3379f99cb2ce4791aa1606
|
|
| BLAKE2b-256 |
8f61452562772ab278cd3d0266e92cbf2ce344e515d9aebec83a70f9e04cf7b5
|
File details
Details for the file rustmap3d-0.2.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 262.9 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab54354f1a9046035774009b24719e31b1ed108e00ad8a1f3babb7e1eebf3145
|
|
| MD5 |
3e51aae47ab28b8f905a0dd9da3b5088
|
|
| BLAKE2b-256 |
89f391b606021ca74e091ec3ac87f74865c2d6999d548d08f680463bb9697d2a
|
File details
Details for the file rustmap3d-0.2.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 779.8 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc50282fcc8ba3c97f68d0fc42b8e7763d4354d776ec230944976944d39f75c5
|
|
| MD5 |
7fcbaeb5f9153871ebe98796c5504803
|
|
| BLAKE2b-256 |
61147edd4f2eb2b77e95f7f0748515d3613bff8f623ab9a956d90c44ce2e8297
|
File details
Details for the file rustmap3d-0.2.1-cp312-cp312-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 303.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfbe07fef133c08cc655fba6c7fa354c4d5891b5a6288eb0db99dd956b9c0df6
|
|
| MD5 |
0df4844223b4a7a776601af5588a6a19
|
|
| BLAKE2b-256 |
5bf70706dc22ec9f6b3d06ce7fed48584f346a4945c66dc0c2c714753c884583
|
File details
Details for the file rustmap3d-0.2.1-cp312-cp312-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp312-cp312-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 280.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1f320d3db6621ca6b41069a086bc0a3bff422d254554eb5af44f5191b2fe0d7
|
|
| MD5 |
b8183bccda62a0a7dfb13f06e39dc00e
|
|
| BLAKE2b-256 |
ee6d21de1ef7a373a0317a67cd828a9bb5ba803bdbfdba6679260142965675d1
|
File details
Details for the file rustmap3d-0.2.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 262.8 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da913d6153ad60ed626868787f6c305fe599108caf1a7da457184bc08a88fcde
|
|
| MD5 |
f4a299a84720a7e1c141a909108800f8
|
|
| BLAKE2b-256 |
d2a214ae4edf29658c75c509a99af25372dc9e11082e3d87427cd02544caf2ce
|
File details
Details for the file rustmap3d-0.2.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 781.9 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4072114b884b6dabbd3c9ccf897a1b91a5cc99cac7fff9915db2cbc4e0ad225d
|
|
| MD5 |
268f8ee908bcaeed9e51125b670e2cef
|
|
| BLAKE2b-256 |
dc8d5743fed5cc15a80077a22e7b06041e1ae488253bc097278793b3aa516605
|
File details
Details for the file rustmap3d-0.2.1-cp311-cp311-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 305.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a45fd6a273fca5fd0a50f927ad4d14073fe4b8f369fd9448a76fc5c296719b88
|
|
| MD5 |
5460d14000584543b708e5883b74e0c9
|
|
| BLAKE2b-256 |
aeb10e0149d4e4540983e4c9c36aab38539dddbd93890865b6031d1386233481
|
File details
Details for the file rustmap3d-0.2.1-cp311-cp311-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp311-cp311-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 282.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45155458259c7d1aa878036c363b708685c6da41742c05b0e1ec3de64ee9b5a7
|
|
| MD5 |
7dacba9c67e3548c44a07d63e2e4549b
|
|
| BLAKE2b-256 |
6e9080bb56b724f2ae1a6f722c80b9aa14b75d9474f6fa3944661a27648ca603
|
File details
Details for the file rustmap3d-0.2.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 264.6 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a76e3ffe9e8b831dfec4d8c42a1968d9c3625e0463ce9103cce59dcb1e2522ad
|
|
| MD5 |
b0b815f218917eb12fbc51550629034c
|
|
| BLAKE2b-256 |
b4b4a9ee94e75c768654e9ddbd2db60cc5b1df9e1eb88122bf49332d3638d192
|
File details
Details for the file rustmap3d-0.2.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 781.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09f98fa7779f4326b9de4e508c9e43f776913c5a0e2257262df965279e44bbe
|
|
| MD5 |
2387cea44226e6191e42d756b6fa7cfe
|
|
| BLAKE2b-256 |
90adba2f3793740d4d5dfd1b7314f9fa467b80cc3fe9f4522bc60fc214ae221b
|
File details
Details for the file rustmap3d-0.2.1-cp310-cp310-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp310-cp310-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 305.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5f95f4be9b3251c7ff93a9d0cbeb814d3e8c3f9d85f7c675218182dd4dd0e3
|
|
| MD5 |
36cdaac61ef3395c648fd6c4eb2d753f
|
|
| BLAKE2b-256 |
3a0986262f79802214e4985be416f7f5280ae00e6fe28abaff1efe53b92aec8c
|
File details
Details for the file rustmap3d-0.2.1-cp310-cp310-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp310-cp310-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 282.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9713d0c29409cf750b10b49d604f8016407cd65fc1e1330d1013cf402c384ae6
|
|
| MD5 |
0f4b72e51519a9267c83331d8eacde9e
|
|
| BLAKE2b-256 |
b097924c9eefd9fd09e3e21c886c6111522873d318857b435a28a81c09a202d4
|
File details
Details for the file rustmap3d-0.2.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: rustmap3d-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 264.6 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91d4317c2b7ef138926f27d027834a38da500fc0697c9797974aec74cc5099c5
|
|
| MD5 |
e7951a5ef381dccec9e2c0f85150e885
|
|
| BLAKE2b-256 |
719e3161ae612b3465bed07ea9257574d2e4025667e7faa262c19971109abd18
|