Is there an efficient algorithm to generate a 2D c

2019-01-04 07:34发布

Having a set of (2D) points from a GIS file (a city map), I need to generate the polygon that defines the 'contour' for that map (its boundary). Its input parameters would be the points set and a 'maximum edge length'. It would then output the corresponding (probably non-convex) polygon.

The best solution I found so far was to generate the Delaunay triangles and then remove the external edges that are longer than the maximum edge length. After all the external edges are shorter than that, I simply remove the internal edges and get the polygon I want. The problem is, this is very time-consuming and I'm wondering if there's a better way.

10条回答
不美不萌又怎样
2楼-- · 2019-01-04 08:03

This paper discusses the Efficient generation of simple polygons for characterizing the shape of a set of points in the plane and provides the algorithm. There's also a Java applet utilizing the same algorithm here.

查看更多
虎瘦雄心在
3楼-- · 2019-01-04 08:03

One of the former students in our lab used some applicable techniques for his PhD thesis. I believe one of them is called "alpha shapes" and is referenced in the following paper:

http://www.cis.rit.edu/people/faculty/kerekes/pdfs/AIPR_2007_Gurram.pdf

That paper gives some further references you can follow.

查看更多
Rolldiameter
4楼-- · 2019-01-04 08:03

The guys here claim to have developed a k nearest neighbors approach to determining the concave hull of a set of points which behaves "almost linearly on the number of points". Sadly their paper seems to be very well guarded and you'll have to ask them for it.

Here's a good set of references that includes the above and might lead you to find a better approach.

查看更多
Root(大扎)
5楼-- · 2019-01-04 08:04

As a wildly adopted reference, PostGIS starts with a convexhull and then caves it in, you can see it here.

https://github.com/postgis/postgis/blob/380583da73227ca1a52da0e0b3413b92ae69af9d/postgis/postgis.sql.in#L5819

查看更多
登录 后发表回答