Code Monkey home page Code Monkey logo

shp_transform's Introduction

shp-geotransform

在**特色GIS主义中,我们拿到的SHP数据一般有WGS84和GCJ02两种坐标系。而在实际的GIS开发(基于SHP文件的空间分析和空间展示)中,我们一般用到的坐标系有WGS84、GCJ02、BD09,而且在很多情况下数据的坐标系和底图坐标系息息相关,坐标系不匹配会出现图层偏移,这就涉及到坐标系转换的问题。

shp-geotransform是什么

本项目旨在从源头解决坐标系不一致问题,做到一次转换,多次利用。

常见地图坐标系科普

  • WGS84:国际标准,BingMap、谷歌国外地图、osm地图等国外的地图、GPS芯片或者北斗芯片获取的经纬度
  • GCJ02:**标准,谷歌**地图、搜搜**地图、高德地图、阿里云、腾讯地图
  • BD09:百度标准,百度地图

安装

ubuntu安装GDAL sudo apt-get install libgdal-dev sudo apt-get install gdal-bin sudo apt-get -y install python-gdal 运行shp-transform.py;

window安装GDAL 根据python版本下载相应的GDAL安装文件,下载地址如下: http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal 打开上面地址,下载:GDAL-2.1.3-cp35-cp35m-win_amd64.whl pip install GDAL-2.1.3-cp35-cp35m-win_amd64.whl

使用

  1. 选择放置您的shp文件到origin-shp文件夹中;

  2. 设置参数,打开根目录下shp_transform.py:

    参数说明:

    • toEPSG:输出shp坐标系统,如:4326;
    • transformType:坐标系转换类型,包括g2b,b2g,w2g,g2w,b2w,w2b五种;
    • srcName:转入shp文件名或目录,如:polygon.shp;
    • tgtName:转出shp文件名或目录,如:polygon2.shp;

shp_transform's People

Contributors

liyingben avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

krqi

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.