{ "info": { "author": "sshuair", "author_email": "sshuair@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: C", "Programming Language :: Cython", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Scientific/Engineering :: GIS" ], "description": "# China Coordinate Convertor\n\n[![Actions Status](https://github.com/sshuair/coord-convert/workflows/pytest/badge.svg)](https://github.com/sshuair/coord-convert/actions)\n[![GitHub stars](https://img.shields.io/github/stars/sshuair/coord-convert)](https://github.com/sshuair/coord-convert/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/sshuair/coord-convert)](https://github.com/sshuair/coord-convert/network)\n[![GitHub license](https://img.shields.io/github/license/sshuair/coord-convert)](https://github.com/sshuair/coord-convert/blob/master/LICENSE)\n\n[\u4e2d\u56fd\u706b\u661f\u5750\u6807](https://en.wikipedia.org/wiki/Restrictions_on_geographic_data_in_China)\u8f6c\u6362\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e`WGS-84`(\u672a\u504f\u79fb\u5750\u6807), `GCJ-02`\uff08\u56fd\u5bb6\u6d4b\u7ed8\u5c40\u3001\u9ad8\u5fb7\u3001\u8c37\u6b4c\u4e2d\u56fd\u5730\u56fe\uff09, `BD-09`(\u767e\u5ea6\u5750\u6807\u7cfb)\u4e09\u8005\u4e4b\u95f4\u7684\u4e92\u76f8\u8f6c\u6362\uff0c\u652f\u6301\u6587\u4ef6\u683c\u5f0f\uff1a\n- ESRI Shapefile\n- GeoJSON\n\n \"\u56fe\u7247\u540d\u79f0\"\n\n## \u5b89\u88c5\n\u63a8\u8350\u4f7f\u7528\uff1a\n`pip install coord-convert`\n\n\u6216\u8005\u4e5f\u53ef\u4ee5\u4ece\u6e90\u7801\u5b89\u88c5\uff1a\n```\ngit clone https://github.com/sshuair/coord-convert.git\npip install -r requirements.txt\npython setup.py install\n```\n\n## \u4f9d\u8d56\n- python3\n- fiona\n- tqdm\n- click\n\n## \u4f7f\u7528\u65b9\u6cd5\n>\u6ce8\u610f\uff1a\u706b\u661f\u5750\u6807\u8f6c\u6362\u662f\u9488\u5bf9\u7ecf\u7eac\u5ea6\u7684\u8f6c\u6362\uff0c\u56e0\u6b64\u5728\u8fdb\u884c\u8f6c\u6362\u524d\u9700\u8981\u5c06\u5750\u6807\u8f6c\u6362\u6210\u7ecf\u7eac\u5ea6\uff1b\u6bd4\u5982web\u58a8\u5361\u6258(3857)\u7b49\u6295\u5f71\u5750\u6807\u7cfb\u9700\u8981\u5148\u8f6c\u6210\u7ecf\u7eac\u5ea6\u5750\u6807(4326)\n\n### Python API\u8c03\u7528\n\u5728python\u7a0b\u5e8f\u4e2d\u8c03\u7528\u76f8\u5e94\u7684\u5750\u6807\u8f6c\u6362\u63a5\u53e3\n\n```python\nfrom coord_convert.transform import wgs2gcj, wgs2bd, gcj2wgs, gcj2bd, bd2wgs, bd2gcj \nlon, lat = 120, 40\ngcj_lon, gcj_lat = wgs2gcj(lon, lat)\nbd_lon, bd_lat = wgs2bd(lon, lat)\nprint(gcj_lon, gcj_lat) # the result should be: 120.00567568355486 40.0013047896019\n\n```\n\n\n### \u547d\u4ee4\u884c\u8c03\u7528\n\u706b\u661f\u5750\u6807\u8f6c\u6362\u8fd8\u652f\u6301\u547d\u4ee4\u884c\u76f4\u63a5\u5bf9shp\u3001geojson\u7b49\u6587\u4ef6\u8fdb\u884c\u8f6c\u6362\uff0c\u6bd4\u5982\n\n```bash\n~/temp > coord_covert gcj2wgs tests/data/Polyline/polyline.geojson aa.geojson\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 219/219 [00:00<00:00, 550.93it/s]\n```\n\n\u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\uff1a\n```\nconvert input china coordinate to another. \n\n Arguments:\n convert_type {string} -- [coordinate convert type, e.g. wgs2bd]\n\n wgs2gcj : convert WGS-84 to GCJ-02\n wgs2bd : convert WGS-84 to DB-09\n gcj2wgs : convert GCJ-02 to WGS-84\n gcj2bd : convert GCJ-02 to BD-09\n bd2wgs : convert BD-09 to WGS-84\n bd2gcj : convert BD-09 to GCJ-02\n\n src_path {string} -- [source file path]\n dst_path {string} -- [destination file path]\n\n\n Example:\n coord_covert wgs2gcj ./tests/data/polygon/polygon_wgs.shp ~/temp/polygon_gcj.shp \n\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sshuair/coord-convert", "keywords": "coordinate vector china", "license": "", "maintainer": "", "maintainer_email": "", "name": "coord-convert", "package_url": "https://pypi.org/project/coord-convert/", "platform": "", "project_url": "https://pypi.org/project/coord-convert/", "project_urls": { "Homepage": "https://github.com/sshuair/coord-convert" }, "release_url": "https://pypi.org/project/coord-convert/0.2.1/", "requires_dist": [ "click", "tqdm", "fiona" ], "requires_python": "", "summary": "china mars coordinate convertor.", "version": "0.2.1" }, "last_serial": 5837053, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "dc7c4c103b1fe72a946acbbd384c1043", "sha256": "679842e523dd378a47c769f7c555c4b0681396d5f25db37a2e1ebd60cc9e7b7a" }, "downloads": -1, "filename": "coord-convert-0.1.0.zip", "has_sig": false, "md5_digest": "dc7c4c103b1fe72a946acbbd384c1043", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8508, "upload_time": "2018-01-21T09:12:18", "url": "https://files.pythonhosted.org/packages/b2/6d/df6791c82dbba3963c72136d5e337f728c5647d309632eec91f27277df41/coord-convert-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "bb7bc8d0fce96a863f04fbf8f77dda73", "sha256": "3df91f31603b1e4def315202e32b259025f3123b3bcae65f41cdf103c5fc679e" }, "downloads": -1, "filename": "coord_convert-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bb7bc8d0fce96a863f04fbf8f77dda73", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6206, "upload_time": "2018-12-16T11:40:46", "url": "https://files.pythonhosted.org/packages/e6/b9/babb0b978d928cbbd9e1e98f9efd2d7a50049ea0312fbe3bf3cee4d7a4a2/coord_convert-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6803852ff0c372f27702aaf5320e599d", "sha256": "f7a834ace7ab85fab77bb4b15fa377726401fb427e3579ac17336060ef56d461" }, "downloads": -1, "filename": "coord-convert-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6803852ff0c372f27702aaf5320e599d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4119, "upload_time": "2018-03-01T14:30:34", "url": "https://files.pythonhosted.org/packages/59/3e/59e7165ba8ea71cd9bff77d7155f1ae2167878b0d085343fba13b4409006/coord-convert-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b3a1675d93854638d3efcf52d4555741", "sha256": "ceff14aaa524bc2b8f4cca4c89f970a9f881d20e5ee43df5590f350e58627ef4" }, "downloads": -1, "filename": "coord_convert-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b3a1675d93854638d3efcf52d4555741", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6320, "upload_time": "2019-09-16T15:46:22", "url": "https://files.pythonhosted.org/packages/38/96/97495fe5002e953ef61767a9057c7443f65f2c8a92adcb4c3747f4b16f38/coord_convert-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "79ec578d173b921573559f1c1ea2490b", "sha256": "a7d25117f2717f6ba5c2649a7ca421f04af493adc8ad9f3bb51d150a4f9844fd" }, "downloads": -1, "filename": "coord_convert-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "79ec578d173b921573559f1c1ea2490b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6626, "upload_time": "2018-12-16T11:40:48", "url": "https://files.pythonhosted.org/packages/3e/a5/22277402cfa110f1ef593050302aa42f405239a3b2c8c6bd61d9d1a80c4d/coord_convert-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b593b374030897bc7bf78da423a7752", "sha256": "4afa6ffb94c7ca11c6d51db925b29ff7108449c972b56729121c7d8d27644555" }, "downloads": -1, "filename": "coord-convert-0.2.tar.gz", "has_sig": false, "md5_digest": "3b593b374030897bc7bf78da423a7752", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4658, "upload_time": "2018-12-16T11:41:30", "url": "https://files.pythonhosted.org/packages/95/c3/c58a72a10f221589ebb701c02234a9022240b95d080c55c3ae72cb768af2/coord-convert-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "743fd51e1cb83566604b9c80c0d5ba82", "sha256": "40cbab8fd5c402bb38e3062370a5ebf1d4e0c167122f4a50d448e0f2a0a826b3" }, "downloads": -1, "filename": "coord_convert-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "743fd51e1cb83566604b9c80c0d5ba82", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6314, "upload_time": "2019-09-16T15:59:44", "url": "https://files.pythonhosted.org/packages/1f/97/6ab0b423924de14329a6a7f231e7712bb2b0c60c5c47efa08d8d65c841fc/coord_convert-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "804bb39f6e93597eb367e9252bd6057f", "sha256": "d7479ed25947327a34841a714964a9c5a1af81b9bcdac4472069fa9aa7ab4d6d" }, "downloads": -1, "filename": "coord-convert-0.2.1.tar.gz", "has_sig": false, "md5_digest": "804bb39f6e93597eb367e9252bd6057f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4841, "upload_time": "2019-09-16T15:59:45", "url": "https://files.pythonhosted.org/packages/78/42/7ed9adf261475d014012dbdd4831b4034719abf6b811080995fbe710bc40/coord-convert-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "743fd51e1cb83566604b9c80c0d5ba82", "sha256": "40cbab8fd5c402bb38e3062370a5ebf1d4e0c167122f4a50d448e0f2a0a826b3" }, "downloads": -1, "filename": "coord_convert-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "743fd51e1cb83566604b9c80c0d5ba82", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6314, "upload_time": "2019-09-16T15:59:44", "url": "https://files.pythonhosted.org/packages/1f/97/6ab0b423924de14329a6a7f231e7712bb2b0c60c5c47efa08d8d65c841fc/coord_convert-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "804bb39f6e93597eb367e9252bd6057f", "sha256": "d7479ed25947327a34841a714964a9c5a1af81b9bcdac4472069fa9aa7ab4d6d" }, "downloads": -1, "filename": "coord-convert-0.2.1.tar.gz", "has_sig": false, "md5_digest": "804bb39f6e93597eb367e9252bd6057f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4841, "upload_time": "2019-09-16T15:59:45", "url": "https://files.pythonhosted.org/packages/78/42/7ed9adf261475d014012dbdd4831b4034719abf6b811080995fbe710bc40/coord-convert-0.2.1.tar.gz" } ] }