Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

提供百度坐标系(bd-09)、火星坐标系(国测局坐标系、gcj02)、WGS84坐标系直接的坐标互转,也提供了解析高德地址的方法的python版本

License

Notifications You must be signed in to change notification settings

comepeng/coordTransform_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

16 Commits

Repository files navigation

坐标转换模块

此模块用于百度坐标系(bd-09)、火星坐标系(国测局坐标系、gcj02)、WGS84坐标系的相互转换,并提供中文地址到坐标的转换功能,仅使用Python标准模块,无其他依赖。中文地址到坐标转换使用高德地图API,需要申请API KEY。

需要js版本可以移步coordtransform

使用说明

 lng = 128.543
 lat = 37.065
 result1 = gcj02_to_bd09(lng, lat)#火星坐标系->百度坐标系
 result2 = bd09_to_gcj02(lng, lat)#百度坐标系->火星坐标系
 result3 = wgs84_to_gcj02(lng, lat)#WGS84坐标系->火星坐标系
 result4 = gcj02_to_wgs84(lng, lat)#火星坐标系->WGS84坐标系
 result5 = bd09_to_wgs84(lng, lat)#百度坐标系->WGS84坐标系
 result6 = wgs84_to_bd09(lng, lat)#WGS84坐标系->百度坐标系
	#中文地址到火星坐标系,需要高德地图API Key
 g = Geocoding('API_KEY') # 这里填写你的高德Api_Key
 result7 = g.geocode('北京市朝阳区朝阳公园')
 print result1, result2, result3, result4, result5, result6, result7

About

提供百度坐标系(bd-09)、火星坐标系(国测局坐标系、gcj02)、WGS84坐标系直接的坐标互转,也提供了解析高德地址的方法的python版本

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%

AltStyle によって変換されたページ (->オリジナル) /