Giter Site home page Giter Site logo

freegis / postgis_coordinate_transform Goto Github PK

View Code? Open in Web Editor NEW
257.0 22.0 110.0 51 KB

一个在postgis中结合**国情,批量对数据进行加偏到百度坐标,高德谷歌的火星坐标,或者逆向纠偏

License: Apache License 2.0

PLpgSQL 100.00%

postgis_coordinate_transform's Issues

gcj2wgs时错误

国测局坐标往wgs84转换时报错,提示缺少gcj2wgs函数,看了sql,应该是没有写完整。

错误, Input geom 0 is invalid: Hole lies outside shell at or near point

GEOSUnaryUnion: TopologyException: Input geom 0 is invalid: Hole lies outside shell at or near point 119.10570754484918 25.490528474546696 at 119.10570754484918 25.490528474546696 在位置:SQL statement "insert into temp_polygons(rec_ctid,polygon) select t1.rec_ctid,ST_Multi(ST_Union(t1.geom)) from ( select t.rec_ctid,case when t.interiorlinestrings is null then ST_MakePolygon(t.outerlinestring) else ST_MakePolygon(t.outerlinestring,t.interiorlinestrings) end as geom fr ...

[Err] 错误: lwpoly_from_lwlines: shell must be closed

您好。我执行 select FreeGIS_Coordinate_Transform('public','pg_build_dq','GCJ2WGS'); 时报错如下:请问怎么解决?是我数据的问题吗? 第一次转换的时候正常,第二次就报错了。
注意: 对拆分点进行偏移计算完成!
CONTEXT: 在RAISE的第97行的PL/pgSQL函数_freegis_coordinate_transform_1(text,text,freegis_coordinate_transform_type)
在RETURN的第8行的PL/pgSQL函数freegis_coordinate_transform(text,text,freegis_coordinate_transform_type)

注意: 偏移计算结果拼装原图形...
CONTEXT: 在RAISE的第99行的PL/pgSQL函数_freegis_coordinate_transform_1(text,text,freegis_coordinate_transform_type)
在RETURN的第8行的PL/pgSQL函数freegis_coordinate_transform(text,text,freegis_coordinate_transform_type)

[Err] 错误: lwpoly_from_lwlines: shell must be closed
CONTEXT: SQL 语句 "with _result as (
with _Multi_Polygon_result as (
with _polygon_result as (select rec_ctid,geom_path[1] as _path1,
geom_path[2] as _path2,ST_MakeLine(target_geom) as geom from _split_result group by rec_ctid,_path1, _path2)
select t1.rec_ctid,t1._path1,case when t2.geom is null then ST_MakePolygon(t1.geom) else ST_MakePolygon(t1.geom,t2.geom) end as geom
from (select rec_ctid,_path1,geom from _polygon_result t where t._path2=1) t1 left join
(select rec_ctid,_path1,array_agg(geom) as geom from _polygon_result t where t._path2!=1 group by rec_ctid,_path1) t2
on t1.rec_ctid=t2.rec_ctid
)
select t.rec_ctid,ST_Multi(ST_Union(geom)) as geom from _Multi_Polygon_result t group by t.rec_ctid
)
update public.pg_build_dq t1 set transform_geom=t2.geom from _result t2 where t1.ctid=t2.rec_ctid"
在EXECUTE的第128行的PL/pgSQL函数_freegis_coordinate_transform_1(text,text,freegis_coordinate_transform_type)
在RETURN的第8行的PL/pgSQL函数freegis_coordinate_transform(text,text,freegis_coordinate_transform_type)

期望加入3d或4d数据的处理

现在的数据中存在有3d或4d的情况,期望在转换时提供这样的接口,转换过程中只对xy进行修正,然后加入原有的z值或者m值。

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.