Metadata-Version: 2.2
Name: gismath
Version: 0.1.4
Summary: Add your description here
Requires-Python: >=3.11
Requires-Dist: numpy>=2.0
Description-Content-Type: text/markdown

# gismath

## 安装

> pip install gismath


## 示例

```python
import gismath

lon, lat, alt = 121.57156751580956, 31.287623375403385, 0.15180000000691507

# c++ 实现
ecef_cpp = gismath.geodetic2ecef_cpp(lon, lat, alt)

# cython 实现
ecef_cy = gismath.geodetic2ecef_cy(lon, lat, alt)

print(ecef_cpp)
>>> [-2856298.1505069532, 4648013.005657461, 3293186.773949799]

print(ecef_cy)
>>> (-2856298.1505069532, 4648013.005657461, 3293186.773949799)
```

提供常用 GIS 算法的 CPP 版本和 Cython 版本



| 测试                        | CPP 版耗时   | Cython 版耗时 | numba.njit 耗时 | numba.njit(fastmath=True) 耗时 | Pure Python 3.11.3 |
| --------------------------- | ------------ | ------------- | --------------- | ------------------------------ | ------------------ |
| 经纬度转ECEF（50000000 条） | 16.043000 秒 | 08.345999 秒  | 14.576452 秒    | 10.386999 秒                   | 40.454000 秒       |
|                             |              |               |                 |                                |                    |
|                             |              |               |                 |                                |                    |

