• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry
2 
3 // Copyright (c) 2019, Oracle and/or its affiliates.
4 
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6 
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9 
10 #include "common.hpp"
11 
12 #include <boost/geometry/algorithms/area.hpp>
13 #include <boost/geometry/algorithms/length.hpp>
14 #include <boost/geometry/algorithms/perimeter.hpp>
15 
test_main(int,char * [])16 int test_main(int, char*[])
17 {
18     geom g;
19 
20     bg::area(g.r, bg::strategy::area::cartesian<>());
21     bg::area(g.r, bg::strategy::area::spherical<>());
22     bg::area(g.r, bg::strategy::area::geographic<>());
23     bg::area(g.po, bg::strategy::area::cartesian<>());
24     bg::area(g.po, bg::strategy::area::spherical<>());
25     bg::area(g.po, bg::strategy::area::geographic<>());
26     bg::area(g.mpo, bg::strategy::area::cartesian<>());
27     bg::area(g.mpo, bg::strategy::area::spherical<>());
28     bg::area(g.mpo, bg::strategy::area::geographic<>());
29 
30     bg::length(g.s, bg::strategy::distance::pythagoras<>());
31     bg::length(g.s, bg::strategy::distance::haversine<>());
32     bg::length(g.s, bg::strategy::distance::geographic<>());
33     bg::length(g.ls, bg::strategy::distance::pythagoras<>());
34     bg::length(g.ls, bg::strategy::distance::haversine<>());
35     bg::length(g.ls, bg::strategy::distance::geographic<>());
36     bg::length(g.mls, bg::strategy::distance::pythagoras<>());
37     bg::length(g.mls, bg::strategy::distance::haversine<>());
38     bg::length(g.mls, bg::strategy::distance::geographic<>());
39 
40     bg::perimeter(g.r, bg::strategy::distance::pythagoras<>());
41     bg::perimeter(g.r, bg::strategy::distance::haversine<>());
42     bg::perimeter(g.r, bg::strategy::distance::geographic<>());
43     bg::perimeter(g.po, bg::strategy::distance::pythagoras<>());
44     bg::perimeter(g.po, bg::strategy::distance::haversine<>());
45     bg::perimeter(g.po, bg::strategy::distance::geographic<>());
46     bg::perimeter(g.mpo, bg::strategy::distance::pythagoras<>());
47     bg::perimeter(g.mpo, bg::strategy::distance::haversine<>());
48     bg::perimeter(g.mpo, bg::strategy::distance::geographic<>());
49 
50     return 0;
51 }
52