Files
geometry/doc/reference/length.qbk
Barend Gehrels 8124ca7dce Inspect tool report update
[SVN r67628]
2011-01-03 18:10:53 +00:00

115 lines
3.0 KiB
Plaintext

[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2009-2011 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
Copyright (c) 2009-2011 Mateusz Loskot (mateusz@loskot.net)
Copyright (c) 2009-2011 Bruno Lalande, Paris, France.
Use, modification and distribution is subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/group__length.xml]
[section:length_2_with_strategy length (with strategy)]
Calculates the length of a geometry using the specified strategy.
[heading Description]
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 (e.g. distance over the Earth)
[heading Synopsis]
``template<typename Geometry, typename Strategy>
length_result<Geometry>::type length (Geometry const &geometry, Strategy const &strategy)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
[[Strategy const &] [Any type fulfilling a distance Strategy Concept ] [strategy] [The strategy which will be used for distance calculations ]]
]
[heading Returns]
The calculated length
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/length.hpp>`
[heading Behavior]
[table
[[Case] [Behavior] ]
[[__0dim__][[qbk_ret 0]]]
[[__1dim__][[qbk_ret the length]]]
[[__2dim__][[qbk_ret 0]]]
]
[heading Complexity]
Linear
[heading Examples]
[length_strategy]
[endsect]
[section:length_1 length]
Calculates the length of a geometry.
[heading Description]
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.
[heading Synopsis]
``template<typename Geometry>
length_result<Geometry>::type length (Geometry const &geometry)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
]
[heading Returns]
The calculated length
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/length.hpp>`
[heading Behavior]
[table
[[Case] [Behavior] ]
[[__0dim__][[qbk_ret 0]]]
[[__1dim__][[qbk_ret the length]]]
[[__2dim__][[qbk_ret 0]]]
]
[heading Complexity]
Linear
[heading Examples]
[length]
[endsect]