Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyang-kth/xyconvert
Converting xy coordinates between WGS-84, GCJ-02 and BD-09 system
https://github.com/cyang-kth/xyconvert
bd09 coordinate-conversion gcj02 gps numpy wgs84 xy
Last synced: about 2 months ago
JSON representation
Converting xy coordinates between WGS-84, GCJ-02 and BD-09 system
- Host: GitHub
- URL: https://github.com/cyang-kth/xyconvert
- Owner: cyang-kth
- License: mit
- Created: 2020-11-16T00:52:41.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-16T15:04:33.000Z (about 4 years ago)
- Last Synced: 2024-10-13T19:41:59.982Z (2 months ago)
- Topics: bd09, coordinate-conversion, gcj02, gps, numpy, wgs84, xy
- Language: Python
- Homepage: https://pypi.org/project/xyconvert/
- Size: 5.86 KB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
### xyconvert
This is a python package for converting xy coordinates (in lng,lat order) in numpy array between WGS-84, GCJ-02 and BD-09 system.
The conversion in numpy is much more efficient (50-70 times speedup) compared with previous Python implementations such as [eviltransform](https://github.com/googollee/eviltransform) and [coordTransform_py](https://github.com/wandergis/coordTransform_py) that convert only a single point at each call.
### Install the package
```bash
pip install xyconvert
```### Usage
```python
from xyconvert import gcj2wgs
import numpy as np
gcj_xy = np.asarray([[104.07008157, 30.73199687],
[104.07008159, 30.73177709],
[104.06999188, 30.73147758]])
wgs_xy = gcj2wgs(gcj_xy)
print wgs_xy
'''
[[104.06756309 30.73437796]
[104.06756312 30.73415829]
[104.06747357 30.73385904]]
'''
```### Reference
The code is partly copied/modified from https://github.com/Argons/nextlocation and https://github.com/wandergis/coordTransform_py.