• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>strategy::simplify::douglas_peucker</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="../strategies.html" title="Strategies">
9<link rel="prev" href="strategy_side_geographic.html" title="strategy::side::geographic">
10<link rel="next" href="strategy_transform_inverse_transformer.html" title="strategy::transform::inverse_transformer">
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="strategy_side_geographic.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../strategies.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="strategy_transform_inverse_transformer.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.strategies.strategy_simplify_douglas_peucker"></a><a class="link" href="strategy_simplify_douglas_peucker.html" title="strategy::simplify::douglas_peucker">strategy::simplify::douglas_peucker</a>
28</h4></div></div></div>
29<p>
30          <a class="indexterm" name="idm45635667721856"></a><a class="indexterm" name="idm45635667721168"></a><a class="indexterm" name="idm45635667720480"></a>
31Implements the simplify algorithm.
32        </p>
33<h6>
34<a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.h0"></a>
35          <span class="phrase"><a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.description"></a></span><a class="link" href="strategy_simplify_douglas_peucker.html#geometry.reference.strategies.strategy_simplify_douglas_peucker.description">Description</a>
36        </h6>
37<p>
38          The douglas_peucker strategy simplifies a linestring, ring or vector of
39          points using the well-known Douglas-Peucker algorithm.
40        </p>
41<h6>
42<a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.h1"></a>
43          <span class="phrase"><a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.synopsis"></a></span><a class="link" href="strategy_simplify_douglas_peucker.html#geometry.reference.strategies.strategy_simplify_douglas_peucker.synopsis">Synopsis</a>
44        </h6>
45<p>
46</p>
47<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Point</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">PointDistanceStrategy</span><span class="special">&gt;</span>
48<span class="keyword">class</span> <span class="identifier">strategy</span><span class="special">::</span><span class="identifier">simplify</span><span class="special">::</span><span class="identifier">douglas_peucker</span>
49<span class="special">{</span>
50  <span class="comment">// ...</span>
51<span class="special">};</span>
52</pre>
53<p>
54        </p>
55<h6>
56<a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.h2"></a>
57          <span class="phrase"><a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.template_parameter_s_"></a></span><a class="link" href="strategy_simplify_douglas_peucker.html#geometry.reference.strategies.strategy_simplify_douglas_peucker.template_parameter_s_">Template
58          parameter(s)</a>
59        </h6>
60<div class="informaltable"><table class="table">
61<colgroup>
62<col>
63<col>
64</colgroup>
65<thead><tr>
66<th>
67                  <p>
68                    Parameter
69                  </p>
70                </th>
71<th>
72                  <p>
73                    Description
74                  </p>
75                </th>
76</tr></thead>
77<tbody>
78<tr>
79<td>
80                  <p>
81                    typename Point
82                  </p>
83                </td>
84<td>
85                  <p>
86                    the point type
87                  </p>
88                </td>
89</tr>
90<tr>
91<td>
92                  <p>
93                    typename PointDistanceStrategy
94                  </p>
95                </td>
96<td>
97                  <p>
98                    point-segment distance strategy to be used
99                  </p>
100                </td>
101</tr>
102</tbody>
103</table></div>
104<h6>
105<a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.h3"></a>
106          <span class="phrase"><a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.member_function_s_"></a></span><a class="link" href="strategy_simplify_douglas_peucker.html#geometry.reference.strategies.strategy_simplify_douglas_peucker.member_function_s_">Member
107          Function(s)</a>
108        </h6>
109<div class="informaltable"><table class="table">
110<colgroup>
111<col>
112<col>
113<col>
114<col>
115</colgroup>
116<thead><tr>
117<th>
118                  <p>
119                    Function
120                  </p>
121                </th>
122<th>
123                  <p>
124                    Description
125                  </p>
126                </th>
127<th>
128                  <p>
129                    Parameters
130                  </p>
131                </th>
132<th>
133                  <p>
134                    Returns
135                  </p>
136                </th>
137</tr></thead>
138<tbody><tr>
139<td>
140                  <p>
141</p>
142<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Range</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
143<span class="identifier">OutputIterator</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">Range</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">range</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">distance_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">max_distance</span><span class="special">)</span></pre>
144<p>
145                  </p>
146                </td>
147<td>
148                </td>
149<td>
150                  <p>
151                    <span class="bold"><strong>Range const &amp;</strong></span>: <span class="emphasis"><em>range</em></span>:
152                  </p>
153                  <p>
154                    <span class="bold"><strong>OutputIterator</strong></span>: <span class="emphasis"><em>out</em></span>:
155                  </p>
156                  <p>
157                    <span class="bold"><strong>distance_type const &amp;</strong></span>:
158                    <span class="emphasis"><em>max_distance</em></span>:
159                  </p>
160                </td>
161<td>
162                </td>
163</tr></tbody>
164</table></div>
165<h6>
166<a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.h4"></a>
167          <span class="phrase"><a name="geometry.reference.strategies.strategy_simplify_douglas_peucker.header"></a></span><a class="link" href="strategy_simplify_douglas_peucker.html#geometry.reference.strategies.strategy_simplify_douglas_peucker.header">Header</a>
168        </h6>
169<p>
170          <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">strategies</span><span class="special">/</span><span class="identifier">agnostic</span><span class="special">/</span><span class="identifier">simplify_douglas_peucker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
171        </p>
172</div>
173<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
174<td align="left"></td>
175<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
176      Wulkiewicz, Oracle and/or its affiliates<p>
177        Distributed under the Boost Software License, Version 1.0. (See accompanying
178        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>)
179      </p>
180</div></td>
181</tr></table>
182<hr>
183<div class="spirit-nav">
184<a accesskey="p" href="strategy_side_geographic.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../strategies.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="strategy_transform_inverse_transformer.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
185</div>
186</body>
187</html>
188