Boost logo

Geometry :

Subject: [ggl] intersection_segment...
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-06-26 05:44:47


Hi Mateusz,

>
>>> Conceptually, shouln't a linestring be a vector of segments?
>>>
>> Conceptually: yes. But implemented is a std::vector of points, for the
>> obvious reason not to store the same points again and again.
>>
>
> What parametrize the container used underneath, so it's possible to use
> different ones, not only std::vector?
>
Sure. You can do that in several ways.

1) because we use the Linestring Concept, people can add their own
linestrings. A linestring should be a (any) Boost Range implementation
of elements fulfilling the Point Concept.
2) if using the ggl::linestring, it is parameterized by a template
template parameter so you can define a linestring as ggl::linestring<P,
std::deque>
3) the standard containers are also adapted, so you can use std::deque<P>

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20090626/e7fe0260/attachment.html


Geometry list run by mateusz at loskot.net