boost::geometry::concept::Linestring
linestring_concept.hpp
typename 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

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:

    structcustom_linestring1:std::deque<P>
    {
    intid;
    };

It can then be adapted to the concept as following:

    //adaptcustom_linestring1
    namespaceboost{namespacegeometry{namespacetraits
    {
    template<typenameP>
    structtag<custom_linestring1<P>>{typedeflinestring_tagtype;};
    }}}//namespaceboost::geometry::traits

- 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).