Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
614 views
in Technique[技术] by (71.8m points)

python - How do you generate the non-convex hull from a series of points?

I am currently trying to construct the area covered by a device over an operating period. The first step in this process appears to be constructing a polygon of the covered area. Since the pattern is not a standard shape, convex hulls overstate the covered area by jumping to the largest coverage area possible.

I have found a paper that appears to cover the concept of non-convex hull generation, but no discussions on how to implement this within a high level language. http://www.geosensor.net/papers/duckham08.PR.pdf

Has anyone seen a straight forward algorithm for constructing a non-convex hull or concave hull or perhaps any python code to achieve the same result?

I have tried convex hulls mainly qhull, with a limited edge size with limited success. Also I have noticed some licensed libraries that will not be able to be distributed, so unfortunately thats off the table. Any better ideas or cookbooks?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You might try looking into Alpha Shapes. The CGAL library can compute them.

Edit: I see that the paper you linked references alpha shapes, and also has an algorithm listing. Is that not high level enough for you? Since you listed python as a tag, I'm sure there are Delaunay triangulation libraries in Python, which I think is the hardest part of implementing the algorithm; you just need to make sure you can modify the resulting triangulation output. The boundary query functions can probably be implemented with associative arrays.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...