Linestring Concept

| Home | Libraries | People | FAQ | More

#### Linestring Concept

###### Description

The Linestring Concept describes the requirements for a linestring type. All algorithms in Boost.Geometry will check any geometry arguments against the concept requirements.

A linestring is a Curve with linear interpolation between Points. (OGC Simple Feature Specification).

###### Concept 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 Random Access Range
- The type defined by the metafunction `range_value<...>::type` must fulfill the Point Concept

###### Rules

Besides the Concepts, which are checks on compile-time, there are rules that valid linestrings must fulfill. Most algorithms work on any linestring, so either self-crossing or not. However, for correct results using the overlay algorithms (intersection and difference algorithms in combination with a polygon) self-intersections can disturb the process and result in incorrect results.

###### Available Models

- model::linestring
- a std::vector (requires registration)
- a std::deque (requires registration)

| Note
See also the sample in the Boost.Range documentation showing how a type can be adapted to a Boost.Range to fulfill the concept of a Linestring