]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/relational_operations/crosses/crosses.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // This file was modified by Oracle on 2014.
6 // Modifications copyright (c) 2014 Oracle and/or its affiliates.
8 // Use, modification and distribution is subject to the Boost Software License,
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
14 #include "test_crosses.hpp"
19 /*typedef bg::model::multi_point<P> mpt;
20 typedef bg::model::linestring<P> ls;
22 // not implemented yet
23 test_geometry<mpt, ls>("MULTIPOINT(0 0,1 1)", "LINESTRING(0 0,1 0,3 3)", true);
24 test_geometry<mpt, ls>("MULTIPOINT(0 0,1 1)", "LINESTRING(0 0,1 1,3 3)", false);*/
30 /*typedef bg::model::multi_point<P> mpt;
31 typedef bg::model::polygon<P> poly;
32 typedef bg::model::multi_polygon<poly> mpoly;
34 // not implemented yet
35 test_geometry<mpt, poly>("MULTIPOINT(0 0,6 6)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
36 test_geometry<mpt, poly>("MULTIPOINT(0 0,1 1)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);*/
42 typedef bg::model::linestring
<P
> ls
;
43 typedef bg::model::multi_linestring
<ls
> mls
;
45 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 2,4 4)", "LINESTRING(0 1,2 1,3 1)", true);
46 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 2)", "LINESTRING(0 1,2 1)", true);
47 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 2,4 4)", "LINESTRING(0 1,1 1,2 2,3 2)", false);
49 test_geometry
<ls
, mls
>("LINESTRING(0 0,2 2,4 4)", "MULTILINESTRING((0 1,4 1),(0 2,4 2))", true);
50 test_geometry
<mls
, ls
>("MULTILINESTRING((0 1,4 1),(0 2,4 2))", "LINESTRING(0 0,2 2,4 4)", true);
52 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,2 2,4 4),(3 0,3 4))", "MULTILINESTRING((0 1,4 1),(0 2,4 2))", true);
54 // spike - boundary and interior on the same point
55 test_geometry
<ls
, ls
>("LINESTRING(3 7, 8 8, 2 6)", "LINESTRING(5 7, 10 7, 0 7)", true);
61 typedef bg::model::linestring
<P
> ls
;
62 typedef bg::model::multi_linestring
<ls
> mls
;
63 typedef bg::model::ring
<P
> ring
;
64 typedef bg::model::polygon
<P
> poly
;
65 typedef bg::model::multi_polygon
<poly
> mpoly
;
67 test_geometry
<ls
, ring
>("LINESTRING(0 0, 10 10)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
68 test_geometry
<ls
, poly
>("LINESTRING(0 0, 10 10)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
69 test_geometry
<ls
, mpoly
>("LINESTRING(0 0, 10 10)", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)))", true);
71 test_geometry
<ls
, poly
>("LINESTRING(0 0, 10 0)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
72 test_geometry
<ls
, poly
>("LINESTRING(1 1, 5 5)", "POLYGON((0 0,0 5,5 5,5 0,0 0))", false);
74 test_geometry
<mls
, ring
>("MULTILINESTRING((1 1, 5 5),(6 6,7 7))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
75 test_geometry
<mls
, poly
>("MULTILINESTRING((1 1, 5 5),(6 6,7 7))", "POLYGON((0 0,0 5,5 5,5 0,0 0))", true);
76 test_geometry
<mls
, mpoly
>("MULTILINESTRING((1 1, 5 5),(6 6,7 7))", "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)))", true);
88 int test_main( int , char* [] )
90 test_2d
<bg::model::d2::point_xy
<int> >();
91 test_2d
<bg::model::d2::point_xy
<double> >();
93 #if defined(HAVE_TTMATH)
94 test_2d
<bg::model::d2::point_xy
<ttmath_big
> >();
97 //test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();