rustmap3d 0.2.1__cp312-cp312-manylinux_2_35_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rustmap3d/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ from .rustmap3d import *
2
+
3
+ __doc__ = rustmap3d.__doc__
4
+ if hasattr(rustmap3d, "__all__"):
5
+ __all__ = rustmap3d.__all__
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: rustmap3d
3
+ Version: 0.2.1
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ License-File: LICENSE
8
+ License-File: LICENSE
9
+ Summary: Python geodetic coordinate conversions written in rust
10
+ Author-email: weiler <lucas.l.weiler@leidos.com>, molnar <andrew.b.molnar@leidos.com>
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
13
+ Project-URL: Homepage, https://github.com/lskyweiler/rustmap3d
14
+
15
+ # rustmap3d
16
+
17
+ [![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/lskyweiler/rustmap3d#license)
18
+ ![Python](https://img.shields.io/badge/Python_3.8_|_3.9_|_3.10_|_3.11_|_3.12_|_3.13-blue?logo=python&logoColor=fff)
19
+ [![PyPI](https://img.shields.io/badge/PyPI-3775A9?logo=pypi&logoColor=fff)](https://pypi.org/project/rustmap3d/)
20
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
21
+
22
+ <p align="center"><img src="docs/rustmap3d.logo.svg" width="300px" height="300px"/></p>
23
+
24
+ **Simple, fast, and ergonomic geodetic coordinate conversions**
25
+
26
+ ---
27
+ ### Installation
28
+ ```bash
29
+ # add to an existing project
30
+ uv add rustmap3d
31
+ # pip install it directly
32
+ uv pip install rustmap3d
33
+
34
+ # pip install without uv
35
+ pip install rustmap3d
36
+ ```
37
+ ---
38
+ ### Examples
39
+ ```python
40
+ import rustmap3d
41
+
42
+
43
+ # wgs84 geodetic conversions
44
+ lla = rustmap3d.ecef2lla(x, y, z)
45
+ ecef = rustmap3d.lla2ecef(lat, lon, alt)
46
+ ...
47
+
48
+ # local conversions
49
+ ecef_uvw = rustmap3d.enu2ecef_uvw(e, n, u, lat_ref, lon_ref)
50
+ ecef = rustmap3d.enu2ecef(e, n, u, lat_ref, lon_ref)
51
+ ecef_uvw = rustmap3d.ned2ecef_uvw(n, e, d, lat_ref, lon_ref)
52
+ ecef = rustmap3d.ned2ecef(n, e, d, lat_ref, lon_ref)
53
+ # enu, ned, aer
54
+ ...
55
+
56
+ # local rotations
57
+ enu_quat = rustmap3d.enu2ecef_quat(lat, lon)
58
+ enu_dcm = rustmap3d.enu2ecef_dcm(lat, lon)
59
+ # enu, ned
60
+
61
+ # Conversions
62
+ dd = rustmap3d.dms2dd("25:22:44.738N") #> 25.37909389
63
+ dms = rustmap3d.dd2dms(25.37909389, is_lat=true) #> "25:22:44.738N"
64
+ lat, lon = rustmap3d.ll2dms(25.37909389, -138.7895679) #> "25:22:44.738N", "138:47:22.444W"
65
+ ...
66
+
67
+ # distance functions
68
+ lat, lon = rustmap3d.vincenty_direct(lat_deg, lon_deg, range_m, bearing_deg)
69
+ range_m, bearing_ab, bearing_ba = rustmap3d.vincenty_inverse(lat_a, lon_a, lat_b, lon_b)
70
+ ```
71
+
72
+ ## Comparison with similar packages
73
+
74
+ - 🚀🚀 Blazingly fast - written in rust (see [benchmarks](#benchmarks))
75
+ - Zero dependencies
76
+ - Dead simple api modeled after [pymap3d](https://github.com/geospace-code/pymap3d) and [matlab](https://www.mathworks.com/matlabcentral/fileexchange/15285-geodetic-toolbox)
77
+ - Exposes rotations (both quaternions and 3x3 matrices)
78
+
79
+ ## Benchmarks
80
+
81
+ Compared to [pymap3d](https://github.com/geospace-code/pymap3d)
82
+ > Note: This is comparing single calls of python floats, not vectorized numpy performance. Vectorized batched conversions will be implemented in the future
83
+
84
+ - *~50x* faster for lla2ecef
85
+ - *~400x* faster for ecef2lla
86
+
87
+ <p align="center"><img src="docs/benchmarks.svg"></p>
88
+
89
+ ```bash
90
+ # Run benchmarks
91
+ uv run pytest --benchmark-histogram="./docs/benchmarks" bench/
92
+ ```
93
+
94
+ ## Build From Source
95
+
96
+ Uses standard [maturin](https://github.com/PyO3/maturin) build process
97
+
98
+ ```bash
99
+ uv run maturin build -r # build a whl
100
+ uv run maturin dev -r # build a dev package similar to -e
101
+ ```
102
+
@@ -0,0 +1,6 @@
1
+ rustmap3d/__init__.py,sha256=3KvRU840onBHW4lM0rI1gngSINaQf2XjWebzsEnLULo,119
2
+ rustmap3d/rustmap3d.cpython-312-x86_64-linux-gnu.so,sha256=aBtlgl4TN57wC2jrq9bAvgIdVjEBOqGiWKEEsb1HDus,674176
3
+ rustmap3d-0.2.1.dist-info/METADATA,sha256=GnrKmRoAICpN7w2sF-LUarUHhD_g-dCEWF6Df-1uiDU,3429
4
+ rustmap3d-0.2.1.dist-info/WHEEL,sha256=_YENxWWX8rOIpStLqD5vPJnowUoXpYNjqKuJqcZcLWU,109
5
+ rustmap3d-0.2.1.dist-info/licenses/LICENSE,sha256=nPus_5ylrEEVZWLoXU2-Sz5VWnp4BPaNUt0bP2FY52o,1070
6
+ rustmap3d-0.2.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.11.5)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-manylinux_2_35_x86_64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2025] [rustmap3d]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.