|
Geometry : |
Subject: [ggl] Clipping/Intersecting efficiency
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-05-29 04:37:27
> Hi,
>
> Why not use the indirect_iterator from Boost.Iterators? Something like:
>
> std::vector<point*> v;
>
> cout << length(make_indirect_iterator(v.begin()),
> make_indirect_iterator(v.end))
> << endl;
>
Interesting! This will change the story slightly, the "point" has then
to be registered, instead of the point*, and then it can be called:
cout << length(std::make_pair(make_indirect_iterator(v.begin()), make_indirect_iterator(v.end))) << endl
This should do the job (pair is registered by including
geometries/adapted/std_as_linestring.hpp)
However, for a polygon it is probably not feasible using this.
Regards, Barend
Geometry list run by mateusz at loskot.net