Skip to main content

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.

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


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.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

xyconvert-0.1.0-py2-none-any.whl (2.9 kB view details)

Uploaded Python 2

File details

Details for the file xyconvert-0.1.0.tar.gz.

File metadata

  • Download URL: xyconvert-0.1.0.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

Hashes for xyconvert-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2fa9b33c4b3539227c6eed630030df4db112c44deb51a48bffa255f92a6351db
MD5 605aa883378063b1d10f5f8d27968f16
BLAKE2b-256 f20b35e775f6600dd65ac9d10449a5f76fb4600790cdeda777941476a67fa990

See more details on using hashes here.

File details

Details for the file xyconvert-0.1.0-py2-none-any.whl.

File metadata

  • Download URL: xyconvert-0.1.0-py2-none-any.whl
  • Upload date:
  • Size: 2.9 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

Hashes for xyconvert-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 8d2fc6e5afbe8bbfb2ce19e5070ada478b2f526a60dfa5c68e0ff2abdb4986bd
MD5 7fdae6c8ce560c5f5a410dcf1f3e367b
BLAKE2b-256 5ee866232cc8e4182987868d609d1ff292126ddeb79d325d5ddfc89e6aee3b55

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page