Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::concept::Linestring< Geometry > Class Template Reference

Linestring concept. More...

#include <linestring_concept.hpp>

Public Member Functions

 BOOST_CONCEPT_USAGE (Linestring)
 

Detailed Description

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

Member Function Documentation


The documentation for this class was generated from the following file: