• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/============================================================================
2  Boost.Geometry (aka GGL, Generic Geometry Library)
3
4  Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
5  Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
6  Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
7
8  Use, modification and distribution is subject to the Boost Software License,
9  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10  http://www.boost.org/LICENSE_1_0.txt)
11=============================================================================/]
12
13
14[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
15[/ Generated from doxy/doxygen_output/xml/group__length.xml]
16[section:length_1 length]
17
18'''<indexterm><primary>length</primary></indexterm>'''
19Calculates the length of a geometry.
20
21[heading Description]
22The 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.
23
24[heading Synopsis]
25``template<typename Geometry>
26default_length_result<Geometry>::type length(Geometry const & geometry)``
27
28[heading Parameters]
29
30[table
31[[Type] [Concept] [Name] [Description] ]
32[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
33]
34
35
36[heading Returns]
37The calculated length
38
39[heading Header]
40Either
41
42`#include <boost/geometry.hpp>`
43
44
45Or
46
47`#include <boost/geometry/algorithms/length.hpp>`
48
49[include reference/algorithms/length.qbk]
50[length] [length_output]
51
52
53[endsect]
54
55[section:length_2_with_strategy length (with strategy)]
56
57'''<indexterm><primary>length</primary></indexterm>'''
58Calculates the length of a geometry using the specified strategy.
59
60[heading Description]
61The 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.
62
63[heading Synopsis]
64``template<typename Geometry, typename Strategy>
65default_length_result<Geometry>::type length(Geometry const & geometry, Strategy const & strategy)``
66
67[heading Parameters]
68
69[table
70[[Type] [Concept] [Name] [Description] ]
71[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
72[[Strategy const &] [Any type fulfilling a distance Strategy Concept ] [strategy] [The strategy which will be used for distance calculations ]]
73]
74
75
76[heading Returns]
77The calculated length
78
79[heading Header]
80Either
81
82`#include <boost/geometry.hpp>`
83
84
85Or
86
87`#include <boost/geometry/algorithms/length.hpp>`
88
89[include reference/algorithms/length.qbk]
90[length_with_strategy] [length_with_strategy_output]
91
92
93[endsect]
94
95