diff options
Diffstat (limited to 'boost/geometry/algorithms/covered_by.hpp')
-rw-r--r-- | boost/geometry/algorithms/covered_by.hpp | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/boost/geometry/algorithms/covered_by.hpp b/boost/geometry/algorithms/covered_by.hpp index 2001d5810c..f9d9dcc486 100644 --- a/boost/geometry/algorithms/covered_by.hpp +++ b/boost/geometry/algorithms/covered_by.hpp @@ -4,8 +4,10 @@ // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. -// This file was modified by Oracle on 2013, 2014. -// Modifications copyright (c) 2013, 2014 Oracle and/or its affiliates. +// This file was modified by Oracle on 2013, 2014, 2017. +// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -14,8 +16,6 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - #ifndef BOOST_GEOMETRY_ALGORITHMS_COVERED_BY_HPP #define BOOST_GEOMETRY_ALGORITHMS_COVERED_BY_HPP @@ -51,9 +51,13 @@ struct use_point_in_geometry struct use_relate { template <typename Geometry1, typename Geometry2, typename Strategy> - static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& /*strategy*/) + static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& strategy) { - return Strategy::apply(geometry1, geometry2); + typedef typename detail::de9im::static_mask_covered_by_type + < + Geometry1, Geometry2 + >::type covered_by_mask; + return geometry::relate(geometry1, geometry2, covered_by_mask(), strategy); } }; @@ -281,23 +285,8 @@ struct covered_by Geometry2 const& geometry2, default_strategy) { - typedef typename point_type<Geometry1>::type point_type1; - typedef typename point_type<Geometry2>::type point_type2; - typedef typename strategy::covered_by::services::default_strategy < - typename tag<Geometry1>::type, - typename tag<Geometry2>::type, - typename tag<Geometry1>::type, - typename tag_cast<typename tag<Geometry2>::type, areal_tag>::type, - typename tag_cast - < - typename cs_tag<point_type1>::type, spherical_tag - >::type, - typename tag_cast - < - typename cs_tag<point_type2>::type, spherical_tag - >::type, Geometry1, Geometry2 >::type strategy_type; |