PostGIS算法示例

1 点的最近点查询

select smoke, ST_AsGeoJSON(geom) as geom, company, address from power t order by ST_Distance(t.geom,ST_GeometryFromText('POINT(113.77990722656251 34.63320791137959)',4326))  limit 1
4326为坐标系编号;原理是根据距离找最近的一个记录

猜你喜欢

转载自blog.csdn.net/gisuuser/article/details/79102591
今日推荐