Giter Club home page Giter Club logo

coord_transform's Introduction

坐标转换模块

此模块用于百度坐标系(bd-09)、火星坐标系(国测局坐标系、gcj02)、WGS84坐标系的相互转换,并提供中文地址到坐标的转换功能,使用了requests第三方库。中文地址到坐标转换使用百度地图API,需要申请API KEY。

使用说明

    lng = 116.4889647
    lat = 39.9854645
    # 火星坐标系->百度坐标系
    result1 = gcj02_to_bd09(lng, lat)
    # 百度坐标系->火星坐标系
    result2 = bd09_to_gcj02(lng, lat)
    # WGS84坐标系->火星坐标系
    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)

    # 填写在百度生成应用事的ak和sk
    bd_geo = BD_Geocoding('ak', 'sk')
    result7 = bd_geo.baidu_geocode('北京市朝阳区宏源大厦')
    print(result1, result2, result3, result4, result5, result6, result7)

coord_transform's People

Contributors

tianyuningmou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.