1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Linestring Concept</title> 5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../index.html" title="Chapter 1. Geometry"> 8<link rel="up" href="../concepts.html" title="Concepts"> 9<link rel="prev" href="concept_point.html" title="Point Concept"> 10<link rel="next" href="concept_polygon.html" title="Polygon Concept"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="concept_point.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concept_polygon.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="geometry.reference.concepts.concept_linestring"></a><a class="link" href="concept_linestring.html" title="Linestring Concept">Linestring 28 Concept</a> 29</h4></div></div></div> 30<h6> 31<a name="geometry.reference.concepts.concept_linestring.h0"></a> 32 <span class="phrase"><a name="geometry.reference.concepts.concept_linestring.description"></a></span><a class="link" href="concept_linestring.html#geometry.reference.concepts.concept_linestring.description">Description</a> 33 </h6> 34<p> 35 The Linestring Concept describes the requirements for a linestring type. 36 All algorithms in Boost.Geometry will check any geometry arguments against 37 the concept requirements. 38 </p> 39<p> 40 A linestring is <span class="emphasis"><em>a Curve with linear interpolation between Points</em></span>. 41 (<a href="http://www.opengeospatial.org/standards/sfa" target="_top">OGC Simple Feature 42 Specification</a>). 43 </p> 44<h6> 45<a name="geometry.reference.concepts.concept_linestring.h1"></a> 46 <span class="phrase"><a name="geometry.reference.concepts.concept_linestring.concept_definition"></a></span><a class="link" href="concept_linestring.html#geometry.reference.concepts.concept_linestring.concept_definition">Concept 47 Definition</a> 48 </h6> 49<p> 50 The Linestring Concept is defined as following: 51 </p> 52<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 53<li class="listitem"> 54 there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag</span></code> 55 defining <code class="computeroutput"><span class="identifier">linestring_tag</span></code> 56 as type 57 </li> 58<li class="listitem"> 59 it must behave like a Boost.Range Random Access Range 60 </li> 61<li class="listitem"> 62 The type defined by the metafunction <code class="computeroutput"><span class="identifier">range_value</span><span class="special"><...>::</span><span class="identifier">type</span></code> 63 must fulfill the <a class="link" href="concept_point.html" title="Point Concept">Point 64 Concept</a> 65 </li> 66</ul></div> 67<h6> 68<a name="geometry.reference.concepts.concept_linestring.h2"></a> 69 <span class="phrase"><a name="geometry.reference.concepts.concept_linestring.rules"></a></span><a class="link" href="concept_linestring.html#geometry.reference.concepts.concept_linestring.rules">Rules</a> 70 </h6> 71<p> 72 Besides the Concepts, which are checks on compile-time, there are rules 73 that valid linestrings must fulfill. Most algorithms work on any linestring, 74 so either self-crossing or not. However, for correct results using the 75 overlay algorithms (intersection and difference algorithms in combination 76 with a polygon) self-intersections can disturb the process and result in 77 incorrect results. 78 </p> 79<h6> 80<a name="geometry.reference.concepts.concept_linestring.h3"></a> 81 <span class="phrase"><a name="geometry.reference.concepts.concept_linestring.available_models"></a></span><a class="link" href="concept_linestring.html#geometry.reference.concepts.concept_linestring.available_models">Available 82 Models</a> 83 </h6> 84<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 85<li class="listitem"> 86 <a class="link" href="../models/model_linestring.html" title="model::linestring">model::linestring</a> 87 </li> 88<li class="listitem"> 89 a std::vector (requires registration) 90 </li> 91<li class="listitem"> 92 a std::deque (requires registration) 93 </li> 94</ul></div> 95<div class="note"><table border="0" summary="Note"> 96<tr> 97<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 98<th align="left">Note</th> 99</tr> 100<tr><td align="left" valign="top"><p> 101 See also the sample in the <a href="../../../../../../range/doc/html/range/reference/extending/method_2.html" target="_top">Boost.Range 102 documentation</a> showing how a type can be adapted to a Boost.Range 103 to fulfill the concept of a Linestring 104 </p></td></tr> 105</table></div> 106</div> 107<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 108<td align="left"></td> 109<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam 110 Wulkiewicz, Oracle and/or its affiliates<p> 111 Distributed under the Boost Software License, Version 1.0. (See accompanying 112 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 113 </p> 114</div></td> 115</tr></table> 116<hr> 117<div class="spirit-nav"> 118<a accesskey="p" href="concept_point.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concept_polygon.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 119</div> 120</body> 121</html> 122