Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@16
|
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@16
|
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
Chris@16
|
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
Chris@16
|
6
|
Chris@16
|
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
Chris@16
|
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
Chris@16
|
9
|
Chris@16
|
10 // Use, modification and distribution is subject to the Boost Software License,
|
Chris@16
|
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
12 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
13
|
Chris@16
|
14 #ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
|
Chris@16
|
15 #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
|
Chris@16
|
16
|
Chris@16
|
17
|
Chris@16
|
18 #include <boost/geometry/core/cs.hpp>
|
Chris@16
|
19 #include <boost/geometry/core/coordinate_type.hpp>
|
Chris@16
|
20 #include <boost/geometry/strategies/area.hpp>
|
Chris@16
|
21 #include <boost/geometry/util/select_most_precise.hpp>
|
Chris@16
|
22
|
Chris@16
|
23
|
Chris@16
|
24 namespace boost { namespace geometry
|
Chris@16
|
25 {
|
Chris@16
|
26
|
Chris@16
|
27 /*!
|
Chris@16
|
28 \brief Meta-function defining return type of area function, using the default strategy
|
Chris@16
|
29 \ingroup area
|
Chris@16
|
30 \note The strategy defines the return-type (so this situation is different
|
Chris@16
|
31 from length, where distance is sqr/sqrt, but length always squared)
|
Chris@16
|
32 */
|
Chris@16
|
33
|
Chris@16
|
34 template <typename Geometry>
|
Chris@16
|
35 struct default_area_result
|
Chris@16
|
36 {
|
Chris@16
|
37 typedef typename point_type<Geometry>::type point_type;
|
Chris@16
|
38 typedef typename strategy::area::services::default_strategy
|
Chris@16
|
39 <
|
Chris@16
|
40 typename cs_tag<point_type>::type,
|
Chris@16
|
41 point_type
|
Chris@16
|
42 >::type strategy_type;
|
Chris@16
|
43
|
Chris@16
|
44 typedef typename strategy_type::return_type type;
|
Chris@16
|
45 };
|
Chris@16
|
46
|
Chris@16
|
47
|
Chris@16
|
48 }} // namespace boost::geometry
|
Chris@16
|
49
|
Chris@16
|
50
|
Chris@16
|
51 #endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
|