Metadata-Version: 2.4
Name: gismath
Version: 0.0.32
Summary: Some common gis math functions
Author: Lun.A
Author-email: 517308447@qq.com
License: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: summary

# 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 秒       |
|                             |              |               |                 |                                |                    |
|                             |              |               |                 |                                |                    |

