Algorithm - How to build a polygon around a polyline

别来无恙 提交于 2019-12-10 18:52:08

问题


I am building a web site using googles Map API. However, as I am on a shared server, I do not have access to a database with spatial extensions.

Given an itinerary, which is nothing more than a series of line segments, I need to build a polygon at a given distance. For example 10km either side of the itinerary.

This is the classic buffering request, which I have seen as being referenced as the " Minkowski sum " algorithm. After having searched, I have not found a working example of an implementation.

Can anyone help me implement this ... please ?


回答1:


You should take a look at CGAL. This library contains (among a lot of other things) an Open Source Minkowski sum implementation, which you could analyse. See here



来源:https://stackoverflow.com/questions/5777074/algorithm-how-to-build-a-polygon-around-a-polyline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!