Subject: CGAL users discussion list
List archive
- From: Benjamin Streitz <>
- To:
- Subject: Re: [cgal-discuss] Area of polygon obtained with alpha_shape_2
- Date: Wed, 19 Dec 2018 13:01:51 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=Pass
- Ironport-phdr: 9a23:BXrlORTEXftxFQob7vp3kPmx69psv+yvbD5Q0YIujvd0So/mwa69ZxON2/xhgRfzUJnB7Loc0qyK6/CmATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbB/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzJhMx+jKxVoxyvqBJwzIHWfI6bO+Fzfr/fcN4AWWZNQshcWi5HD4ihb4UPFe0BPeNAooTguVQOqxm+ChOpBOPuzD9Dm2L43bEg0+s/EAHGwA0hFM8JvXvPstr1MqESUOCuwanIyjXDdelW2TDn6IjTbB8hu++MXbNsfsXP00UgCh3Kg0yWpIf4PD2VzvwAvmuG4+Z6SO6iimoqpxtsrjWgx8ogkJfFipwJxl3C6C532pw6JceiR05+edOkEIVftyWdN4ZuR8MiRG5ltD8iyrEapZK3ZS8Kx489yx7EbvyHb5CI7gj5VOeQJjd4gmxqdKiiiBms6USgy+v8Wdeo0FtSrSdJj8PAum0M2hHX8MSLV/Rw80a71TqRyQzf9vlIIUUumqraL54hzKQwlp0WsUnbBSD5hkP2jKmWd0g/+uio7P7nYq/hpp+GLI97lBv+MrovmsOjH+s0KBUBUHaD9eSmyLLj5VH5QKlNjvAujqbZv4rVJcACqqGkAg9VyZos6wukDze9y9kYhnkGLFddeB2dlYTpOlfOIOr5DfilmVisni1rlLj6OejqDZzJa3TCi7z8Zq1V6khGyQN1w8oMyYhTD+QrLfTxU0rwspTjEgU0MhCmi7LtBdN7x6seXniVBbWCPbnMsFSFoO4idbrfLLQJsSrwfqB2r8XlimU0zAdELPuZmKAPYXX9JcxIZkCQYH7imNAESDdYvg0kVuvwk1CYTz9YajC+UvBkv21pOMedFY7GA7uVrvmZxi7iTs9WYXpcDUqXHG32do6JHfsBOnrLf51R1wccXL3kcLcPkBGjsAiglehiKbaR4nVA8JXpksNw+/WVjwM18zEyA8nPimw=
You can have multiple resulting polygons, e.g. polygon with a hole or multiple disconnected polygons which all are non simple. To avoid that you need first find the right alpha value such that you have only one polygon and possibly remove a hole from that polygon. Also you can sort the vertices by using points with data. Assign the points an identifier and use the edge iterator to find the correct order.
On 18/12/18 13:52, Orxan Shibliyev wrote:
I used CGAL's alpha_shape_2 in REGULARIZED mode to get outline of set of points. I want to calculate area of the resultant shape. I tried to make a Polygon_2 from vertices obtained with Alpha_shape_vertices_iterator but it seems like the points are not ordered because is_simple for the polygon returned wrong. Segments obtained with Alpha_shape_edges_iterator are not ordered/connected as well. is_simple is important because area is ill defined without it.
Can someone share his experience with finding area of polygon obtained with alpha_shape_2?
- [cgal-discuss] Area of polygon obtained with alpha_shape_2, Orxan Shibliyev, 12/18/2018
- Re: [cgal-discuss] Area of polygon obtained with alpha_shape_2, Renato Silveira, 12/19/2018
- Re: [cgal-discuss] Area of polygon obtained with alpha_shape_2, Benjamin Streitz, 12/19/2018
Archive powered by MHonArc 2.6.18.