English 中文(简体)
从内部点生成相邻多边形
原标题:Generate adjacent polygons from interior points

I have a set of points (UK full postcode centroids). There is a hierarchical relationship in the postcodes to postcode sectors and postcode districts. The original sectors and districts are contiguous. I wish to derive approximate boundaries for the sectors and districts such that any part of country falls into exactly one sector and exactly one district, all resulting polygons should ideally be contiguous and (obviously?) all original points should be in the appropriate polygons. Is there some appropriate algorithm? Better yet, is there some appropriate implementation?


我想我必须解释得不好 因为我不认为这回答了我的问题。

让我们只谈一些部门,因为答案也适用于地区。

There are 1.8m coordinates. Consider each of these is tagged with a postcode such as "SG13 7AT" The postcode tag can itself reflects the postcode-sector-district structure - the sector in this case is "SG13 7" There is no other data than these points and their postcode tags.

我知道存在一个界定这一段的边界,然而,这一边界数据不能免费获得,每个后界码点已知位于其真正的区界内。

我希望重新建立部门边界的近似值,以使点位于新创建的多边形范围内,并使我创建的多边形毗连。 这些边界不会准确反映原始边界,但它们对我的目的来说足够好。

最佳回答

为了将飞机分成各区,根据抽样邮政编码,使用根据全套点数计算的Voronoi图表,然后将每个图表单元格划入包含单元格站点的区。

我以红色和蓝色两个部分的例子来说明这一点。

数据来自两个部分:红色和蓝色/ ></p>

<p>在计算Voranoi图表后, 单元格的分区将显示如下 。 我勾划了红区和蓝色区之间的界限 。 请注意, 它们都是无界的, 但仅仅因为数据不包括其它区 。</p>

<p><img src=

现在,在我回答之前,你澄清了事情...

您需要的是“ 点位置查询” 的数据结构 : 给一个空间分区( 在您的情况下, 平面) 和一个查询点, 找到包含查询点的对象 。 在线条、 区段和多边形上, 有高效的算法( log( n) 查询时间), 并在计算几何库 CGAL 中应用 。

请注意,我使用"http://www.cgal.org/ Manual/latest/doc_html/cgal_manual/packages.html#part_IX" rel=“不跟随 noreferrer”>CGAL 2D三角图解 来说明解决办法。

请查看",http://www.cgal.org/ Manual/3.3/doc_html/cgal_manual/Arrangement_2/capter_main.html#Subsection_20.3.1" rel=“nofollow noreferrer">link ,以便记录点位置查询。

问题回答

暂无回答




相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签