About the Linestring Concept

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

About the Linestring Concept

Samuel Debionne
Hello all,

I'm a bit confused about the Concept that my (adapted) linestring model
must satisfy.

It seems that Mutable Linestring and Const Linestring are two different

The online doc says :

- there must be a specialization of traits::tag defining linestring_tag
as type
- it must behave like a Boost.Range Random Access Range
- The type defined by the metafunction range_value<...>::type must
fulfill the Point Concept

So far, I'm all good with range_iterator<point *> where point fulfill
the Point Concept.

Then in the doc of code that checks the Linestring concept
(linestring_concept.hpp) is written :

- it must implement a std::back_insert_iterator
    - either by implementing push_back
    - or by specializing std::back_insert_iterator

In the code of Linestring<> itself :

  traits::resize<Geometry>::apply(*ls, 0);

Does that means that a (mutable) Linestring is not longer a Range but
rather a Container ? To me a Mutable Range (and so a mutable Linestring)
is a range that has its value mutable but the range itself cannot be

IMHO, most of the algorithms would be happy with a Range of Points (but
clear). Could you please clarify this to me ?

Geometry mailing list
[hidden email]