wgs_correction
Project description
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库
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
wgs_correction-0.1.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for wgs_correction-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dc691e45e51fd0ef7c65274ddf57356ea3120b7a9b9b7c1c900d96c9d0de201 |
|
MD5 | 5538e7c8905f9db44ee4fe6a1c5e3ab1 |
|
BLAKE2b-256 | 93a1509de5d038982efc6ce7cde4b9c9b568706cd069f80bd7a3bf336d58bb83 |