Subject: [ggl] How to intersect two linestrings?
From: Arash Partow (arash)
Date: 2010-08-28 10:00:26
On 28/08/2010 12:00 PM, Hartmut Kaiser wrote:
> I'm trying to find my way through GGL in order to use it in a real
> application and got stuck at something which is probably very simple. I have
> two linestrings std::vector<point_2d>, containing 2 points each (i.e. two
> line segments). How do I calculate a) whether these line segments intersect,
> and b) if they intersect, at what (single) coordinate?
line-segments may straddle one another if they are parallel, so the intersection object can be either empty, 1 point or a line-segment (infinite number of intersections).
Geometry list run by mateusz at loskot.net