一个有效的算法用于缓冲的折线来创建一个多边形? [英] An effective algorithm for buffering a polyline to create a polygon?

查看:306
本文介绍了一个有效的算法用于缓冲的折线来创建一个多边形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一些代码,将缓冲一行创建多边形,如下图所示。

I need to write some code that will buffer a line to create a polygon as shown below.

http://www.sli.unimelb.edu.au/gisweb/BuffersModule/Buff_line.htm

从下面的步骤概述,我可以创造周围没有跨越自己或有过紧的曲线线条简单多边形,但正如行我试图缓冲是波浪swhirly飓风轨道,这真的不够好。

From following the steps outlined, I can create polygon shapes around simple lines that do not cross themselves or have too tight curves, but as the lines I'm trying to buffer are squiggly swhirly hurricane tracks, it's really not good enough.

我知道有一个在SQL Server 2008中的功能,可以做到这一点,但恐怕这是目前一个没有去。

I know there's a function in SQL Server 2008 that can do this, but I'm afraid that's currently a no go.

任何人都可以点我一个更完整的算法,我可以跟随,或任何背景信息,可以帮助我摸不着头脑的方向?

Can anyone point me in the direction of a more complete algorithm I can follow, or any background info that could help me figure this out?

推荐答案

尽管这被称为的缓存的地理信息系统,显然是谁在算法的工作数学家称它的夫斯基总结。谷歌搜索发现这个页面算法专家史蒂芬Skiena 的链接到一些算法实现和一些书籍。希望这可以帮助!

Although this is called buffering in GIS, apparently the mathematicians who work on algorithms call it the Minkowski sum. Googling found this page by algorithm expert Steven Skiena that links to several algorithm implementations and some books. Hope this helps!

其中的算法实现它现在链接到(03月09日)是的 CGAL ,一个开源的C函数库。

One of the algorithm implementations it links to right now (March 09) is CGAL, an open source C library.

这篇关于一个有效的算法用于缓冲的折线来创建一个多边形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆