]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/algorithms/is_empty.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2015, Oracle and/or its affiliates
6 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
8 // Licensed under the Boost Software License version 1.0.
9 // http://www.boost.org/users/license.html
12 //` Check if a geometry is the empty set
16 #include <boost/geometry.hpp>
17 #include <boost/geometry/geometries/point_xy.hpp>
22 boost::geometry::model::multi_linestring
24 boost::geometry::model::linestring
26 boost::geometry::model::d2::point_xy
<double>
29 boost::geometry::read_wkt("MULTILINESTRING((0 0,0 10,10 0),(1 1,8 1,1 8))", mls
);
30 std::cout
<< "Is empty? " << (boost::geometry::is_empty(mls
) ? "yes" : "no") << std::endl
;
31 boost::geometry::clear(mls
);
32 std::cout
<< "Is empty (after clearing)? " << (boost::geometry::is_empty(mls
) ? "yes" : "no") << std::endl
;
44 Is empty (after clearing)? yes