pygcj
A GCJ02 and WGS-84 coordinate converter.
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.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(default is 0.000001)
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
Metadata
Release files for pygcj 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygcj-0.0.2.tar.gz | 95.6 kB | Without provenance | Details for pygcj-0.0.2.tar.gz |
Release files / pygcj-0.0.2.tar.gz
| Download URL | pygcj-0.0.2.tar.gz |
|---|---|
| Size | 95.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf3385fd0559821e239d659aa1a82c534a4871ff8bc86989ebf65683d0db081b
|
|
BLAKE2b-256 checksum How to use checksums |
9efd8a8cb89afc0485b846d570ae9291c7bbbb979e135f095051dbf4a7eb0de0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|
Security for pygcj 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.