Subject: Re: [geometry] is it possible to get (more) information from bg::intersects?
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-12-11 07:00:11
On 11 December 2013 11:27, Mats Taraldsvik <mats.taraldsvik_at_[hidden]> wrote:
>>I'm not sure, perhaps you mean this internal utility?
> Perhaps. I must admit I do not fully understand TurnInfo. Could you give me
> an example of how to use it to get the location(s) of intersections, please?
> Ideally, it would be exposed in a user-facing algorithm/feature.
It is an internal detail of overlay algos, AFAIU, it's deliberately
not exposed to public,
so I have no idea if it could be exposed as a feature.
AFAIR, this utility has changed over time.
It used to return range (i.e. std::vector) of simply intersection points,
now it returns a richer structure, turn_info, but it contains point,
I haven't tested it after the changes, but it should work something like this:
// G is your BG-enabled geometry type
bg::get_intersection_points(g1, g2, turns);
for (auto t : turns)
Hopefully, it works as I understand it, otherwise sorry for confusion :)
-- Mateusz Åoskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net