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 #ifndef BOOST_GEOMETRY_TEST_CS_UNDEFINED_COMMON_HPP 11 #define BOOST_GEOMETRY_TEST_CS_UNDEFINED_COMMON_HPP 12 13 #include <geometry_test_common.hpp> 14 15 #include <boost/geometry/geometries/geometries.hpp> 16 17 #include <boost/geometry/strategies/strategies.hpp> 18 19 #include <boost/geometry/io/wkt/read.hpp> 20 21 struct geom 22 { 23 //typedef bg::model::point<double, 2, bg::cs::cartesian> point; 24 typedef bg::model::point<double, 2, bg::cs::undefined> point; 25 typedef bg::model::box<point> box; 26 typedef bg::model::segment<point> segment; 27 typedef bg::model::linestring<point> linestring; 28 typedef bg::model::ring<point> ring; 29 typedef bg::model::polygon<point> polygon; 30 typedef bg::model::multi_linestring<linestring> multi_linestring; 31 typedef bg::model::multi_polygon<polygon> multi_polygon; 32 typedef bg::model::multi_point<point> multi_point; 33 geomgeom34 geom() 35 { 36 pt = point(0, 0); 37 b = box(point(-1, -1), point(1, 1)); 38 s = segment(point(0, 0), point(1, 1)); 39 ls.push_back(point(0, 0)); 40 ls.push_back(point(1, 1)); 41 ls.push_back(point(1.1, 1.1)); 42 r.push_back(point(0, 0)); 43 r.push_back(point(0, 1)); 44 r.push_back(point(1, 1)); 45 r.push_back(point(1, 0)); 46 r.push_back(point(0, 0)); 47 po.outer() = r; 48 po.inners().push_back(ring()); 49 po.inners().back().push_back(point(0, 0)); 50 po.inners().back().push_back(point(0.2, 0.1)); 51 po.inners().back().push_back(point(0.1, 0.2)); 52 po.inners().back().push_back(point(0, 0)); 53 mls.push_back(ls); 54 mpo.push_back(po); 55 mpt.push_back(pt); 56 } 57 58 point pt; 59 box b; 60 segment s; 61 linestring ls; 62 ring r; 63 polygon po; 64 multi_linestring mls; 65 multi_polygon mpo; 66 multi_point mpt; 67 }; 68 69 #endif // BOOST_GEOMETRY_TEST_CS_UNDEFINED_COMMON_HPP 70