WGS84坐标纠正工具
功能
用于将定义为WGS_1984坐标系,但实际坐标为bd09或gcj02的shapefile纠正到WGS_1984坐标系下
以解决从高德/百度平台获取数据时忘记进行坐标矫正后,可能出现的问题
Python库
安装
由于fiona依赖问题,仅支持Python>=3.8版本
在pip中安装
pip install wgs_correction
使用
一般使用
import wgs_correction as wgsc
input_shp = ''
output_shp = ''
# 纠正高德坐标
wgsc.correct(input_shp, output_shp, 'gd')
# 纠正百度坐标
wgsc.correct(input_shp, output_shp, 'bd')
高级使用
自定义纠正函数。纠正函数的参数、返回值都必须是两个
示例中,定义了t_func,以将整个shapefile的经纬度都加1
import wgs_correction as wgsc
def t_func(x, y):
return x + 1, y + 1
input_shp = ''
output_shp = ''
# 纠正高德坐标
wgsc.correct_core(input_shp, output_shp, t_func)
ArcGIS Pro 工具箱
将wgs_correction_tool.pyt添加至ArcGIS Pro工程中,直接使用即可
考虑到兼容性问题,工具箱逐个读取坐标、逐个转换,没有用numpy,速度比wgs_correction库更慢
如果要转换比较大的数据,建议适用wgs_correction库
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wgs_correction-0.1.0.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wgs_correction-0.1.0.tar.gz.
File metadata
- Download URL: wgs_correction-0.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c3dd40402a3d35d3cccbc7491b5fd9aea934bf960887960bcced7a4eb739f1
|
|
| MD5 |
e9787f956387b2903134e83803a4b3e0
|
|
| BLAKE2b-256 |
aa7142bdd25555e172cd70d46bc4453141d33322a72b6963824f83ab210d00b3
|
File details
Details for the file wgs_correction-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: wgs_correction-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dc691e45e51fd0ef7c65274ddf57356ea3120b7a9b9b7c1c900d96c9d0de201
|
|
| MD5 |
5538e7c8905f9db44ee4fe6a1c5e3ab1
|
|
| BLAKE2b-256 |
93a1509de5d038982efc6ce7cde4b9c9b568706cd069f80bd7a3bf336d58bb83
|