Convert xy coordinates
Project description
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 and coordTransform_py that convert only a single point at each call.
Install the package
pip install xyconvert
Usage
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xyconvert-0.1.1.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file xyconvert-0.1.1.tar.gz
.
File metadata
- Download URL: xyconvert-0.1.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1509405cfdd2f93913a4a3ec46b318b0aa67c1ea8e20c4d37dbabca5096b1337 |
|
MD5 | 0a436d4c548e3bbb3090c9ba27d71d46 |
|
BLAKE2b-256 | e31f0b84a7d3444168a4e29fdb85e46775d939f126cc37db0bb4685aef4189a3 |
File details
Details for the file xyconvert-0.1.1-py2-none-any.whl
.
File metadata
- Download URL: xyconvert-0.1.1-py2-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9a5a8b484317c96316188c80d75e9f6954188a70f7cd7b2701b3e37e2e1ef49 |
|
MD5 | f44dbd7183d96a60646d535fc0e072df |
|
BLAKE2b-256 | 64224208771c19a184e645e081136e07e247f90ca559efb3915908cee002f994 |