summaryrefslogtreecommitdiff
path: root/boost/geometry/strategies/envelope/spherical.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/strategies/envelope/spherical.hpp')
-rw-r--r--boost/geometry/strategies/envelope/spherical.hpp43
1 files changed, 33 insertions, 10 deletions
diff --git a/boost/geometry/strategies/envelope/spherical.hpp b/boost/geometry/strategies/envelope/spherical.hpp
index 0c5aad62bf..c09a548264 100644
--- a/boost/geometry/strategies/envelope/spherical.hpp
+++ b/boost/geometry/strategies/envelope/spherical.hpp
@@ -1,6 +1,6 @@
// Boost.Geometry
-// Copyright (c) 2020-2021, Oracle and/or its affiliates.
+// Copyright (c) 2020-2022, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -13,13 +13,13 @@
#include <type_traits>
-#include <boost/geometry/strategy/spherical/envelope.hpp>
#include <boost/geometry/strategy/spherical/envelope_box.hpp>
-#include <boost/geometry/strategy/spherical/envelope_point.hpp>
+#include <boost/geometry/strategy/spherical/envelope_boxes.hpp>
#include <boost/geometry/strategy/spherical/envelope_multipoint.hpp>
+#include <boost/geometry/strategy/spherical/envelope_point.hpp>
+#include <boost/geometry/strategy/spherical/envelope_range.hpp>
#include <boost/geometry/strategy/spherical/envelope_segment.hpp>
-#include <boost/geometry/strategies/detail.hpp>
#include <boost/geometry/strategies/envelope/services.hpp>
#include <boost/geometry/strategies/expand/spherical.hpp>
@@ -47,37 +47,60 @@ struct spherical
template <typename Geometry, typename Box>
static auto envelope(Geometry const&, Box const&,
- typename util::enable_if_point_t<Geometry> * = nullptr)
+ util::enable_if_point_t<Geometry> * = nullptr)
{
return strategy::envelope::spherical_point();
}
template <typename Geometry, typename Box>
static auto envelope(Geometry const&, Box const&,
- typename util::enable_if_multi_point_t<Geometry> * = nullptr)
+ util::enable_if_multi_point_t<Geometry> * = nullptr)
{
return strategy::envelope::spherical_multipoint();
}
template <typename Geometry, typename Box>
static auto envelope(Geometry const&, Box const&,
- typename util::enable_if_box_t<Geometry> * = nullptr)
+ util::enable_if_box_t<Geometry> * = nullptr)
{
return strategy::envelope::spherical_box();
}
template <typename Geometry, typename Box>
static auto envelope(Geometry const&, Box const&,
- typename util::enable_if_segment_t<Geometry> * = nullptr)
+ util::enable_if_segment_t<Geometry> * = nullptr)
{
return strategy::envelope::spherical_segment<CalculationType>();
}
template <typename Geometry, typename Box>
static auto envelope(Geometry const&, Box const&,
- typename util::enable_if_polysegmental_t<Geometry> * = nullptr)
+ util::enable_if_linestring_t<Geometry> * = nullptr)
+ {
+ return strategy::envelope::spherical_linestring<CalculationType>();
+ }
+
+ template <typename Geometry, typename Box>
+ static auto envelope(Geometry const&, Box const&,
+ std::enable_if_t
+ <
+ util::is_ring<Geometry>::value
+ || util::is_polygon<Geometry>::value
+ > * = nullptr)
+ {
+ return strategy::envelope::spherical_ring<CalculationType>();
+ }
+
+ template <typename Geometry, typename Box>
+ static auto envelope(Geometry const&, Box const&,
+ std::enable_if_t
+ <
+ util::is_multi_linestring<Geometry>::value
+ || util::is_multi_polygon<Geometry>::value
+ || util::is_geometry_collection<Geometry>::value
+ > * = nullptr)
{
- return strategy::envelope::spherical<CalculationType>();
+ return strategy::envelope::spherical_boxes();
}
};