Imported Upstream version 1.63.0
[platform/upstream/boost.git] / libs / geometry / doc / doxy / doxygen_output / html_by_doxygen / group__distance.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5 <title>Boost.Geometry (aka GGL, Generic Geometry Library)</title>
6 <link href="doxygen.css" rel="stylesheet" type="text/css">
7 <link href="tabs.css" rel="stylesheet" type="text/css">
8 </head>
9 <table cellpadding="2" width="100%">
10 <tbody>
11 <tr>
12 <td valign="top">
13 <img alt="Boost.Geometry" src="images/ggl-logo-big.png" height="80" width="200">
14 &nbsp;&nbsp;
15 </td>
16 <td valign="top" align="right">
17 <a href="http://www.boost.org">
18 <img alt="Boost C++ Libraries" src="images/accepted_by_boost.png" height="80" width="230" border="0">
19 </a>
20 </td>
21 </tr>
22 </tbody>
23 </table>
24 <!-- Generated by Doxygen 1.8.6 -->
25   <div id="navrow1" class="tabs">
26     <ul class="tablist">
27       <li><a href="index.html"><span>Main&#160;Page</span></a></li>
28       <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
29       <li><a href="modules.html"><span>Modules</span></a></li>
30       <li><a href="namespaces.html"><span>Namespaces</span></a></li>
31       <li><a href="annotated.html"><span>Classes</span></a></li>
32       <li><a href="files.html"><span>Files</span></a></li>
33       <li><a href="examples.html"><span>Examples</span></a></li>
34     </ul>
35   </div>
36 </div><!-- top -->
37 <div class="header">
38   <div class="summary">
39 <a href="#nested-classes">Classes</a> &#124;
40 <a href="#func-members">Functions</a>  </div>
41   <div class="headertitle">
42 <div class="title">distance: calculate distance between two geometries</div>  </div>
43 </div><!--header-->
44 <div class="contents">
45 <table class="memberdecls">
46 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
47 Classes</h2></td></tr>
48 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1comparable__distance__result.html">boost::geometry::comparable_distance_result&lt; Geometry1, Geometry2, Strategy &gt;</a></td></tr>
49 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meta-function defining return type of comparable_distance function.  <a href="structboost_1_1geometry_1_1comparable__distance__result.html#details">More...</a><br/></td></tr>
50 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
51 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1concepts_1_1_point_distance_strategy.html">boost::geometry::concepts::PointDistanceStrategy&lt; Strategy, Point1, Point2 &gt;</a></td></tr>
52 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks strategy for point-point or point-box or box-box distance.  <a href="structboost_1_1geometry_1_1concepts_1_1_point_distance_strategy.html#details">More...</a><br/></td></tr>
53 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
54 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1default__comparable__distance__result.html">boost::geometry::default_comparable_distance_result&lt; Geometry1, Geometry2 &gt;</a></td></tr>
55 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meta-function defining return type of comparable_distance function.  <a href="structboost_1_1geometry_1_1default__comparable__distance__result.html#details">More...</a><br/></td></tr>
56 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
57 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1default__distance__result.html">boost::geometry::default_distance_result&lt; Geometry1, Geometry2 &gt;</a></td></tr>
58 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meta-function defining return type of distance function.  <a href="structboost_1_1geometry_1_1default__distance__result.html#details">More...</a><br/></td></tr>
59 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
60 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1distance__result.html">boost::geometry::distance_result&lt; Geometry1, Geometry2, Strategy &gt;</a></td></tr>
61 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meta-function defining return type of distance function.  <a href="structboost_1_1geometry_1_1distance__result.html#details">More...</a><br/></td></tr>
62 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
63 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1strategy_1_1distance_1_1services_1_1default__strategy.html">boost::geometry::strategy::distance::services::default_strategy&lt; GeometryTag1, GeometryTag2, Point1, Point2, CsTag1, CsTag2, UnderlyingStrategy &gt;</a></td></tr>
64 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Traits class binding a default strategy for distance to one (or possibly two) coordinate system(s)  <a href="structboost_1_1geometry_1_1strategy_1_1distance_1_1services_1_1default__strategy.html#details">More...</a><br/></td></tr>
65 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
66 </table><table class="memberdecls">
67 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
68 Functions</h2></td></tr>
69 <tr class="memitem:ga96e975b2491449d359a57a84a03c2a86"><td class="memTemplParams" colspan="2">template&lt;typename Geometry1 , typename Geometry2 , typename Strategy &gt; </td></tr>
70 <tr class="memitem:ga96e975b2491449d359a57a84a03c2a86"><td class="memTemplItemLeft" align="right" valign="top">comparable_distance_result<br class="typebreak"/>
71 &lt; Geometry1, Geometry2, <br class="typebreak"/>
72 Strategy &gt;::type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__distance.html#ga96e975b2491449d359a57a84a03c2a86">boost::geometry::comparable_distance</a> (Geometry1 const &amp;geometry1, Geometry2 const &amp;geometry2, Strategy const &amp;strategy)</td></tr>
73 <tr class="memdesc:ga96e975b2491449d359a57a84a03c2a86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the comparable distance measurement of two geometries using the specified strategy.  <a href="#ga96e975b2491449d359a57a84a03c2a86">More...</a><br/></td></tr>
74 <tr class="separator:ga96e975b2491449d359a57a84a03c2a86"><td class="memSeparator" colspan="2">&#160;</td></tr>
75 <tr class="memitem:gabdb5143911178c7e4c78114a785551ae"><td class="memTemplParams" colspan="2">template&lt;typename Geometry1 , typename Geometry2 &gt; </td></tr>
76 <tr class="memitem:gabdb5143911178c7e4c78114a785551ae"><td class="memTemplItemLeft" align="right" valign="top">default_comparable_distance_result<br class="typebreak"/>
77 &lt; Geometry1, Geometry2 &gt;::type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__distance.html#gabdb5143911178c7e4c78114a785551ae">boost::geometry::comparable_distance</a> (Geometry1 const &amp;geometry1, Geometry2 const &amp;geometry2)</td></tr>
78 <tr class="memdesc:gabdb5143911178c7e4c78114a785551ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the comparable distance measurement of two geometries.  <a href="#gabdb5143911178c7e4c78114a785551ae">More...</a><br/></td></tr>
79 <tr class="separator:gabdb5143911178c7e4c78114a785551ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
80 <tr class="memitem:ga7d68c34d1ded4428903f906244b31da4"><td class="memTemplParams" colspan="2">template&lt;typename Geometry1 , typename Geometry2 , typename Strategy &gt; </td></tr>
81 <tr class="memitem:ga7d68c34d1ded4428903f906244b31da4"><td class="memTemplItemLeft" align="right" valign="top">distance_result&lt; Geometry1, <br class="typebreak"/>
82 Geometry2, Strategy &gt;::type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__distance.html#ga7d68c34d1ded4428903f906244b31da4">boost::geometry::distance</a> (Geometry1 const &amp;geometry1, Geometry2 const &amp;geometry2, Strategy const &amp;strategy)</td></tr>
83 <tr class="memdesc:ga7d68c34d1ded4428903f906244b31da4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the distance of two geometries using the specified strategy.  <a href="#ga7d68c34d1ded4428903f906244b31da4">More...</a><br/></td></tr>
84 <tr class="separator:ga7d68c34d1ded4428903f906244b31da4"><td class="memSeparator" colspan="2">&#160;</td></tr>
85 <tr class="memitem:gad5f5e3da7d38da77c40d7bdad61fee54"><td class="memTemplParams" colspan="2">template&lt;typename Geometry1 , typename Geometry2 &gt; </td></tr>
86 <tr class="memitem:gad5f5e3da7d38da77c40d7bdad61fee54"><td class="memTemplItemLeft" align="right" valign="top">default_distance_result<br class="typebreak"/>
87 &lt; Geometry1, Geometry2 &gt;::type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__distance.html#gad5f5e3da7d38da77c40d7bdad61fee54">boost::geometry::distance</a> (Geometry1 const &amp;geometry1, Geometry2 const &amp;geometry2)</td></tr>
88 <tr class="memdesc:gad5f5e3da7d38da77c40d7bdad61fee54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the distance of two geometries.  <a href="#gad5f5e3da7d38da77c40d7bdad61fee54">More...</a><br/></td></tr>
89 <tr class="separator:gad5f5e3da7d38da77c40d7bdad61fee54"><td class="memSeparator" colspan="2">&#160;</td></tr>
90 </table>
91 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
92 <h2 class="groupheader">Function Documentation</h2>
93 <a class="anchor" id="ga96e975b2491449d359a57a84a03c2a86"></a>
94 <div class="memitem">
95 <div class="memproto">
96 <div class="memtemplate">
97 template&lt;typename Geometry1 , typename Geometry2 , typename Strategy &gt; </div>
98       <table class="memname">
99         <tr>
100           <td class="memname">comparable_distance_result&lt;Geometry1, Geometry2, Strategy&gt;::type boost::geometry::comparable_distance </td>
101           <td>(</td>
102           <td class="paramtype">Geometry1 const &amp;&#160;</td>
103           <td class="paramname"><em>geometry1</em>, </td>
104         </tr>
105         <tr>
106           <td class="paramkey"></td>
107           <td></td>
108           <td class="paramtype">Geometry2 const &amp;&#160;</td>
109           <td class="paramname"><em>geometry2</em>, </td>
110         </tr>
111         <tr>
112           <td class="paramkey"></td>
113           <td></td>
114           <td class="paramtype">Strategy const &amp;&#160;</td>
115           <td class="paramname"><em>strategy</em>&#160;</td>
116         </tr>
117         <tr>
118           <td></td>
119           <td>)</td>
120           <td></td><td></td>
121         </tr>
122       </table>
123 </div><div class="memdoc">
124
125 <p>Calculate the comparable distance measurement of two geometries using the specified strategy. </p>
126 <p>The free function comparable_distance does not necessarily calculate the distance, but it calculates a distance measure such that two distances are comparable to each other. For example: for the Cartesian coordinate system, Pythagoras is used but the square root is not taken, which makes it faster and the results of two point pairs can still be compared to each other. </p>
127 <dl class="tparams"><dt>Template Parameters</dt><dd>
128   <table class="tparams">
129     <tr><td class="paramname">Geometry1</td><td>first geometry type </td></tr>
130     <tr><td class="paramname">Geometry2</td><td>second geometry type </td></tr>
131     <tr><td class="paramname">Strategy</td><td>Any type fulfilling a Distance Strategy Concept </td></tr>
132   </table>
133   </dd>
134 </dl>
135 <dl class="params"><dt>Parameters</dt><dd>
136   <table class="params">
137     <tr><td class="paramname">geometry1</td><td>A model of the specified concept </td></tr>
138     <tr><td class="paramname">geometry2</td><td>A model of the specified concept </td></tr>
139     <tr><td class="paramname">strategy</td><td>The strategy which will be used for distance calculations </td></tr>
140   </table>
141   </dd>
142 </dl>
143 <dl class="section return"><dt>Returns</dt><dd>The calculated comparable distance</dd></dl>
144  
145 </div>
146 </div>
147 <a class="anchor" id="gabdb5143911178c7e4c78114a785551ae"></a>
148 <div class="memitem">
149 <div class="memproto">
150 <div class="memtemplate">
151 template&lt;typename Geometry1 , typename Geometry2 &gt; </div>
152       <table class="memname">
153         <tr>
154           <td class="memname">default_comparable_distance_result&lt;Geometry1, Geometry2&gt;::type boost::geometry::comparable_distance </td>
155           <td>(</td>
156           <td class="paramtype">Geometry1 const &amp;&#160;</td>
157           <td class="paramname"><em>geometry1</em>, </td>
158         </tr>
159         <tr>
160           <td class="paramkey"></td>
161           <td></td>
162           <td class="paramtype">Geometry2 const &amp;&#160;</td>
163           <td class="paramname"><em>geometry2</em>&#160;</td>
164         </tr>
165         <tr>
166           <td></td>
167           <td>)</td>
168           <td></td><td></td>
169         </tr>
170       </table>
171 </div><div class="memdoc">
172
173 <p>Calculate the comparable distance measurement of two geometries. </p>
174 <p>The free function comparable_distance does not necessarily calculate the distance, but it calculates a distance measure such that two distances are comparable to each other. For example: for the Cartesian coordinate system, Pythagoras is used but the square root is not taken, which makes it faster and the results of two point pairs can still be compared to each other. </p>
175 <dl class="tparams"><dt>Template Parameters</dt><dd>
176   <table class="tparams">
177     <tr><td class="paramname">Geometry1</td><td>first geometry type </td></tr>
178     <tr><td class="paramname">Geometry2</td><td>second geometry type </td></tr>
179   </table>
180   </dd>
181 </dl>
182 <dl class="params"><dt>Parameters</dt><dd>
183   <table class="params">
184     <tr><td class="paramname">geometry1</td><td>A model of the specified concept </td></tr>
185     <tr><td class="paramname">geometry2</td><td>A model of the specified concept </td></tr>
186   </table>
187   </dd>
188 </dl>
189 <dl class="section return"><dt>Returns</dt><dd>The calculated comparable distance</dd></dl>
190  
191 </div>
192 </div>
193 <a class="anchor" id="ga7d68c34d1ded4428903f906244b31da4"></a>
194 <div class="memitem">
195 <div class="memproto">
196 <div class="memtemplate">
197 template&lt;typename Geometry1 , typename Geometry2 , typename Strategy &gt; </div>
198       <table class="memname">
199         <tr>
200           <td class="memname">distance_result&lt;Geometry1, Geometry2, Strategy&gt;::type boost::geometry::distance </td>
201           <td>(</td>
202           <td class="paramtype">Geometry1 const &amp;&#160;</td>
203           <td class="paramname"><em>geometry1</em>, </td>
204         </tr>
205         <tr>
206           <td class="paramkey"></td>
207           <td></td>
208           <td class="paramtype">Geometry2 const &amp;&#160;</td>
209           <td class="paramname"><em>geometry2</em>, </td>
210         </tr>
211         <tr>
212           <td class="paramkey"></td>
213           <td></td>
214           <td class="paramtype">Strategy const &amp;&#160;</td>
215           <td class="paramname"><em>strategy</em>&#160;</td>
216         </tr>
217         <tr>
218           <td></td>
219           <td>)</td>
220           <td></td><td></td>
221         </tr>
222       </table>
223 </div><div class="memdoc">
224
225 <p>Calculate the distance of two geometries using the specified strategy. </p>
226 <p>The free function area calculates the area of a geometry. using the specified strategy. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation.</p>
227 <dl class="tparams"><dt>Template Parameters</dt><dd>
228   <table class="tparams">
229     <tr><td class="paramname">Geometry1</td><td>Any type fulfilling a Geometry Concept </td></tr>
230     <tr><td class="paramname">Geometry2</td><td>Any type fulfilling a Geometry Concept </td></tr>
231     <tr><td class="paramname">Strategy</td><td>Any type fulfilling a Distance Strategy Concept </td></tr>
232   </table>
233   </dd>
234 </dl>
235 <dl class="params"><dt>Parameters</dt><dd>
236   <table class="params">
237     <tr><td class="paramname">geometry1</td><td>A model of the specified concept </td></tr>
238     <tr><td class="paramname">geometry2</td><td>A model of the specified concept </td></tr>
239     <tr><td class="paramname">strategy</td><td>The strategy which will be used for distance calculations </td></tr>
240   </table>
241   </dd>
242 </dl>
243 <dl class="section return"><dt>Returns</dt><dd>The calculated distance </dd></dl>
244 <dl class="section note"><dt>Note</dt><dd>The strategy can be a point-point strategy. In case of distance point-line/point-polygon it may also be a point-segment strategy.</dd></dl>
245  <dl><dt><b>Examples: </b></dt><dd><a class="el" href="01_point_example_8cpp-example.html#a6">01_point_example.cpp</a>, <a class="el" href="02_linestring_example_8cpp-example.html#a10">02_linestring_example.cpp</a>, <a class="el" href="07_a_graph_route_example_8cpp-example.html#a7">07_a_graph_route_example.cpp</a>, <a class="el" href="07_b_graph_route_example_8cpp-example.html#a6">07_b_graph_route_example.cpp</a>, <a class="el" href="c01_custom_point_example_8cpp-example.html#a4">c01_custom_point_example.cpp</a>, and <a class="el" href="x03_a_soci_example_8cpp-example.html#a2">x03_a_soci_example.cpp</a>.</dd>
246 </dl>
247 </div>
248 </div>
249 <a class="anchor" id="gad5f5e3da7d38da77c40d7bdad61fee54"></a>
250 <div class="memitem">
251 <div class="memproto">
252 <div class="memtemplate">
253 template&lt;typename Geometry1 , typename Geometry2 &gt; </div>
254       <table class="memname">
255         <tr>
256           <td class="memname">default_distance_result&lt;Geometry1, Geometry2&gt;::type boost::geometry::distance </td>
257           <td>(</td>
258           <td class="paramtype">Geometry1 const &amp;&#160;</td>
259           <td class="paramname"><em>geometry1</em>, </td>
260         </tr>
261         <tr>
262           <td class="paramkey"></td>
263           <td></td>
264           <td class="paramtype">Geometry2 const &amp;&#160;</td>
265           <td class="paramname"><em>geometry2</em>&#160;</td>
266         </tr>
267         <tr>
268           <td></td>
269           <td>)</td>
270           <td></td><td></td>
271         </tr>
272       </table>
273 </div><div class="memdoc">
274
275 <p>Calculate the distance of two geometries. </p>
276 <p>The default strategy is used, corresponding to the coordinate system of the geometries </p>
277 <dl class="tparams"><dt>Template Parameters</dt><dd>
278   <table class="tparams">
279     <tr><td class="paramname">Geometry1</td><td>Any type fulfilling a Geometry Concept </td></tr>
280     <tr><td class="paramname">Geometry2</td><td>Any type fulfilling a Geometry Concept </td></tr>
281   </table>
282   </dd>
283 </dl>
284 <dl class="params"><dt>Parameters</dt><dd>
285   <table class="params">
286     <tr><td class="paramname">geometry1</td><td>A model of the specified concept </td></tr>
287     <tr><td class="paramname">geometry2</td><td>A model of the specified concept </td></tr>
288   </table>
289   </dd>
290 </dl>
291 <dl class="section return"><dt>Returns</dt><dd>The calculated distance</dd></dl>
292  
293 </div>
294 </div>
295 </div><!-- contents -->
296 <hr size="1">
297 <table width="100%">
298 <tbody>
299 <tr>
300 <td align="left"><small>
301 <p>April 2, 2011</p>
302 </small></td>
303 <td align="right">
304 <small>
305 Copyright &copy; 2007-2011 Barend Gehrels, Amsterdam, the Netherlands<br>
306 Copyright &copy; 2008-2011 Bruno Lalande, Paris, France<br>
307 Copyright &copy; 2009-2010 Mateusz Loskot, London, UK<br>
308 </small>
309 </td>
310 </tr>
311 </tbody>
312 </table>
313 <address style="text-align: right;"><small>
314 Documentation is generated by&nbsp;<a href="http://www.doxygen.org/index.html">Doxygen</a>
315 </small></address>
316 </body>
317 </html>