Subject: [ggl] Intersection of linestring with polygon
From: Aleksandar Babic (aleksandarb)
Date: 2011-11-17 04:19:00
I didn't claim that things I suggested will work in Mikes case. I simply
said that he might try something and see if it goes well or he can build
further on the obtained result.
Let's say we have functionality OP and "Geom1 OP Geom2" is currently
implemented just between same kinds, but not when things are mixed.
If we i.e. have segment and linearring we could build linearstrings from
them, apply the OP and then try to analyse result further.
Hope that this kind of thinking is applicable in some cases :)
On Tue, 2011-11-15 at 23:04 +0100, Barend Gehrels wrote:
> Hi Mike, Aleksander,
> On 15-11-2011 8:23, Aleksandar Babic wrote:
> > Hi,
> > It seems that the functionality for few combinations (also for some
> > other algorithms) is not yet implemented.
> > One approximation that you might try (may be valid approach from case to
> > case) is to try converting both geometries to the closest common
> > concept.
> > For example, try converting line and polygon to the linestring/ring and
> > the finding the intersection (might help with other algorithms as well).
> > Hope this helps.
> > BR
> > Aleksandar
> > On Mon, 2011-11-14 at 16:23 -0700, Mike Williams wrote:
> >> Hello,
> >> I have successfully used boost::geometry::intersection to get the
> >> intersection of two polygons. How I want to get the intersection of a
> >> polygon and a line (the portion of the line that is internal to the
> >> polygon). When I call intersection(polygon, linestring,
> >> vector_of_linestring) I get compiler errors.
> >> Could someone please advise me on how that can be accomplished.
> Indeed it is not yet implemented. It can be done (is done by some
> people) by using intersection points, but that is a bit tedious (if
> you're not deep inside the details of the library). Because this (plus
> boolean functions) is asked so much I'll try to work on this coming weekend.
> Aleksandar, to be honest I don't understand your suggestion completely,
> or it might work for some algorithms but I don't see how it would work here.
> Regards, Barend
> ggl mailing list
Geometry list run by mateusz at loskot.net