template<typename Geometry>
class boost::geometry::concept::Linestring< Geometry >
Linestring concept.
- Formal definition:
- The linestring concept is defined as following:
- there must be a specialization of traits::tag defining linestring_tag as type
- it must behave like a Boost.Range
- it must implement a std::back_insert_iterator
- either by implementing push_back
- or by specializing std::back_insert_iterator
- Note
- to fulfill the concepts, no traits class has to be specialized to define the point type.
- Example:
A custom linestring, defining the necessary specializations to fulfill to the concept.
Suppose that the following linestring is defined:
It can then be adapted to the concept as following:
- Note
- There is also the registration macro BOOST_GEOMETRY_REGISTER_LINESTRING
- For registration of std::vector<P> (and deque, and list) it is enough to include the header-file geometries/adapted/std_as_linestring.hpp. That registers a vector as a linestring (so it cannot be registered as a linear ring then, in the same source code).