]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/relational_operations/touches/touches_box.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
5 // This file was modified by Oracle on 2013, 2014, 2015.
6 // Modifications copyright (c) 2013-2015, Oracle and/or its affiliates.
8 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10 // Use, modification and distribution is subject to the Boost Software License,
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
14 #include "test_touches.hpp"
19 typedef bg::model::box
<P
> box
;
21 test_touches
<box
, box
>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((5 1,5 2,6 2,6 1,5 1))", true);
22 test_touches
<box
, box
>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((4 1,4 2,5 2,5 1,4 1))", false);
23 test_touches
<box
, box
>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((4 1,4 2,6 2,6 1,4 1))", false);
26 test_touches
<box
, box
>("POLYGON((0 0,0 5,5 5,5 0,0 0))", "POLYGON((5 5,5 5,5 5,5 5,5 5))", true);
27 // TODO: should it be TRUE?
28 test_touches
<box
, box
>("POLYGON((5 5,5 5,5 5,5 5,5 5))", "POLYGON((5 5,5 5,5 5,5 5,5 5))", true);
34 typedef bg::model::box
<P
> box
;
36 check_touches
<box
, box
>(box(P(0,0,0),P(5,5,5)), box(P(5,1,2),P(6,6,6)),
37 "box(P(0,0,0),P(5,5,5))", "box(P(5,1,2),P(6,6,6))",
40 check_touches
<box
, box
>(box(P(0,0,0),P(5,5,5)), box(P(5,5,5),P(6,6,6)),
41 "box(P(0,0,0),P(5,5,5))", "box(P(5,5,5),P(6,6,6))",
46 int test_main( int , char* [] )
48 test_all
<bg::model::d2::point_xy
<double> >();
49 test_box_3d
<bg::model::point
<double, 3, bg::cs::cartesian
> >();
51 #if defined(HAVE_TTMATH)
52 test_all
<bg::model::d2::point_xy
<ttmath_big
> >();
61 select geometry::STGeomFromText('POLYGON((0 0,0 100,100 100,100 0,0 0))',0) as p
62 , geometry::STGeomFromText('POLYGON((200 0,100 50,200 100,200 0))',0) as q
64 -- select p from viewy union all select q from viewy
65 select p.STTouches(q) from viewy