summaryrefslogtreecommitdiff
path: root/boost/geometry/strategies/envelope/geographic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/strategies/envelope/geographic.hpp')
-rw-r--r--boost/geometry/strategies/envelope/geographic.hpp43
1 files changed, 34 insertions, 9 deletions
diff --git a/boost/geometry/strategies/envelope/geographic.hpp b/boost/geometry/strategies/envelope/geographic.hpp
index 96940c4706..ea1eb0e82d 100644
--- a/boost/geometry/strategies/envelope/geographic.hpp
+++ b/boost/geometry/strategies/envelope/geographic.hpp
@@ -13,11 +13,10 @@
#include <type_traits>
-#include <boost/geometry/strategy/geographic/envelope.hpp>
+#include <boost/geometry/strategy/geographic/envelope.hpp> // Not used, for backward compatibility
+#include <boost/geometry/strategy/geographic/envelope_range.hpp>
#include <boost/geometry/strategy/geographic/envelope_segment.hpp>
-#include <boost/geometry/strategy/geographic/expand_segment.hpp> // TEMP
-
#include <boost/geometry/strategies/envelope/spherical.hpp>
#include <boost/geometry/strategies/expand/geographic.hpp>
@@ -48,28 +47,28 @@ public:
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>
auto envelope(Geometry const&, Box const&,
- typename util::enable_if_segment_t<Geometry> * = nullptr) const
+ util::enable_if_segment_t<Geometry> * = nullptr) const
{
return strategy::envelope::geographic_segment
<
@@ -79,13 +78,39 @@ public:
template <typename Geometry, typename Box>
auto envelope(Geometry const&, Box const&,
- typename util::enable_if_polysegmental_t<Geometry> * = nullptr) const
+ util::enable_if_linestring_t<Geometry> * = nullptr) const
+ {
+ return strategy::envelope::geographic_linestring
+ <
+ FormulaPolicy, Spheroid, CalculationType
+ >(base_t::m_spheroid);
+ }
+
+ template <typename Geometry, typename Box>
+ auto envelope(Geometry const&, Box const&,
+ std::enable_if_t
+ <
+ util::is_ring<Geometry>::value
+ || util::is_polygon<Geometry>::value
+ > * = nullptr) const
{
- return strategy::envelope::geographic
+ return strategy::envelope::geographic_ring
<
FormulaPolicy, Spheroid, CalculationType
>(base_t::m_spheroid);
}
+
+ template <typename Geometry, typename Box>
+ 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) const
+ {
+ return strategy::envelope::spherical_boxes();
+ }
};