如何围绕折线构建多边形

如何围绕折线构建多边形

本文介绍了算法-如何围绕折线构建多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用googles Map API建立一个网站.但是,就像在共享服务器上一样,我无权访问具有空间扩展名的数据库.

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.

给出一个行程,不过就是一系列线段,我需要在给定的距离上构建一个多边形.例如,在行程的两侧10公里.

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.

这是经典的缓冲请求,我将其视为"Minkowski sum" 算法.搜索之后,我没有找到实现的可行示例.

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 ?

推荐答案

您应该看看 CGAL .该库包含(除其他事项外)一个开源Minkowski sum实现,您可以对其进行分析.请参见此处

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

这篇关于算法-如何围绕折线构建多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 10:44