Boost logo

Geometry :

Subject: [ggl] Trying a simple linestring-linear_ring intersection
From: Elvis Stansvik (elvstone)
Date: 2010-02-26 15:35:05


2010/2/26 Barend Gehrels <Barend.Gehrels_at_[hidden]>:
> Hi Elvis,
>
> I'm now starting at your problem. The code below indeed does not run:2
>
>
>> ? ?/* A line string. */
>> ? ?linestring_2d s;
>> ? ?s.push_back(make<point_2d>(0.0, 10.0));
>> ? ?s.push_back(make<point_2d>(20.0, 10.0));
>>
>> ? ?/* Clip the linear ring with the linestring. */
>> ? ?std::vector<linestring_2d> r;
>> ? ?intersection_inserter<linestring_2d>(t, s, std::back_inserter(r));
>> The error I'm getting is:
>>
>> test.cpp:26: ? instantiated from here
>> boost-geometry/boost/geometry/algorithms/within.hpp:336: error:
>> 'apply' is not a member of
>> (...)
>
>
> Indeed this is not running; it will be implemented some moment; however the
> problem you were interested in was getting intersection points between a
> polygon and a linestring, including their direction, right?

Right.

However, since my last e-mail I've realized that Qt (which is the
library I'm using for the GUI) has some rudimentary support for
finding intersection points between lines and polygons. Since my
requirements are pretty low (for instance all my polygons will be
convex), I think that I'll be able to hack together the additional
code that I need to detect if a polygon was "entered" or "leaved" as
well as the angle of incidence. At least that's what I'm hoping.

So as it turns out, perhaps a full-blown geometric computation library
is overkill for my simple application.

That said, support for this would of course be a nice addition to
Boost.Geometry nonetheless. I just want you to know that my needs are
not that urgent anymore ;)

Thanks a lot for the quick support though!

Regards,
Elvis

>
> Regards, Barend
>
>
>
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/mailman/listinfo/ggl
>


Geometry list run by mateusz at loskot.net