mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-23 15:52:09 +00:00
Merge branch 'develop' of https://github.com/boostorg/geometry into develop
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
//
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
//
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -65,7 +65,12 @@ struct ovelaps_box
|
||||
template <typename Box, typename InputItem>
|
||||
static inline bool apply(Box const& box, InputItem const& item)
|
||||
{
|
||||
return ! bg::detail::disjoint::disjoint_box_box(box, item.box);
|
||||
typename bg::strategy::disjoint::services::default_strategy
|
||||
<
|
||||
Box, Box
|
||||
>::type strategy;
|
||||
|
||||
return ! bg::detail::disjoint::disjoint_box_box(box, item.box, strategy);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2015-2017, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2015-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@@ -65,14 +65,29 @@ struct test_envelope<FormulaPolicy, bg::geographic_tag>
|
||||
static inline void apply(Geometry& geometry,
|
||||
Box& detected)
|
||||
{
|
||||
bg::strategy::envelope::geographic_segment
|
||||
<
|
||||
FormulaPolicy,
|
||||
bg::srs::spheroid<double>,
|
||||
double
|
||||
> envelope_geographic_segment_strategy;
|
||||
typedef bg::strategy::envelope::spherical_point point_strategy_t;
|
||||
typedef bg::strategy::envelope::spherical_multipoint multi_point_strategy_t;
|
||||
typedef bg::strategy::envelope::spherical_box box_strategy_t;
|
||||
typedef bg::strategy::envelope::geographic<FormulaPolicy, bg::srs::spheroid<double>, double> strategy_t;
|
||||
|
||||
bg::envelope(geometry, detected, envelope_geographic_segment_strategy);
|
||||
typename boost::mpl::if_c
|
||||
<
|
||||
boost::is_same<typename bg::tag<Geometry>::type, bg::point_tag>::value,
|
||||
point_strategy_t,
|
||||
typename boost::mpl::if_c
|
||||
<
|
||||
boost::is_same<typename bg::tag<Geometry>::type, bg::multi_point_tag>::value,
|
||||
multi_point_strategy_t,
|
||||
typename boost::mpl::if_c
|
||||
<
|
||||
boost::is_same<typename bg::tag<Geometry>::type, bg::box_tag>::value,
|
||||
box_strategy_t,
|
||||
strategy_t
|
||||
>::type
|
||||
>::type
|
||||
>::type strategy;
|
||||
|
||||
bg::envelope(geometry, detected, strategy);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@@ -874,6 +874,9 @@ inline void test_open_multipolygons()
|
||||
test::apply("mpg09",
|
||||
"MULTIPOLYGON(((0 0,10 0,10 10,0 10)),((0 0,9 1,9 2)))",
|
||||
false);
|
||||
test::apply("mpg09_2",
|
||||
"MULTIPOLYGON(((0 0,5 1,10 0,10 10,0 10)),((1 1,9 1,9 2)))",
|
||||
false);
|
||||
|
||||
// one polygon inside another and boundaries not touching
|
||||
test::apply("mpg10",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2015, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2015-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -851,6 +852,9 @@ void test_open_multipolygons()
|
||||
test::apply("mpg09",
|
||||
"MULTIPOLYGON(((0 0,10 0,10 10,0 10)),((0 0,9 1,9 2)))",
|
||||
bg::failure_intersecting_interiors);
|
||||
test::apply("mpg09_2",
|
||||
"MULTIPOLYGON(((0 0,5 1,10 0,10 10,0 10)),((1 1,9 1,9 2)))",
|
||||
bg::failure_intersecting_interiors);
|
||||
|
||||
// one polygon inside another and boundaries not touching
|
||||
test::apply("mpg10",
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
// Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
|
||||
|
||||
// Contributed and/or modified by Yaghyavardhan Singh Khangarot, as part of Google Summer of Code 2018 program.
|
||||
// Contributed and/or modified by Yaghyavardhan Singh Khangarot,
|
||||
// as part of Google Summer of Code 2018 program.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -13,6 +18,8 @@
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
|
||||
#include "test_hausdorff_distance.hpp"
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015, 2017.
|
||||
// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2015, 2017, 2019.
|
||||
// Modifications copyright (c) 2014-2019 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015, 2016.
|
||||
// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2015, 2016, 2018.
|
||||
// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -109,7 +109,7 @@ void test_strategy()
|
||||
box_type b0(point_type(0, 0), point_type(5, 0));
|
||||
|
||||
bool r = bg::within(p, b,
|
||||
bg::strategy::within::point_in_box<point_type, box_type>());
|
||||
bg::strategy::within::cartesian_point_box());
|
||||
BOOST_CHECK_EQUAL(r, true);
|
||||
|
||||
r = bg::within(b, b,
|
||||
@@ -121,7 +121,7 @@ void test_strategy()
|
||||
BOOST_CHECK_EQUAL(r, false);
|
||||
|
||||
r = bg::within(p, b,
|
||||
bg::strategy::within::point_in_box_by_side<point_type, box_type>());
|
||||
bg::strategy::within::point_in_box_by_side<>());
|
||||
BOOST_CHECK_EQUAL(r, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2016 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2016-2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -19,7 +19,7 @@ void test_point_box_by_side()
|
||||
// Test spherical boxes
|
||||
// See also http://www.gcmap.com/mapui?P=1E45N-19E45N-19E55N-1E55N-1E45N,10E55.1N,10E45.1N
|
||||
typedef bg::model::box<Point> box_t;
|
||||
bg::strategy::within::point_in_box_by_side<Point, box_t> by_side;
|
||||
bg::strategy::within::point_in_box_by_side<> by_side;
|
||||
box_t box;
|
||||
bg::read_wkt("POLYGON((1 45,19 55))", box);
|
||||
BOOST_CHECK_EQUAL(bg::within(Point(10, 55.1), box, by_side), true);
|
||||
|
||||
Reference in New Issue
Block a user