Transfrom coordinate between China GCJ02(colloquially Mars Coordinates) and WGS-84 with high precision
Project description
GCJ02 and wgs84 transform
increase the accuracy by control points
Generate Control Points
Default gcp file’s grid interval is 1 degree. If you want generate new gcp file,please run:
python generate_gcp.py
Transform between WGS84 and GCJ02
from pygcj import GCJProj
trans = GCJProj()
# wgs84 to gcj
gcj_lat, gcj_lon = trans.wgs_to_gcj(45.2,112.8)
# gcj to wgs84
wgs_lat, wgs_lon = trans.gcj_to_wgs(45.2,112.8)
# gcj to wgs84 and specific threshold
wgs_lat, wgs_lon = trans.gcj_to_wgs(45.2,112.8,0.00000001)
accuracy test (use default control points)
origional: distance mean: 347.554477357 distance stdev: 164.494315519 eviltransform: distance mean: 3.39331251552 distance stdev: 2.6602095071 pygcj.gcj_to_wgs(): distance mean: 0.395794995772 distance stdev: 0.571923075943
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
pygcj-0.0.1.tar.gz
(96.0 kB
view hashes)
Built Distribution
pygcj-0.0.1-py2.py3-none-any.whl
(91.9 kB
view hashes)
Close
Hashes for pygcj-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a5c64bdb3f0a0c7220abcae61366a1845979a6dc918e218e4c0e7824b2ed23e |
|
MD5 | 61e2b3239f4e1b9cbc09d3420ebca03b |
|
BLAKE2b-256 | 6f79ea27aa11c27d663b2afc7ca84b5cbbdff87a3451b75da057e680120ddfd1 |