• 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::distance::cross_track</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_distance_projected_point.html" title="strategy::distance::projected_point">
10<link rel="next" href="strategy_distance_cross_track_point_box.html" title="strategy::distance::cross_track_point_box">
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_distance_projected_point.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_distance_cross_track_point_box.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_distance_cross_track"></a><a class="link" href="strategy_distance_cross_track.html" title="strategy::distance::cross_track">strategy::distance::cross_track</a>
28</h4></div></div></div>
29<p>
30          <a class="indexterm" name="idm45635668793600"></a><a class="indexterm" name="idm45635668792912"></a><a class="indexterm" name="idm45635668792288"></a>
31Strategy functor for distance point to segment calculation.
32        </p>
33<h6>
34<a name="geometry.reference.strategies.strategy_distance_cross_track.h0"></a>
35          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.description"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.description">Description</a>
36        </h6>
37<p>
38          Class which calculates the distance of a point to a segment, for points
39          on a sphere or globe
40        </p>
41<h6>
42<a name="geometry.reference.strategies.strategy_distance_cross_track.h1"></a>
43          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.synopsis"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.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">CalculationType</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Strategy</span><span class="special">&gt;</span>
48<span class="keyword">class</span> <span class="identifier">strategy</span><span class="special">::</span><span class="identifier">distance</span><span class="special">::</span><span class="identifier">cross_track</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_distance_cross_track.h2"></a>
57          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.template_parameter_s_"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.template_parameter_s_">Template
58          parameter(s)</a>
59        </h6>
60<div class="informaltable"><table class="table">
61<colgroup>
62<col>
63<col>
64<col>
65</colgroup>
66<thead><tr>
67<th>
68                  <p>
69                    Parameter
70                  </p>
71                </th>
72<th>
73                  <p>
74                    Default
75                  </p>
76                </th>
77<th>
78                  <p>
79                    Description
80                  </p>
81                </th>
82</tr></thead>
83<tbody>
84<tr>
85<td>
86                  <p>
87                    typename CalculationType
88                  </p>
89                </td>
90<td>
91                  <p>
92                    void
93                  </p>
94                </td>
95<td>
96                  <p>
97                    numeric type for calculation (e.g. high precision); if <span class="bold"><strong>void</strong></span> then it is extracted automatically
98                    from the coordinate type and (if necessary) promoted to floating
99                    point
100                  </p>
101                </td>
102</tr>
103<tr>
104<td>
105                  <p>
106                    typename Strategy
107                  </p>
108                </td>
109<td>
110                  <p>
111                    haversine&lt;double, CalculationType&gt;
112                  </p>
113                </td>
114<td>
115                  <p>
116                    underlying point-point distance strategy, defaults to haversine
117                  </p>
118                </td>
119</tr>
120</tbody>
121</table></div>
122<h6>
123<a name="geometry.reference.strategies.strategy_distance_cross_track.h3"></a>
124          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.constructor_s_"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.constructor_s_">Constructor(s)</a>
125        </h6>
126<div class="informaltable"><table class="table">
127<colgroup>
128<col>
129<col>
130<col>
131</colgroup>
132<thead><tr>
133<th>
134                  <p>
135                    Function
136                  </p>
137                </th>
138<th>
139                  <p>
140                    Description
141                  </p>
142                </th>
143<th>
144                  <p>
145                    Parameters
146                  </p>
147                </th>
148</tr></thead>
149<tbody>
150<tr>
151<td>
152                  <p>
153</p>
154<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">cross_track</span><span class="special">()</span></pre>
155<p>
156                  </p>
157                </td>
158<td>
159                </td>
160<td>
161                </td>
162</tr>
163<tr>
164<td>
165                  <p>
166</p>
167<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">cross_track</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">Strategy</span><span class="special">::</span><span class="identifier">radius_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">r</span><span class="special">)</span></pre>
168<p>
169                  </p>
170                </td>
171<td>
172                </td>
173<td>
174                  <p>
175                    <span class="bold"><strong>typename Strategy::radius_type const &amp;</strong></span>:
176                    <span class="emphasis"><em>r</em></span>:
177                  </p>
178                </td>
179</tr>
180<tr>
181<td>
182                  <p>
183</p>
184<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">cross_track</span><span class="special">(</span><span class="identifier">Strategy</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">s</span><span class="special">)</span></pre>
185<p>
186                  </p>
187                </td>
188<td>
189                </td>
190<td>
191                  <p>
192                    <span class="bold"><strong>Strategy const &amp;</strong></span>: <span class="emphasis"><em>s</em></span>:
193                  </p>
194                </td>
195</tr>
196</tbody>
197</table></div>
198<h6>
199<a name="geometry.reference.strategies.strategy_distance_cross_track.h4"></a>
200          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.member_function_s_"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.member_function_s_">Member
201          Function(s)</a>
202        </h6>
203<div class="informaltable"><table class="table">
204<colgroup>
205<col>
206<col>
207<col>
208<col>
209</colgroup>
210<thead><tr>
211<th>
212                  <p>
213                    Function
214                  </p>
215                </th>
216<th>
217                  <p>
218                    Description
219                  </p>
220                </th>
221<th>
222                  <p>
223                    Parameters
224                  </p>
225                </th>
226<th>
227                  <p>
228                    Returns
229                  </p>
230                </th>
231</tr></thead>
232<tbody>
233<tr>
234<td>
235                  <p>
236</p>
237<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">relate_segment_segment_strategy_type</span> <span class="identifier">get_relate_segment_segment_strategy</span><span class="special">()</span></pre>
238<p>
239                  </p>
240                </td>
241<td>
242                </td>
243<td>
244                </td>
245<td>
246                </td>
247</tr>
248<tr>
249<td>
250                  <p>
251</p>
252<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">point_in_geometry_strategy_type</span> <span class="identifier">get_point_in_geometry_strategy</span><span class="special">()</span></pre>
253<p>
254                  </p>
255                </td>
256<td>
257                </td>
258<td>
259                </td>
260<td>
261                </td>
262</tr>
263<tr>
264<td>
265                  <p>
266</p>
267<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">Point</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">PointOfSegment</span><span class="special">&gt;</span>
268<span class="identifier">return_type</span><span class="special">&lt;</span> <span class="identifier">Point</span><span class="special">,</span> <span class="identifier">PointOfSegment</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">Point</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">PointOfSegment</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">sp1</span><span class="special">,</span> <span class="identifier">PointOfSegment</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">sp2</span><span class="special">)</span></pre>
269<p>
270                  </p>
271                </td>
272<td>
273                </td>
274<td>
275                  <p>
276                    <span class="bold"><strong>Point const &amp;</strong></span>: <span class="emphasis"><em>p</em></span>:
277                  </p>
278                  <p>
279                    <span class="bold"><strong>PointOfSegment const &amp;</strong></span>:
280                    <span class="emphasis"><em>sp1</em></span>:
281                  </p>
282                  <p>
283                    <span class="bold"><strong>PointOfSegment const &amp;</strong></span>:
284                    <span class="emphasis"><em>sp2</em></span>:
285                  </p>
286                </td>
287<td>
288                </td>
289</tr>
290<tr>
291<td>
292                  <p>
293</p>
294<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">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">&gt;</span>
295<span class="identifier">radius_type</span> <span class="identifier">vertical_or_meridian</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">lat1</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">lat2</span><span class="special">)</span></pre>
296<p>
297                  </p>
298                </td>
299<td>
300                </td>
301<td>
302                  <p>
303                    <span class="bold"><strong>T1</strong></span>: <span class="emphasis"><em>lat1</em></span>:
304                  </p>
305                  <p>
306                    <span class="bold"><strong>T2</strong></span>: <span class="emphasis"><em>lat2</em></span>:
307                  </p>
308                </td>
309<td>
310                </td>
311</tr>
312<tr>
313<td>
314                  <p>
315</p>
316<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Strategy</span><span class="special">::</span><span class="identifier">radius_type</span> <span class="identifier">radius</span><span class="special">()</span></pre>
317<p>
318                  </p>
319                </td>
320<td>
321                </td>
322<td>
323                </td>
324<td>
325                </td>
326</tr>
327</tbody>
328</table></div>
329<h6>
330<a name="geometry.reference.strategies.strategy_distance_cross_track.h5"></a>
331          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.header"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.header">Header</a>
332        </h6>
333<p>
334          <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">spherical</span><span class="special">/</span><span class="identifier">distance_cross_track</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
335        </p>
336<h6>
337<a name="geometry.reference.strategies.strategy_distance_cross_track.h6"></a>
338          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_cross_track.see_also"></a></span><a class="link" href="strategy_distance_cross_track.html#geometry.reference.strategies.strategy_distance_cross_track.see_also">See
339          also</a>
340        </h6>
341<p>
342          <a class="link" href="../algorithms/distance/distance_3_with_strategy.html" title="distance (with strategy)">distance
343          (with strategy)</a>
344        </p>
345</div>
346<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
347<td align="left"></td>
348<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
349      Wulkiewicz, Oracle and/or its affiliates<p>
350        Distributed under the Boost Software License, Version 1.0. (See accompanying
351        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>)
352      </p>
353</div></td>
354</tr></table>
355<hr>
356<div class="spirit-nav">
357<a accesskey="p" href="strategy_distance_projected_point.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_distance_cross_track_point_box.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
358</div>
359</body>
360</html>
361