Giter Site home page Giter Site logo

wangliangxu / pg-coordtransform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geocompass/pg-coordtransform

0.0 1.0 0.0 45 KB

基于PostgreSQL+PostGIS的火星坐标系、百度坐标系、WGS84坐标系、CGCS2000坐标系的转换函数

License: MIT License

PLpgSQL 100.00%

pg-coordtransform's Introduction

Welcome to pg-coordtransform 👋

Version

基于PostgreSQL和PostGIS的坐标转换函数,支持点、线、面的WGS84和CGCS2000与GCJ02和BD09坐标系与之间互转。

Example

-- 如果转换后结果为null,查看geom的srid是否为4326或者4490
WGS84转GCJ02
select geoc_wgs84togcj02(geom) from test_table
GCJ02转WGS84
select geoc_gcj02towgs84(geom) from test_table

WGS84转BD09
select geoc_wgs84tobd09(geom) from test_table
BD09转WGS84
select geoc_bd09towgs84(geom) from test_table

CGCS2000转GCJ02
select geoc_cgcs2000togcj02(geom) from test_table
GCJ02转CGCS2000
select geoc_gcj02tocgcs2000(geom) from test_table

CGCS2000转BD09
select geoc_cgcs2000tobd09(geom) from test_table
BD09转CGCS2000
select geoc_bd09tocgcs2000(geom) from test_table

GCJ02转BD09
select geoc_gcj02tobd09(geom) from test_table
BD09转GCJ02
select geoc_bd09togcj02(geom) from test_table

How to use

PostgreSQL安装PostGIS扩展
复制geoc-pg-coordtansform.sql中代码,在数据库执行

Who use/Who star

  • 阿里巴巴(digoal,德哥)

  • CTOLib码库

  • 国信司南

  • 九天气象(lzuniujp08)

  • 深圳普天宜通股份有限公司(ShareQiu1994)

  • 中原百科(zhongyuanbaike)

  • MonsterBOBO(hanrea)

  • nocode(sanford)

Author

👤 LH QQ:1016817543

👤 Wangsb QQ:1017218804

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


pg-coordtransform's People

Contributors

mrsmallliu 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.