Boost logo

Geometry :

From: bluespider (dh_at_[hidden])
Date: 2019-05-22 11:18:33

Hi I'm not new to boost but am new to boost geometry.
I have been using the dissolve functionality to process degenerate polygons.
By degenerate I mean that these polygons usually have some self
intersections and that the objective of processing here is to create a
bounding polygon. All self intersections will be internal. Let me explain...
A poly line is the starting point and in my application this is the route of
a submarine cable or pipeline. We from that route we want to create a
polygon which surrounds a section of the route. In other words the polygon
is first created by running down the left and right sides of the route and
taking the perpendicular position offset by a fixed amount from each
waypoint. On close (smaller than half the corridor width) pairs of turns of
the route the side with the smaller angle can be left with a self

Now with the same starting route line (several thousand points) and certain
distances for the corridor width I can successfully use
boost:geometry:dissolve and create a perfect result. One that I can then
reduce down to a polygon with fewer vertices in order to then use it in a
geospatial query. BUT often I instead end up with an empty output polygon or
a list of one or more tiny polygons. The main bulk of the area of interest
is then lost completely. Changing the corridor width by a tiny tiny fraction
can mean the difference between success and failure and it may have
something to do with the total number of self intersections but that's the
only clue I have right now. I did find one case where scaling the values of
the input coordinates made a difference to the results but it was still a
degenerate result.

I understand from the source that there is a Strategy template argument but
don't understand its possible use here although it looks like it could
perhaps determine a winding policy.

Right now I'm struggling with lack of documentation here and also I'm using
Microsoft compiler which doesn't help much when debugging template sources.
Does anyone have an example of using dissolve with strategy or can suggest
any other docs?

Having already abandoned use of boost::geometry::simplify (ironically due to
compile errors) and instead rolling my own Douglas-Puecker I find using
boost::geometry to be rather time consuming and life is too short for that.

Also of interest is the CoordinateSystem template arg to
boost::geometry::model::point and a discussion regarding this could be
useful. My data is actually geospatial of course so for some algorithms non
cartesian calculations could be a great benefit but although I can see that
there could be some support for this I have nothing much to help get

Sent from:

Geometry list run by mateusz at