Subject: Re: [geometry] Correcting an invalid polygon.
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-11-30 18:26:23
On 28-11-2012 17:27, Adam Starkey wrote:
> Apologies if this has been covered elsewhere. It seems like it should have
> been, but my Google foo is only returning old, out of date pages.
> I need to remove degeneracies from polygons that have been manually drawn by
> users. The polygons are being draw either by free=hand mouse dragging or
> with a stylus, and will typically have closely packed vertices, which makes
> it hard to block the introduction of self-intersections or self-tangents
> whilst capturing the contour.
> As far as i can see all of the main set operators require both two inputs
> and that the inputs already be valid. What is the preferred way of making a
> polygon valid?
Making a polygon valid is not possible using Boost.Geometry from the
released branch. There is "dissolve" in the extensions (in Trunk) which
tries to make, e.g., two polygons from a polygon with
self-intersections. But that is work in progress and not yet released.
Geometry list run by mateusz at loskot.net