本文介绍了使用PostGIS在线串周围创建多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是PostGIS的新手,需要在这里寻求帮助.我有一条来自Google地图的多段线(代表一条路线),需要围绕它建立一个以米或公里为单位的特定距离的多边形(缓冲区).

I am new to PostGIS and need to ask for some help here.I have a polyline from google maps (representing an itinerary) and need to build a polygon (buffer) around it with a specific distance in meters or kilometers.

对于输入,我具有纬度/经度点列表和所需的缓冲距离.

For input, I have the list of Latitude/Longitude points and the required buffer distance.

谁能帮助我建立查询,以便返回的结果是纬度/经度坐标中的多边形,随时可以在地图上绘制?

Can anyone help me build the query so that the returned result is the polygon in Latitude/Longitude coordinates, ready to be plotted on the map ?

推荐答案

经过测试,我发现postgis生成的多边形缓冲区不可靠.也就是说,如果我想在多义线周围留出5公里的缓冲区,则postgis将返回 AT MOST 5公里但在某些时候比这还短的多边形.

After testing, I found that the polygon buffer produced by postgis is unreliable. That is to say, if I want a 5 kilometre buffer around a polyline, postgis will return a polygon which is AT MOST 5 kilometres, yet at some points less than this.

放弃明信片

这篇关于使用PostGIS在线串周围创建多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 23:34