1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
9 <table cellpadding="2" width="100%">
13 <img alt="Boost.Geometry" src="images/ggl-logo-big.png" height="80" width="200">
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">
24 <!-- Generated by Doxygen 1.8.6 -->
25 <div id="navrow1" class="tabs">
27 <li><a href="index.html"><span>Main Page</span></a></li>
28 <li><a href="pages.html"><span>Related 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>
39 <a href="#nested-classes">Classes</a> |
40 <a href="#func-members">Functions</a> </div>
41 <div class="headertitle">
42 <div class="title">length: calculate length of a linear geometry</div> </div>
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  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1default__length__result.html">boost::geometry::default_length_result< Geometry ></a></td></tr>
49 <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Meta-function defining return type of length function. <a href="structboost_1_1geometry_1_1default__length__result.html#details">More...</a><br/></td></tr>
50 <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
51 </table><table class="memberdecls">
52 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
53 Functions</h2></td></tr>
54 <tr class="memitem:ga38dff36b8deb6a1a8cb0a3d6387af8fc"><td class="memTemplParams" colspan="2">template<typename Geometry > </td></tr>
55 <tr class="memitem:ga38dff36b8deb6a1a8cb0a3d6387af8fc"><td class="memTemplItemLeft" align="right" valign="top">default_length_result<br class="typebreak"/>
56 < Geometry >::type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__length.html#ga38dff36b8deb6a1a8cb0a3d6387af8fc">boost::geometry::length</a> (Geometry const &geometry)</td></tr>
57 <tr class="memdesc:ga38dff36b8deb6a1a8cb0a3d6387af8fc"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the length of a geometry. <a href="#ga38dff36b8deb6a1a8cb0a3d6387af8fc">More...</a><br/></td></tr>
58 <tr class="separator:ga38dff36b8deb6a1a8cb0a3d6387af8fc"><td class="memSeparator" colspan="2"> </td></tr>
59 <tr class="memitem:ga31c0f8fcd943475255e7ab329f2c2771"><td class="memTemplParams" colspan="2">template<typename Geometry , typename Strategy > </td></tr>
60 <tr class="memitem:ga31c0f8fcd943475255e7ab329f2c2771"><td class="memTemplItemLeft" align="right" valign="top">default_length_result<br class="typebreak"/>
61 < Geometry >::type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__length.html#ga31c0f8fcd943475255e7ab329f2c2771">boost::geometry::length</a> (Geometry const &geometry, Strategy const &strategy)</td></tr>
62 <tr class="memdesc:ga31c0f8fcd943475255e7ab329f2c2771"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the length of a geometry using the specified strategy. <a href="#ga31c0f8fcd943475255e7ab329f2c2771">More...</a><br/></td></tr>
63 <tr class="separator:ga31c0f8fcd943475255e7ab329f2c2771"><td class="memSeparator" colspan="2"> </td></tr>
65 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
66 <h2 class="groupheader">Function Documentation</h2>
67 <a class="anchor" id="ga38dff36b8deb6a1a8cb0a3d6387af8fc"></a>
69 <div class="memproto">
70 <div class="memtemplate">
71 template<typename Geometry > </div>
72 <table class="memname">
74 <td class="memname">default_length_result<Geometry>::type boost::geometry::length </td>
76 <td class="paramtype">Geometry const & </td>
77 <td class="paramname"><em>geometry</em></td><td>)</td>
81 </div><div class="memdoc">
83 <p>Calculates the length of a geometry. </p>
84 <p>The free function length calculates the length (the sum of distances between consecutive points) of a geometry. It uses the default strategy, based on the coordinate system of the geometry. </p>
85 <dl class="tparams"><dt>Template Parameters</dt><dd>
86 <table class="tparams">
87 <tr><td class="paramname">Geometry</td><td>Any type fulfilling a Geometry Concept </td></tr>
91 <dl class="params"><dt>Parameters</dt><dd>
92 <table class="params">
93 <tr><td class="paramname">geometry</td><td>A model of the specified concept </td></tr>
97 <dl class="section return"><dt>Returns</dt><dd>The calculated length</dd></dl>
98 <dl><dt><b>Examples: </b></dt><dd><a class="el" href="02_linestring_example_8cpp-example.html#a8">02_linestring_example.cpp</a>, <a class="el" href="07_a_graph_route_example_8cpp-example.html#a5">07_a_graph_route_example.cpp</a>, <a class="el" href="07_b_graph_route_example_8cpp-example.html#a5">07_b_graph_route_example.cpp</a>, and <a class="el" href="c05_custom_point_pointer_example_8cpp-example.html#a3">c05_custom_point_pointer_example.cpp</a>.</dd>
102 <a class="anchor" id="ga31c0f8fcd943475255e7ab329f2c2771"></a>
103 <div class="memitem">
104 <div class="memproto">
105 <div class="memtemplate">
106 template<typename Geometry , typename Strategy > </div>
107 <table class="memname">
109 <td class="memname">default_length_result<Geometry>::type boost::geometry::length </td>
111 <td class="paramtype">Geometry const & </td>
112 <td class="paramname"><em>geometry</em>, </td>
115 <td class="paramkey"></td>
117 <td class="paramtype">Strategy const & </td>
118 <td class="paramname"><em>strategy</em> </td>
126 </div><div class="memdoc">
128 <p>Calculates the length of a geometry using the specified strategy. </p>
129 <p>The free function length calculates the length (the sum of distances between consecutive points) 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>
130 <dl class="tparams"><dt>Template Parameters</dt><dd>
131 <table class="tparams">
132 <tr><td class="paramname">Geometry</td><td>Any type fulfilling a Geometry Concept </td></tr>
133 <tr><td class="paramname">Strategy</td><td>Any type fulfilling a distance Strategy Concept </td></tr>
137 <dl class="params"><dt>Parameters</dt><dd>
138 <table class="params">
139 <tr><td class="paramname">geometry</td><td>A model of the specified concept </td></tr>
140 <tr><td class="paramname">strategy</td><td>The strategy which will be used for distance calculations </td></tr>
144 <dl class="section return"><dt>Returns</dt><dd>The calculated length</dd></dl>
148 </div><!-- contents -->
153 <td align="left"><small>
158 Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands<br>
159 Copyright © 2008-2011 Bruno Lalande, Paris, France<br>
160 Copyright © 2009-2010 Mateusz Loskot, London, UK<br>
166 <address style="text-align: right;"><small>
167 Documentation is generated by <a href="http://www.doxygen.org/index.html">Doxygen</a>