geocompass / pg-coordtransform Goto Github PK
View Code? Open in Web Editor NEW基于PostgreSQL+PostGIS的火星坐标系、百度坐标系、WGS84坐标系、CGCS2000坐标系的转换函数
License: MIT License
基于PostgreSQL+PostGIS的火星坐标系、百度坐标系、WGS84坐标系、CGCS2000坐标系的转换函数
License: MIT License
Can you add cgcs2000 projection coordinates (example coordinates: 264916.9576190968, 2051579.218930984) to other?
由于坐标点位存在Z坐标,进行转换后能否对Z坐标进行保留,
e.g.
SELECT st_z( geoc_wgs84togcj02(ST_Transform ( ST_GeomFromText ( 'POINT Z(543464.504 3012516.33 232.408)', 4546 ), 4490 )));
SELECT st_z(geoc_gcj02towgs84(ST_Transform ( ST_GeomFromText ( 'POINT Z(543464.504 3012516.33 232.408)', 4546 ), 4490 )));
返回Z 都为NULL
select geoc_wgs84tobd09(geom) from test_table 几何类型为polygong时报错
错误: 函数 geoc_ws84tobd09_line(geometry) 不存在 建议:没有匹配指定名称和参数类型的函数. 您也许需要增加明确的类型转换. 在位置:在赋值的第18行的PL/pgSQL函数geoc_wgs84tobd09_polygon(geometry) 在RETURN的第20行的PL/pgSQL函数geoc_wgs84tobd09(geometry)
我现在只有gcj02的坐标,想转换为wgs84之后存入数据库,我看geoc_gcj02towgs84方法里面做了限制,只能传入4490和4326的坐标。想请问下为什么这样设计?按照这个方法的设计,意思是我存入数据的时候,坐标系就应该选择4490或者4326,但是数据还是存gcj02的?谢了
geoc_gcj02tocgcs2000(st_setsrid(geoc_wgs84togcj02(st_setsrid(geom,4326)),'4490')))
我有BD09的坐标经纬度,需要通过这个函数转换,那么用一个geom存储bd09经纬度调用geoc_bd09towgs84_point(gemo)是一个好主意,但是我在运行的时候报错显示经纬度值不能包含小数点,请问这个函数正确的使用方法是什么呢
POINT(111.43877780268987 27.223905373786593) --2000
SELECT st_astext( geoc_wgs84togcj02(ST_GeomFromText('POINT(111.43877780268987 27.223905373786593)',4490))) --2000转高德
POINT(111.44439660708835 27.220718937598154) --gcj02
SELECT st_astext( geoc_gcj02towgs84(ST_GeomFromText('POINT(111.44439660708835 27.220718937598154)',4490)))--得到的高德反向2000
POINT(111.43878623805693 27.223915830237093)--反向2000 存在米级别的误差
请问这种情况是否正常?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.