]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/geometries/register/multi_point_templated.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 //[register_multi_point_templated
11 //` Show the use of the macro BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED
14 #include <boost/geometry.hpp>
15 #include <boost/geometry/geometries/adapted/boost_tuple.hpp>
16 #include <boost/geometry/geometries/register/multi_point.hpp>
19 BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(std::deque
)
21 BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian
)
25 // Normal usage of std::
26 std::deque
<boost::tuple
<float, float> > multi_point
;
27 multi_point
.push_back(boost::tuple
<float, float>(1, 1));
28 multi_point
.push_back(boost::tuple
<float, float>(3, 2));
30 // Usage of Boost.Geometry
31 std::cout
<< "WKT: " << boost::geometry::wkt(multi_point
) << std::endl
;
39 //[register_multi_point_templated_output
43 WKT: MULTIPOINT((1 1),(3 2))