update boost on linux
This commit is contained in:
26
linx64/include/boost/geometry/core/config.hpp
Normal file
26
linx64/include/boost/geometry/core/config.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_CORE_CONFIG_HPP
|
||||
#define BOOST_GEOMETRY_CORE_CONFIG_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// NOTE: workaround for VC++ 12 (aka 2013): cannot specify explicit initializer for arrays
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && (!defined(_MSC_VER) || (_MSC_VER >= 1900))
|
||||
#define BOOST_GEOMETRY_CXX11_ARRAY_UNIFIED_INITIALIZATION
|
||||
#endif
|
||||
|
||||
// Rescaling is turned on, unless NO_ROBUSTNESS is defined
|
||||
// In future versions of Boost.Geometry, it will be turned off by default
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#define BOOST_GEOMETRY_USE_RESCALING
|
||||
#endif
|
||||
|
||||
#endif // BOOST_GEOMETRY_CORE_CONFIG_HPP
|
||||
@@ -4,10 +4,11 @@
|
||||
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2014.
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2018.
|
||||
// Modifications 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
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -22,7 +23,6 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@@ -56,7 +56,7 @@ namespace core_detail
|
||||
{
|
||||
|
||||
template <typename DegreeOrRadian>
|
||||
struct coordinate_system_units
|
||||
struct define_angular_units
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG
|
||||
((false),
|
||||
@@ -65,13 +65,13 @@ struct coordinate_system_units
|
||||
};
|
||||
|
||||
template <>
|
||||
struct coordinate_system_units<geometry::degree>
|
||||
struct define_angular_units<geometry::degree>
|
||||
{
|
||||
typedef geometry::degree units;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct coordinate_system_units<geometry::radian>
|
||||
struct define_angular_units<geometry::radian>
|
||||
{
|
||||
typedef geometry::radian units;
|
||||
};
|
||||
@@ -107,12 +107,8 @@ known as lat,long or lo,la or phi,lambda
|
||||
*/
|
||||
template<typename DegreeOrRadian>
|
||||
struct geographic
|
||||
{
|
||||
typedef typename core_detail::coordinate_system_units
|
||||
<
|
||||
DegreeOrRadian
|
||||
>::units units;
|
||||
};
|
||||
: core_detail::define_angular_units<DegreeOrRadian>
|
||||
{};
|
||||
|
||||
|
||||
|
||||
@@ -136,12 +132,8 @@ struct geographic
|
||||
*/
|
||||
template<typename DegreeOrRadian>
|
||||
struct spherical
|
||||
{
|
||||
typedef typename core_detail::coordinate_system_units
|
||||
<
|
||||
DegreeOrRadian
|
||||
>::units units;
|
||||
};
|
||||
: core_detail::define_angular_units<DegreeOrRadian>
|
||||
{};
|
||||
|
||||
|
||||
/*!
|
||||
@@ -156,12 +148,8 @@ struct spherical
|
||||
*/
|
||||
template<typename DegreeOrRadian>
|
||||
struct spherical_equatorial
|
||||
{
|
||||
typedef typename core_detail::coordinate_system_units
|
||||
<
|
||||
DegreeOrRadian
|
||||
>::units units;
|
||||
};
|
||||
: core_detail::define_angular_units<DegreeOrRadian>
|
||||
{};
|
||||
|
||||
|
||||
|
||||
@@ -174,12 +162,15 @@ struct spherical_equatorial
|
||||
*/
|
||||
template<typename DegreeOrRadian>
|
||||
struct polar
|
||||
{
|
||||
typedef typename core_detail::coordinate_system_units
|
||||
<
|
||||
DegreeOrRadian
|
||||
>::units units;
|
||||
};
|
||||
: core_detail::define_angular_units<DegreeOrRadian>
|
||||
{};
|
||||
|
||||
|
||||
/*!
|
||||
\brief Undefined coordinate system
|
||||
\ingroup cs
|
||||
*/
|
||||
struct undefined {};
|
||||
|
||||
|
||||
} // namespace cs
|
||||
@@ -227,9 +218,18 @@ struct cs_tag<cs::cartesian>
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
struct cs_tag<cs::undefined>
|
||||
{
|
||||
typedef cs_undefined_tag type;
|
||||
};
|
||||
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
|
||||
} // namespace traits
|
||||
|
||||
|
||||
/*!
|
||||
\brief Meta-function returning coordinate system tag (cs family) of any geometry
|
||||
\tparam Geometry \tparam_geometry
|
||||
@@ -245,24 +245,97 @@ struct cs_tag
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
\brief Meta-function to verify if a coordinate system is radian
|
||||
\tparam CoordinateSystem Any coordinate system.
|
||||
\ingroup core
|
||||
*/
|
||||
template <typename CoordinateSystem>
|
||||
struct is_radian : boost::true_type {};
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_SPECIALIZATIONS
|
||||
|
||||
// Specialization for any degree coordinate systems
|
||||
template <template<typename> class CoordinateSystem>
|
||||
struct is_radian< CoordinateSystem<degree> > : boost::false_type
|
||||
namespace traits
|
||||
{
|
||||
|
||||
// cartesian or undefined
|
||||
template <typename CoordinateSystem>
|
||||
struct cs_angular_units
|
||||
{
|
||||
typedef geometry::radian type;
|
||||
};
|
||||
|
||||
#endif // DOXYGEN_NO_SPECIALIZATIONS
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
template<typename DegreeOrRadian>
|
||||
struct cs_angular_units<cs::geographic<DegreeOrRadian> >
|
||||
{
|
||||
typedef DegreeOrRadian type;
|
||||
};
|
||||
|
||||
template<typename DegreeOrRadian>
|
||||
struct cs_angular_units<cs::spherical<DegreeOrRadian> >
|
||||
{
|
||||
typedef DegreeOrRadian type;
|
||||
};
|
||||
|
||||
template<typename DegreeOrRadian>
|
||||
struct cs_angular_units<cs::spherical_equatorial<DegreeOrRadian> >
|
||||
{
|
||||
typedef DegreeOrRadian type;
|
||||
};
|
||||
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
|
||||
} // namespace traits
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename Geometry>
|
||||
struct cs_angular_units
|
||||
{
|
||||
typedef typename traits::cs_angular_units
|
||||
<
|
||||
typename geometry::coordinate_system<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Units, typename CsTag>
|
||||
struct cs_tag_to_coordinate_system
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
NOT_IMPLEMENTED_FOR_THIS_COORDINATE_SYSTEM,
|
||||
(types<CsTag>));
|
||||
};
|
||||
|
||||
template <typename Units>
|
||||
struct cs_tag_to_coordinate_system<Units, cs_undefined_tag>
|
||||
{
|
||||
typedef cs::undefined type;
|
||||
};
|
||||
|
||||
template <typename Units>
|
||||
struct cs_tag_to_coordinate_system<Units, cartesian_tag>
|
||||
{
|
||||
typedef cs::cartesian type;
|
||||
};
|
||||
|
||||
template <typename Units>
|
||||
struct cs_tag_to_coordinate_system<Units, spherical_equatorial_tag>
|
||||
{
|
||||
typedef cs::spherical_equatorial<Units> type;
|
||||
};
|
||||
|
||||
template <typename Units>
|
||||
struct cs_tag_to_coordinate_system<Units, spherical_polar_tag>
|
||||
{
|
||||
typedef cs::spherical<Units> type;
|
||||
};
|
||||
|
||||
template <typename Units>
|
||||
struct cs_tag_to_coordinate_system<Units, geographic_tag>
|
||||
{
|
||||
typedef cs::geographic<Units> type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2015.
|
||||
// Modifications copyright (c) 2015 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2015, 2017.
|
||||
// Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -83,6 +83,25 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Invalid Output Exception
|
||||
\ingroup core
|
||||
\details The invalid_output_exception is thrown if valid output cannot be
|
||||
generated by a function even if arguments are valid, e.g. union of
|
||||
geographic polygons covering more than half of the area of the globe.
|
||||
*/
|
||||
class invalid_output_exception : public geometry::exception
|
||||
{
|
||||
public:
|
||||
|
||||
inline invalid_output_exception() {}
|
||||
|
||||
virtual char const* what() const throw()
|
||||
{
|
||||
return "Boost.Geometry Invalid-Output exception";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
@@ -107,6 +107,72 @@ struct radian_access<1, Geometry, CoordinateSystem<degree> >
|
||||
{};
|
||||
|
||||
|
||||
template<std::size_t Index, std::size_t Dimension, typename Geometry>
|
||||
struct degree_radian_converter_box_segment
|
||||
{
|
||||
typedef typename fp_coordinate_type<Geometry>::type coordinate_type;
|
||||
|
||||
static inline coordinate_type get(Geometry const& geometry)
|
||||
{
|
||||
return boost::numeric_cast
|
||||
<
|
||||
coordinate_type
|
||||
>(geometry::get<Index, Dimension>(geometry)
|
||||
* math::d2r<coordinate_type>());
|
||||
}
|
||||
|
||||
static inline void set(Geometry& geometry, coordinate_type const& radians)
|
||||
{
|
||||
geometry::set<Index, Dimension>(geometry, boost::numeric_cast
|
||||
<
|
||||
coordinate_type
|
||||
>(radians * math::r2d<coordinate_type>()));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Default, radian (or any other coordinate system) just works like "get"
|
||||
template <std::size_t Index, std::size_t Dimension, typename Geometry, typename DegreeOrRadian>
|
||||
struct radian_access_box_segment
|
||||
{
|
||||
typedef typename fp_coordinate_type<Geometry>::type coordinate_type;
|
||||
|
||||
static inline coordinate_type get(Geometry const& geometry)
|
||||
{
|
||||
return geometry::get<Index, Dimension>(geometry);
|
||||
}
|
||||
|
||||
static inline void set(Geometry& geometry, coordinate_type const& radians)
|
||||
{
|
||||
geometry::set<Index, Dimension>(geometry, radians);
|
||||
}
|
||||
};
|
||||
|
||||
// Specialize, any "degree" coordinate system will be converted to radian
|
||||
// but only for dimension 0,1 (so: dimension 2 and heigher are untouched)
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
template<typename> class CoordinateSystem,
|
||||
std::size_t Index
|
||||
>
|
||||
struct radian_access_box_segment<Index, 0, Geometry, CoordinateSystem<degree> >
|
||||
: degree_radian_converter_box_segment<Index, 0, Geometry>
|
||||
{};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
template<typename> class CoordinateSystem,
|
||||
std::size_t Index
|
||||
>
|
||||
struct radian_access_box_segment<Index, 1, Geometry, CoordinateSystem<degree> >
|
||||
: degree_radian_converter_box_segment<Index, 1, Geometry>
|
||||
{};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
@@ -130,7 +196,6 @@ inline typename fp_coordinate_type<Geometry>::type get_as_radian(Geometry const&
|
||||
typename coordinate_system<Geometry>::type>::get(geometry);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief set coordinate value (in radian) to a point
|
||||
\details Coordinate value will be set correctly, if coordinate system of
|
||||
@@ -151,6 +216,46 @@ inline void set_from_radian(Geometry& geometry,
|
||||
typename coordinate_system<Geometry>::type>::set(geometry, radians);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief get coordinate value of a segment or box, result is in Radian
|
||||
\details Result is in Radian, even if source coordinate system
|
||||
is in Degrees
|
||||
\return coordinate value
|
||||
\ingroup get
|
||||
\tparam Index index
|
||||
\tparam Dimension dimension
|
||||
\tparam Geometry geometry
|
||||
\param geometry geometry to get coordinate value from
|
||||
\note Only applicable to coordinate systems templatized by units,
|
||||
e.g. spherical or geographic coordinate systems
|
||||
*/
|
||||
template <std::size_t Index, std::size_t Dimension, typename Geometry>
|
||||
inline typename fp_coordinate_type<Geometry>::type get_as_radian(Geometry const& geometry)
|
||||
{
|
||||
return detail::radian_access_box_segment<Index, Dimension, Geometry,
|
||||
typename coordinate_system<Geometry>::type>::get(geometry);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief set coordinate value (in radian) to a segment or box
|
||||
\details Coordinate value will be set correctly, if coordinate system of
|
||||
point is in Degree, Radian value will be converted to Degree
|
||||
\ingroup set
|
||||
\tparam Index index
|
||||
\tparam Dimension dimension
|
||||
\tparam Geometry geometry
|
||||
\param geometry geometry to assign coordinate to
|
||||
\param radians coordinate value to assign
|
||||
\note Only applicable to coordinate systems templatized by units,
|
||||
e.g. spherical or geographic coordinate systems
|
||||
*/
|
||||
template <std::size_t Index, std::size_t Dimension, typename Geometry>
|
||||
inline void set_from_radian(Geometry& geometry,
|
||||
typename fp_coordinate_type<Geometry>::type const& radians)
|
||||
{
|
||||
detail::radian_access_box_segment<Index, Dimension, Geometry,
|
||||
typename coordinate_system<Geometry>::type>::set(geometry, radians);
|
||||
}
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
@@ -223,8 +223,8 @@ template <typename Geometry, std::size_t Dimension>
|
||||
struct radius_access<srs_sphere_tag, Geometry, Dimension, boost::false_type>
|
||||
: detail::radius_access<srs_sphere_tag, Geometry, Dimension>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(Dimension == 0);
|
||||
//BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
//BOOST_STATIC_ASSERT(Dimension == 0);
|
||||
BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
};
|
||||
|
||||
template <typename Geometry>
|
||||
@@ -237,8 +237,8 @@ template <typename Geometry, std::size_t Dimension>
|
||||
struct radius_access<srs_spheroid_tag, Geometry, Dimension, boost::false_type>
|
||||
: detail::radius_access<srs_spheroid_tag, Geometry, Dimension>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(Dimension == 0 || Dimension == 2);
|
||||
//BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
//BOOST_STATIC_ASSERT(Dimension == 0 || Dimension == 2);
|
||||
BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
};
|
||||
|
||||
} // namespace core_dispatch
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2016, 2017.
|
||||
// Modifications copyright (c) 2014-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.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_CORE_SRS_HPP
|
||||
#define BOOST_GEOMETRY_CORE_SRS_HPP
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief Defines spheroid radius values for use in geographical CS calculations
|
||||
\note See http://en.wikipedia.org/wiki/Figure_of_the_Earth
|
||||
and http://en.wikipedia.org/wiki/World_Geodetic_System#A_new_World_Geodetic_System:_WGS84
|
||||
*/
|
||||
template <typename RadiusType>
|
||||
class spheroid
|
||||
{
|
||||
public:
|
||||
spheroid(RadiusType const& a, RadiusType const& b)
|
||||
: m_a(a)
|
||||
, m_b(b)
|
||||
{}
|
||||
|
||||
spheroid()
|
||||
: m_a(RadiusType(6378137.0))
|
||||
, m_b(RadiusType(6356752.3142451793))
|
||||
{}
|
||||
|
||||
template <std::size_t I>
|
||||
RadiusType get_radius() const
|
||||
{
|
||||
BOOST_STATIC_ASSERT(I < 3);
|
||||
|
||||
return I < 2 ? m_a : m_b;
|
||||
}
|
||||
|
||||
template <std::size_t I>
|
||||
void set_radius(RadiusType const& radius)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(I < 3);
|
||||
|
||||
(I < 2 ? m_a : m_b) = radius;
|
||||
}
|
||||
|
||||
private:
|
||||
RadiusType m_a, m_b; // equatorial radius, polar radius
|
||||
};
|
||||
|
||||
} // namespace srs
|
||||
|
||||
// Traits specializations for spheroid
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
|
||||
template <typename RadiusType>
|
||||
struct tag< srs::spheroid<RadiusType> >
|
||||
{
|
||||
typedef srs_spheroid_tag type;
|
||||
};
|
||||
|
||||
template <typename RadiusType>
|
||||
struct radius_type< srs::spheroid<RadiusType> >
|
||||
{
|
||||
typedef RadiusType type;
|
||||
};
|
||||
|
||||
template <typename RadiusType, std::size_t Dimension>
|
||||
struct radius_access<srs::spheroid<RadiusType>, Dimension>
|
||||
{
|
||||
typedef srs::spheroid<RadiusType> spheroid_type;
|
||||
|
||||
static inline RadiusType get(spheroid_type const& s)
|
||||
{
|
||||
return s.template get_radius<Dimension>();
|
||||
}
|
||||
|
||||
static inline void set(spheroid_type& s, RadiusType const& value)
|
||||
{
|
||||
s.template set_radius<Dimension>(value);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief Defines sphere radius value for use in spherical CS calculations
|
||||
*/
|
||||
template <typename RadiusType>
|
||||
class sphere
|
||||
{
|
||||
public:
|
||||
explicit sphere(RadiusType const& r)
|
||||
: m_r(r)
|
||||
{}
|
||||
|
||||
sphere()
|
||||
: m_r(RadiusType((2.0 * 6378137.0 + 6356752.3142451793) / 3.0))
|
||||
{}
|
||||
|
||||
template <std::size_t I>
|
||||
RadiusType get_radius() const
|
||||
{
|
||||
BOOST_STATIC_ASSERT(I < 3);
|
||||
|
||||
return m_r;
|
||||
}
|
||||
|
||||
template <std::size_t I>
|
||||
void set_radius(RadiusType const& radius)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(I < 3);
|
||||
|
||||
m_r = radius;
|
||||
}
|
||||
|
||||
private:
|
||||
RadiusType m_r; // radius
|
||||
};
|
||||
|
||||
} // namespace srs
|
||||
|
||||
// Traits specializations for sphere
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
|
||||
template <typename RadiusType>
|
||||
struct tag< srs::sphere<RadiusType> >
|
||||
{
|
||||
typedef srs_sphere_tag type;
|
||||
};
|
||||
|
||||
template <typename RadiusType>
|
||||
struct radius_type< srs::sphere<RadiusType> >
|
||||
{
|
||||
typedef RadiusType type;
|
||||
};
|
||||
|
||||
template <typename RadiusType, std::size_t Dimension>
|
||||
struct radius_access<srs::sphere<RadiusType>, Dimension>
|
||||
{
|
||||
typedef srs::sphere<RadiusType> sphere_type;
|
||||
|
||||
static inline RadiusType get(sphere_type const& s)
|
||||
{
|
||||
return s.template get_radius<Dimension>();
|
||||
}
|
||||
|
||||
static inline void set(sphere_type& s, RadiusType const& value)
|
||||
{
|
||||
s.template set_radius<Dimension>(value);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_CORE_SRS_HPP
|
||||
@@ -4,8 +4,8 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2014.
|
||||
// Modifications copyright (c) 2014 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2018.
|
||||
// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace boost { namespace geometry
|
||||
|
||||
// Tags defining strategies linked to coordinate systems
|
||||
|
||||
/// Tag used for undefined coordinate system
|
||||
struct cs_undefined_tag {};
|
||||
|
||||
/// Tag used for casting spherical/geographic coordinate systems
|
||||
struct spherical_tag {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user