mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
chore: change coordinate_type to coordinate_type_t and use 'using' at those places
This commit is contained in:
parent
19f22c2475
commit
08a71cf124
@ -72,11 +72,11 @@ template <typename Curr, typename Next>
|
|||||||
struct more_precise_coordinate_type
|
struct more_precise_coordinate_type
|
||||||
: std::is_same
|
: std::is_same
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<Curr>::type,
|
geometry::coordinate_type_t<Curr>,
|
||||||
typename geometry::select_most_precise
|
typename geometry::select_most_precise
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<Curr>::type,
|
geometry::coordinate_type_t<Curr>,
|
||||||
typename geometry::coordinate_type<Next>::type
|
geometry::coordinate_type_t<Next>
|
||||||
>::type
|
>::type
|
||||||
>
|
>
|
||||||
{};
|
{};
|
||||||
|
@ -58,11 +58,12 @@ struct azimuth<Point1, Point2, point_tag, point_tag>
|
|||||||
template <typename Strategy>
|
template <typename Strategy>
|
||||||
static auto apply(Point1 const& p1, Point2 const& p2, Strategy const& strategy)
|
static auto apply(Point1 const& p1, Point2 const& p2, Strategy const& strategy)
|
||||||
{
|
{
|
||||||
typedef typename decltype(strategy.azimuth())::template result_type
|
auto azimuth_strategy = strategy.azimuth();
|
||||||
|
using calc_t = typename decltype(azimuth_strategy)::template result_type
|
||||||
<
|
<
|
||||||
typename coordinate_type<Point1>::type,
|
coordinate_type_t<Point1>,
|
||||||
typename coordinate_type<Point2>::type
|
coordinate_type_t<Point2>
|
||||||
>::type calc_t;
|
>::type;
|
||||||
|
|
||||||
calc_t result = 0;
|
calc_t result = 0;
|
||||||
calc_t const x1 = geometry::get_as_radian<0>(p1);
|
calc_t const x1 = geometry::get_as_radian<0>(p1);
|
||||||
@ -70,7 +71,7 @@ struct azimuth<Point1, Point2, point_tag, point_tag>
|
|||||||
calc_t const x2 = geometry::get_as_radian<0>(p2);
|
calc_t const x2 = geometry::get_as_radian<0>(p2);
|
||||||
calc_t const y2 = geometry::get_as_radian<1>(p2);
|
calc_t const y2 = geometry::get_as_radian<1>(p2);
|
||||||
|
|
||||||
strategy.azimuth().apply(x1, y1, x2, y2, result);
|
azimuth_strategy.apply(x1, y1, x2, y2, result);
|
||||||
|
|
||||||
// NOTE: It is not clear which units we should use for the result.
|
// NOTE: It is not clear which units we should use for the result.
|
||||||
// For now radians are always returned but a user could expect
|
// For now radians are always returned but a user could expect
|
||||||
|
@ -59,10 +59,7 @@ inline void assign_point_to_index(Point const& point, Geometry& geometry)
|
|||||||
detail::for_each_dimension<Geometry>([&](auto dimension)
|
detail::for_each_dimension<Geometry>([&](auto dimension)
|
||||||
{
|
{
|
||||||
geometry::set<Index, dimension>(geometry,
|
geometry::set<Index, dimension>(geometry,
|
||||||
util::numeric_cast
|
util::numeric_cast<coordinate_type_t<Geometry>>(geometry::get<dimension>(point)));
|
||||||
<
|
|
||||||
typename coordinate_type<Geometry>::type
|
|
||||||
>(geometry::get<dimension>(point)));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +90,7 @@ inline void assign_point_from_index(Geometry const& geometry, Point& point)
|
|||||||
geometry::set<dimension>(point,
|
geometry::set<dimension>(point,
|
||||||
util::numeric_cast
|
util::numeric_cast
|
||||||
<
|
<
|
||||||
typename coordinate_type<Point>::type
|
coordinate_type_t<Point>
|
||||||
>(geometry::get<Index, dimension>(geometry)));
|
>(geometry::get<Index, dimension>(geometry)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ struct assign_zero_point
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
static inline void apply(Point& point)
|
static inline void apply(Point& point)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Point>;
|
||||||
|
|
||||||
coordinate_type const zero = 0;
|
coordinate_type const zero = 0;
|
||||||
detail::for_each_dimension<Point>([&](auto dimension)
|
detail::for_each_dimension<Point>([&](auto dimension)
|
||||||
@ -71,7 +71,7 @@ struct assign_inverse_box_or_segment
|
|||||||
template <typename BoxOrSegment>
|
template <typename BoxOrSegment>
|
||||||
static inline void apply(BoxOrSegment& geometry)
|
static inline void apply(BoxOrSegment& geometry)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<BoxOrSegment>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<BoxOrSegment>;
|
||||||
|
|
||||||
coordinate_type const highest = util::bounds<coordinate_type>::highest();
|
coordinate_type const highest = util::bounds<coordinate_type>::highest();
|
||||||
coordinate_type const lowest = util::bounds<coordinate_type>::lowest();
|
coordinate_type const lowest = util::bounds<coordinate_type>::lowest();
|
||||||
@ -90,7 +90,7 @@ struct assign_zero_box_or_segment
|
|||||||
template <typename BoxOrSegment>
|
template <typename BoxOrSegment>
|
||||||
static inline void apply(BoxOrSegment& geometry)
|
static inline void apply(BoxOrSegment& geometry)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<BoxOrSegment>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<BoxOrSegment>;
|
||||||
|
|
||||||
coordinate_type const zero = 0;
|
coordinate_type const zero = 0;
|
||||||
detail::for_each_dimension<BoxOrSegment>([&](auto dimension)
|
detail::for_each_dimension<BoxOrSegment>([&](auto dimension)
|
||||||
@ -114,7 +114,7 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
|
|||||||
assert_dimension<Point, 2>();
|
assert_dimension<Point, 2>();
|
||||||
|
|
||||||
// Copy coordinates
|
// Copy coordinates
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Point>;
|
||||||
|
|
||||||
geometry::set<0>(point, util::numeric_cast<coordinate_type>(get<Corner1, 0>(box)));
|
geometry::set<0>(point, util::numeric_cast<coordinate_type>(get<Corner1, 0>(box)));
|
||||||
geometry::set<1>(point, util::numeric_cast<coordinate_type>(get<Corner2, 1>(box)));
|
geometry::set<1>(point, util::numeric_cast<coordinate_type>(get<Corner2, 1>(box)));
|
||||||
@ -125,7 +125,7 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
|
|||||||
template <typename Geometry>
|
template <typename Geometry>
|
||||||
struct assign_2d_box_or_segment
|
struct assign_2d_box_or_segment
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Geometry>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Geometry>;
|
||||||
|
|
||||||
// Here we assign 4 coordinates to a box of segment
|
// Here we assign 4 coordinates to a box of segment
|
||||||
// -> Most logical is: x1,y1,x2,y2
|
// -> Most logical is: x1,y1,x2,y2
|
||||||
@ -161,7 +161,7 @@ struct assign
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
struct assign<point_tag, Point, 2>
|
struct assign<point_tag, Point, 2>
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Point>;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static inline void apply(Point& point, T const& c1, T const& c2)
|
static inline void apply(Point& point, T const& c1, T const& c2)
|
||||||
@ -174,7 +174,7 @@ struct assign<point_tag, Point, 2>
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
struct assign<point_tag, Point, 3>
|
struct assign<point_tag, Point, 3>
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Point>;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static inline void apply(Point& point, T const& c1, T const& c2, T const& c3)
|
static inline void apply(Point& point, T const& c1, T const& c2, T const& c3)
|
||||||
|
@ -26,7 +26,7 @@ namespace detail { namespace buffer
|
|||||||
template <typename BoxIn, typename BoxOut, typename T, std::size_t C, std::size_t D, std::size_t N>
|
template <typename BoxIn, typename BoxOut, typename T, std::size_t C, std::size_t D, std::size_t N>
|
||||||
struct box_loop
|
struct box_loop
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<BoxOut>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<BoxOut>;
|
||||||
|
|
||||||
static inline void apply(BoxIn const& box_in, T const& distance, BoxOut& box_out)
|
static inline void apply(BoxIn const& box_in, T const& distance, BoxOut& box_out)
|
||||||
{
|
{
|
||||||
|
@ -124,8 +124,8 @@ template
|
|||||||
>
|
>
|
||||||
struct buffered_piece_collection
|
struct buffered_piece_collection
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Ring>::type point_type;
|
using point_type = geometry::point_type_t<Ring>;
|
||||||
typedef typename geometry::coordinate_type<Ring>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Ring>;
|
||||||
|
|
||||||
// Ring/polygon type, always clockwise
|
// Ring/polygon type, always clockwise
|
||||||
typedef geometry::model::ring<point_type> clockwise_ring_type;
|
typedef geometry::model::ring<point_type> clockwise_ring_type;
|
||||||
|
@ -129,13 +129,13 @@ struct closure<geometry::detail::buffer::buffered_ring<Ring> >
|
|||||||
template <typename Ring>
|
template <typename Ring>
|
||||||
struct point_type<geometry::detail::buffer::buffered_ring_collection<Ring> >
|
struct point_type<geometry::detail::buffer::buffered_ring_collection<Ring> >
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Ring>::type type;
|
using type = geometry::point_type_t<Ring>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Ring>
|
template <typename Ring>
|
||||||
struct tag<geometry::detail::buffer::buffered_ring_collection<Ring> >
|
struct tag<geometry::detail::buffer::buffered_ring_collection<Ring> >
|
||||||
{
|
{
|
||||||
typedef geometry::detail::buffer::buffered_ring_collection_tag type;
|
using type = geometry::detail::buffer::buffered_ring_collection_tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ namespace detail { namespace buffer
|
|||||||
template <typename Ring>
|
template <typename Ring>
|
||||||
struct unique_sub_range_from_piece
|
struct unique_sub_range_from_piece
|
||||||
{
|
{
|
||||||
typedef typename boost::range_iterator<Ring const>::type iterator_type;
|
using iterator_type = typename boost::range_iterator<Ring const>::type;
|
||||||
typedef typename geometry::point_type<Ring const>::type point_type;
|
using point_type = geometry::point_type_t<Ring const>;
|
||||||
|
|
||||||
unique_sub_range_from_piece(Ring const& ring,
|
unique_sub_range_from_piece(Ring const& ring,
|
||||||
iterator_type iterator_at_i, iterator_type iterator_at_j)
|
iterator_type iterator_at_i, iterator_type iterator_at_j)
|
||||||
|
@ -64,7 +64,7 @@ struct line_line_intersection
|
|||||||
// in a custom strategy, then the calculation of the point in between
|
// in a custom strategy, then the calculation of the point in between
|
||||||
// might be incorrect and the optimization is not used.
|
// might be incorrect and the optimization is not used.
|
||||||
|
|
||||||
using ct = typename coordinate_type<Point>::type;
|
using ct = coordinate_type_t<Point>;
|
||||||
|
|
||||||
auto const p = detail::make::make_infinite_line<ct>(pi, pj);
|
auto const p = detail::make::make_infinite_line<ct>(pi, pj);
|
||||||
auto const q = detail::make::make_infinite_line<ct>(qi, qj);
|
auto const q = detail::make::make_infinite_line<ct>(qi, qj);
|
||||||
|
@ -103,9 +103,9 @@ namespace detail { namespace buffer
|
|||||||
template <typename Ring, typename Point>
|
template <typename Ring, typename Point>
|
||||||
struct piece_border
|
struct piece_border
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||||
typedef typename default_comparable_distance_result<Point>::type radius_type;
|
using radius_type = typename default_comparable_distance_result<Point>::type;
|
||||||
typedef typename geometry::strategy::buffer::turn_in_ring_winding<coordinate_type>::state_type state_type;
|
using state_type = typename geometry::strategy::buffer::turn_in_ring_winding<coordinate_type>::state_type;
|
||||||
|
|
||||||
bool m_reversed;
|
bool m_reversed;
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@ template
|
|||||||
>
|
>
|
||||||
struct translating_transformer
|
struct translating_transformer
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
typedef boost::reference_wrapper<point_type const> result_type;
|
using result_type = boost::reference_wrapper<point_type const>;
|
||||||
|
|
||||||
explicit translating_transformer(Geometry const&) {}
|
explicit translating_transformer(Geometry const&) {}
|
||||||
explicit translating_transformer(point_type const&) {}
|
explicit translating_transformer(point_type const&) {}
|
||||||
@ -72,8 +72,8 @@ struct translating_transformer
|
|||||||
template <typename Geometry>
|
template <typename Geometry>
|
||||||
struct translating_transformer<Geometry, areal_tag, cartesian_tag>
|
struct translating_transformer<Geometry, areal_tag, cartesian_tag>
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
typedef point_type result_type;
|
using result_type = point_type;
|
||||||
|
|
||||||
explicit translating_transformer(Geometry const& geom)
|
explicit translating_transformer(Geometry const& geom)
|
||||||
: m_origin(NULL)
|
: m_origin(NULL)
|
||||||
|
@ -38,7 +38,7 @@ struct linear_to_areal
|
|||||||
|
|
||||||
using point_type = typename std::conditional
|
using point_type = typename std::conditional
|
||||||
<
|
<
|
||||||
std::is_same<typename coordinate_type<Linear>::type, most_precise_type>::value,
|
std::is_same<coordinate_type_t<Linear>, most_precise_type>::value,
|
||||||
point_type_t<Linear>,
|
point_type_t<Linear>,
|
||||||
point_type_t<Areal>
|
point_type_t<Areal>
|
||||||
>::type;
|
>::type;
|
||||||
@ -141,7 +141,7 @@ struct areal_to_areal
|
|||||||
|
|
||||||
using point_type = typename std::conditional
|
using point_type = typename std::conditional
|
||||||
<
|
<
|
||||||
std::is_same<typename coordinate_type<Areal1>::type, most_precise_type>::value,
|
std::is_same<coordinate_type_t<Areal1>, most_precise_type>::value,
|
||||||
point_type_t<Areal1>,
|
point_type_t<Areal1>,
|
||||||
point_type_t<Areal2>
|
point_type_t<Areal2>
|
||||||
>::type;
|
>::type;
|
||||||
|
@ -42,7 +42,7 @@ struct indexed_to_indexed
|
|||||||
{
|
{
|
||||||
static inline void apply(Source const& source, Destination& destination)
|
static inline void apply(Source const& source, Destination& destination)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Destination>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Destination>;
|
||||||
|
|
||||||
geometry::set<min_corner, Dimension>(destination,
|
geometry::set<min_corner, Dimension>(destination,
|
||||||
util::numeric_cast<coordinate_type>(
|
util::numeric_cast<coordinate_type>(
|
||||||
|
@ -43,7 +43,7 @@ struct point_to_point
|
|||||||
{
|
{
|
||||||
static inline void apply(Source const& source, Destination& destination)
|
static inline void apply(Source const& source, Destination& destination)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Destination>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Destination>;
|
||||||
|
|
||||||
set<Dimension>(destination, util::numeric_cast<coordinate_type>(get<Dimension>(source)));
|
set<Dimension>(destination, util::numeric_cast<coordinate_type>(get<Dimension>(source)));
|
||||||
point_to_point<Source, Destination, Dimension + 1, DimensionCount>::apply(source, destination);
|
point_to_point<Source, Destination, Dimension + 1, DimensionCount>::apply(source, destination);
|
||||||
|
@ -258,7 +258,7 @@ struct convex_hull<GeometryCollection, geometry_collection_tag>
|
|||||||
{
|
{
|
||||||
// Assuming that single point_type is used by the GeometryCollection
|
// Assuming that single point_type is used by the GeometryCollection
|
||||||
using subgeometry_type = typename detail::first_geometry_type<GeometryCollection>::type;
|
using subgeometry_type = typename detail::first_geometry_type<GeometryCollection>::type;
|
||||||
using point_type = typename geometry::point_type<subgeometry_type>::type;
|
using point_type = geometry::point_type_t<subgeometry_type>;
|
||||||
using ring_type = model::ring<point_type, true, false>;
|
using ring_type = model::ring<point_type, true, false>;
|
||||||
|
|
||||||
// Calculate box rings once
|
// Calculate box rings once
|
||||||
|
@ -105,9 +105,9 @@ struct direction_code_impl<spherical_equatorial_tag>
|
|||||||
units_sa_t, units_p_t);
|
units_sa_t, units_p_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
using coor_sa_t = typename coordinate_type<PointSegmentA>::type;
|
using coor_sa_t = coordinate_type_t<PointSegmentA>;
|
||||||
using coor_sb_t = typename coordinate_type<PointSegmentB>::type;
|
using coor_sb_t = coordinate_type_t<PointSegmentB>;
|
||||||
using coor_p_t = typename coordinate_type<Point2>::type;
|
using coor_p_t = coordinate_type_t<Point2>;
|
||||||
|
|
||||||
// Declare unit type (equal for all types) and calc type (coerced to most precise)
|
// Declare unit type (equal for all types) and calc type (coerced to most precise)
|
||||||
using units_t = typename cs_angular_units<Point2>::type;
|
using units_t = typename cs_angular_units<Point2>::type;
|
||||||
@ -211,12 +211,12 @@ struct direction_code_impl<spherical_polar_tag>
|
|||||||
{
|
{
|
||||||
using constants_sa_t = math::detail::constants_on_spheroid
|
using constants_sa_t = math::detail::constants_on_spheroid
|
||||||
<
|
<
|
||||||
typename coordinate_type<PointSegmentA>::type,
|
coordinate_type_t<PointSegmentA>,
|
||||||
typename cs_angular_units<PointSegmentA>::type
|
typename cs_angular_units<PointSegmentA>::type
|
||||||
>;
|
>;
|
||||||
using constants_p_t = math::detail::constants_on_spheroid
|
using constants_p_t = math::detail::constants_on_spheroid
|
||||||
<
|
<
|
||||||
typename coordinate_type<Point2>::type,
|
coordinate_type_t<Point2>,
|
||||||
typename cs_angular_units<Point2>::type
|
typename cs_angular_units<Point2>::type
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ inline bool point_on_border_covered_by(Geometry1 const& geometry1,
|
|||||||
Geometry2 const& geometry2,
|
Geometry2 const& geometry2,
|
||||||
Strategy const& strategy)
|
Strategy const& strategy)
|
||||||
{
|
{
|
||||||
using point_type = typename geometry::point_type<Geometry1>::type;
|
using point_type = geometry::point_type_t<Geometry1>;
|
||||||
typename helper_geometry<point_type>::type pt;
|
typename helper_geometry<point_type>::type pt;
|
||||||
return geometry::point_on_border(pt, geometry1)
|
return geometry::point_on_border(pt, geometry1)
|
||||||
&& geometry::covered_by(pt, geometry2, strategy);
|
&& geometry::covered_by(pt, geometry2, strategy);
|
||||||
|
@ -90,12 +90,9 @@ struct disjoint_linear
|
|||||||
Geometry2 const& geometry2,
|
Geometry2 const& geometry2,
|
||||||
Strategy const& strategy)
|
Strategy const& strategy)
|
||||||
{
|
{
|
||||||
using point_type = typename geometry::point_type<Geometry1>::type;
|
using point_type = geometry::point_type_t<Geometry1>;
|
||||||
using mutable_point_type = typename helper_geometry<point_type>::type;
|
using mutable_point_type = typename helper_geometry<point_type>::type;
|
||||||
using ratio_type = geometry::segment_ratio
|
using ratio_type = geometry::segment_ratio<coordinate_type_t<point_type>>;
|
||||||
<
|
|
||||||
typename coordinate_type<point_type>::type
|
|
||||||
> ;
|
|
||||||
using turn_info_type = overlay::turn_info
|
using turn_info_type = overlay::turn_info
|
||||||
<
|
<
|
||||||
mutable_point_type,
|
mutable_point_type,
|
||||||
|
@ -131,17 +131,17 @@ struct disjoint_segment_box_sphere_or_spheroid
|
|||||||
|
|
||||||
// Case 2: disjoint if bounding boxes are disjoint
|
// Case 2: disjoint if bounding boxes are disjoint
|
||||||
|
|
||||||
typedef typename coordinate_type<segment_point_type>::type CT;
|
using coor_t = coordinate_type_t<segment_point_type>;
|
||||||
|
|
||||||
segment_point_type p0_normalized;
|
segment_point_type p0_normalized;
|
||||||
NormalizeStrategy::apply(p0, p0_normalized);
|
NormalizeStrategy::apply(p0, p0_normalized);
|
||||||
segment_point_type p1_normalized;
|
segment_point_type p1_normalized;
|
||||||
NormalizeStrategy::apply(p1, p1_normalized);
|
NormalizeStrategy::apply(p1, p1_normalized);
|
||||||
|
|
||||||
CT lon1 = geometry::get_as_radian<0>(p0_normalized);
|
coor_t lon1 = geometry::get_as_radian<0>(p0_normalized);
|
||||||
CT lat1 = geometry::get_as_radian<1>(p0_normalized);
|
coor_t lat1 = geometry::get_as_radian<1>(p0_normalized);
|
||||||
CT lon2 = geometry::get_as_radian<0>(p1_normalized);
|
coor_t lon2 = geometry::get_as_radian<0>(p1_normalized);
|
||||||
CT lat2 = geometry::get_as_radian<1>(p1_normalized);
|
coor_t lat2 = geometry::get_as_radian<1>(p1_normalized);
|
||||||
|
|
||||||
if (lon1 > lon2)
|
if (lon1 > lon2)
|
||||||
{
|
{
|
||||||
@ -166,12 +166,12 @@ struct disjoint_segment_box_sphere_or_spheroid
|
|||||||
|
|
||||||
// Case 3: test intersection by comparing angles
|
// Case 3: test intersection by comparing angles
|
||||||
|
|
||||||
CT alp1, a_b0, a_b1, a_b2, a_b3;
|
coor_t alp1, a_b0, a_b1, a_b2, a_b3;
|
||||||
|
|
||||||
CT b_lon_min = geometry::get_as_radian<geometry::min_corner, 0>(box);
|
coor_t b_lon_min = geometry::get_as_radian<geometry::min_corner, 0>(box);
|
||||||
CT b_lat_min = geometry::get_as_radian<geometry::min_corner, 1>(box);
|
coor_t b_lat_min = geometry::get_as_radian<geometry::min_corner, 1>(box);
|
||||||
CT b_lon_max = geometry::get_as_radian<geometry::max_corner, 0>(box);
|
coor_t b_lon_max = geometry::get_as_radian<geometry::max_corner, 0>(box);
|
||||||
CT b_lat_max = geometry::get_as_radian<geometry::max_corner, 1>(box);
|
coor_t b_lat_max = geometry::get_as_radian<geometry::max_corner, 1>(box);
|
||||||
|
|
||||||
azimuth_strategy.apply(lon1, lat1, lon2, lat2, alp1);
|
azimuth_strategy.apply(lon1, lat1, lon2, lat2, alp1);
|
||||||
azimuth_strategy.apply(lon1, lat1, b_lon_min, b_lat_min, a_b0);
|
azimuth_strategy.apply(lon1, lat1, b_lon_min, b_lat_min, a_b0);
|
||||||
@ -212,12 +212,12 @@ struct disjoint_segment_box_sphere_or_spheroid
|
|||||||
// points of the box are above (below) the segment in northern (southern)
|
// points of the box are above (below) the segment in northern (southern)
|
||||||
// hemisphere. Then we have to compute the vertex of the segment
|
// hemisphere. Then we have to compute the vertex of the segment
|
||||||
|
|
||||||
CT vertex_lat;
|
coor_t vertex_lat;
|
||||||
|
|
||||||
if ((lat1 < b_lat_min && vertex_north)
|
if ((lat1 < b_lat_min && vertex_north)
|
||||||
|| (lat1 > b_lat_max && !vertex_north))
|
|| (lat1 > b_lat_max && !vertex_north))
|
||||||
{
|
{
|
||||||
CT b_lat_below; //latitude of box closest to equator
|
coor_t b_lat_below; //latitude of box closest to equator
|
||||||
|
|
||||||
if (vertex_north)
|
if (vertex_north)
|
||||||
{
|
{
|
||||||
@ -230,7 +230,7 @@ struct disjoint_segment_box_sphere_or_spheroid
|
|||||||
|
|
||||||
//optimization TODO: computing the spherical longitude should suffice for
|
//optimization TODO: computing the spherical longitude should suffice for
|
||||||
// the majority of cases
|
// the majority of cases
|
||||||
CT vertex_lon = geometry::formula::vertex_longitude<CT, CS_Tag>
|
coor_t vertex_lon = geometry::formula::vertex_longitude<coor_t, CS_Tag>
|
||||||
::apply(lon1, lat1,
|
::apply(lon1, lat1,
|
||||||
lon2, lat2,
|
lon2, lat2,
|
||||||
vertex_lat,
|
vertex_lat,
|
||||||
|
@ -68,9 +68,9 @@ inline auto collection_to_collection(GeometryCollection1 const& collection1,
|
|||||||
{
|
{
|
||||||
using result_t = typename geometry::distance_result<GeometryCollection1, GeometryCollection2, Strategies>::type;
|
using result_t = typename geometry::distance_result<GeometryCollection1, GeometryCollection2, Strategies>::type;
|
||||||
|
|
||||||
using point1_t = typename geometry::point_type<GeometryCollection1>::type;
|
using point1_t = geometry::point_type_t<GeometryCollection1>;
|
||||||
using box1_t = model::box<point1_t>;
|
using box1_t = model::box<point1_t>;
|
||||||
using point2_t = typename geometry::point_type<GeometryCollection2>::type;
|
using point2_t = geometry::point_type_t<GeometryCollection2>;
|
||||||
using box2_t = model::box<point2_t>;
|
using box2_t = model::box<point2_t>;
|
||||||
|
|
||||||
using rtree_value_t = std::pair<box1_t, typename boost::range_iterator<GeometryCollection1 const>::type>;
|
using rtree_value_t = std::pair<box1_t, typename boost::range_iterator<GeometryCollection1 const>::type>;
|
||||||
|
@ -62,7 +62,7 @@ template
|
|||||||
>
|
>
|
||||||
struct initialize
|
struct initialize
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<Box>;
|
||||||
|
|
||||||
static inline void apply(Box& box,
|
static inline void apply(Box& box,
|
||||||
coordinate_type min_value
|
coordinate_type min_value
|
||||||
|
@ -229,9 +229,9 @@ struct envelope_range_of_boxes
|
|||||||
{
|
{
|
||||||
// boxes in the range are assumed to be normalized already
|
// boxes in the range are assumed to be normalized already
|
||||||
|
|
||||||
typedef typename boost::range_value<RangeOfBoxes>::type box_type;
|
using box_type = typename boost::range_value<RangeOfBoxes>::type;
|
||||||
typedef typename coordinate_type<box_type>::type coordinate_type;
|
using coordinate_type = coordinate_type_t<box_type>;
|
||||||
typedef typename detail::cs_angular_units<box_type>::type units_type;
|
using units_type = typename detail::cs_angular_units<box_type>::type;
|
||||||
|
|
||||||
static const bool is_equatorial = ! std::is_same
|
static const bool is_equatorial = ! std::is_same
|
||||||
<
|
<
|
||||||
@ -239,13 +239,13 @@ struct envelope_range_of_boxes
|
|||||||
spherical_polar_tag
|
spherical_polar_tag
|
||||||
>::value;
|
>::value;
|
||||||
|
|
||||||
typedef math::detail::constants_on_spheroid
|
using constants = math::detail::constants_on_spheroid
|
||||||
<
|
<
|
||||||
coordinate_type, units_type, is_equatorial
|
coordinate_type, units_type, is_equatorial
|
||||||
> constants;
|
>;
|
||||||
|
|
||||||
typedef longitude_interval<coordinate_type> interval_type;
|
using interval_type = longitude_interval<coordinate_type>;
|
||||||
typedef std::vector<interval_type> interval_range_type;
|
using interval_range_type = std::vector<interval_type>;
|
||||||
|
|
||||||
BOOST_GEOMETRY_ASSERT(! boost::empty(range_of_boxes));
|
BOOST_GEOMETRY_ASSERT(! boost::empty(range_of_boxes));
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ struct collected_vector_polar
|
|||||||
private:
|
private:
|
||||||
static base_point_type to_equatorial(Point const& p)
|
static base_point_type to_equatorial(Point const& p)
|
||||||
{
|
{
|
||||||
using coord_type = typename coordinate_type<Point>::type;
|
using coord_type = coordinate_type_t<Point>;
|
||||||
using constants = math::detail::constants_on_spheroid
|
using constants = math::detail::constants_on_spheroid
|
||||||
<
|
<
|
||||||
coord_type,
|
coord_type,
|
||||||
|
@ -215,7 +215,7 @@ struct equals_by_collection
|
|||||||
>::template type
|
>::template type
|
||||||
<
|
<
|
||||||
calculation_type,
|
calculation_type,
|
||||||
typename geometry::point_type<Geometry1>::type
|
geometry::point_type_t<Geometry1>
|
||||||
>;
|
>;
|
||||||
|
|
||||||
std::vector<collected_vector_type> c1, c2;
|
std::vector<collected_vector_type> c1, c2;
|
||||||
|
@ -41,7 +41,7 @@ struct corner_by_epsilon
|
|||||||
{
|
{
|
||||||
static inline void apply(Point & point)
|
static inline void apply(Point & point)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coord_type;
|
using coord_type = coordinate_type_t<Point>;
|
||||||
coord_type const coord = get<I>(point);
|
coord_type const coord = get<I>(point);
|
||||||
coord_type const seps = math::scaled_epsilon(coord);
|
coord_type const seps = math::scaled_epsilon(coord);
|
||||||
|
|
||||||
@ -51,9 +51,9 @@ struct corner_by_epsilon
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void apply(Point & point,
|
static inline void apply(Point & point,
|
||||||
typename coordinate_type<Point>::type const& eps)
|
coordinate_type_t<Point> const& eps)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coord_type;
|
using coord_type = coordinate_type_t<Point>;
|
||||||
coord_type const coord = get<I>(point);
|
coord_type const coord = get<I>(point);
|
||||||
coord_type const seps = math::scaled_epsilon(coord, eps);
|
coord_type const seps = math::scaled_epsilon(coord, eps);
|
||||||
|
|
||||||
@ -72,13 +72,13 @@ template
|
|||||||
struct corner_by_epsilon<Point, PlusOrMinus, D, D>
|
struct corner_by_epsilon<Point, PlusOrMinus, D, D>
|
||||||
{
|
{
|
||||||
static inline void apply(Point const&) {}
|
static inline void apply(Point const&) {}
|
||||||
static inline void apply(Point const&, typename coordinate_type<Point>::type const&) {}
|
static inline void apply(Point const&, coordinate_type_t<Point> const&) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename Box,
|
typename Box,
|
||||||
bool Enable = ! std::is_integral<typename coordinate_type<Box>::type>::value
|
bool Enable = ! std::is_integral<coordinate_type_t<Box>>::value
|
||||||
>
|
>
|
||||||
struct expand_by_epsilon
|
struct expand_by_epsilon
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ struct expand_by_epsilon
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void apply(Box & box,
|
static inline void apply(Box & box,
|
||||||
typename coordinate_type<Box>::type const& eps)
|
coordinate_type_t<Box> const& eps)
|
||||||
{
|
{
|
||||||
typedef detail::indexed_point_view<Box, min_corner> min_type;
|
typedef detail::indexed_point_view<Box, min_corner> min_type;
|
||||||
min_type min_point(box);
|
min_type min_point(box);
|
||||||
@ -110,7 +110,7 @@ template <typename Box>
|
|||||||
struct expand_by_epsilon<Box, false>
|
struct expand_by_epsilon<Box, false>
|
||||||
{
|
{
|
||||||
static inline void apply(Box &) {}
|
static inline void apply(Box &) {}
|
||||||
static inline void apply(Box &, typename coordinate_type<Box>::type const&) {}
|
static inline void apply(Box &, coordinate_type_t<Box> const&) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace expand
|
} // namespace expand
|
||||||
@ -122,8 +122,7 @@ inline void expand_by_epsilon(Box & box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Box>
|
template <typename Box>
|
||||||
inline void expand_by_epsilon(Box & box,
|
inline void expand_by_epsilon(Box & box, coordinate_type_t<Box> const& eps)
|
||||||
typename coordinate_type<Box>::type const& eps)
|
|
||||||
{
|
{
|
||||||
expand::expand_by_epsilon<Box>::apply(box, eps);
|
expand::expand_by_epsilon<Box>::apply(box, eps);
|
||||||
}
|
}
|
||||||
|
@ -122,8 +122,8 @@ template<typename Ring, std::size_t Dimension>
|
|||||||
struct extreme_points_on_ring
|
struct extreme_points_on_ring
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef typename geometry::coordinate_type<Ring>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Ring>;
|
||||||
typedef typename geometry::point_type<Ring>::type point_type;
|
using point_type = geometry::point_type_t<Ring>;
|
||||||
|
|
||||||
template <typename CirclingIterator, typename Points>
|
template <typename CirclingIterator, typename Points>
|
||||||
static inline bool extend(CirclingIterator& it,
|
static inline bool extend(CirclingIterator& it,
|
||||||
|
@ -37,7 +37,7 @@ using gc_make_rtree_box_t = geometry::model::box
|
|||||||
<
|
<
|
||||||
geometry::model::point
|
geometry::model::point
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<GC>::type,
|
geometry::coordinate_type_t<GC>,
|
||||||
geometry::dimension<GC>::value,
|
geometry::dimension<GC>::value,
|
||||||
typename geometry::coordinate_system<GC>::type
|
typename geometry::coordinate_system<GC>::type
|
||||||
>
|
>
|
||||||
|
@ -33,9 +33,9 @@ namespace detail
|
|||||||
template <typename Box, std::size_t Dimension>
|
template <typename Box, std::size_t Dimension>
|
||||||
struct get_max_size_box
|
struct get_max_size_box
|
||||||
{
|
{
|
||||||
static inline typename coordinate_type<Box>::type apply(Box const& box)
|
static inline coordinate_type_t<Box> apply(Box const& box)
|
||||||
{
|
{
|
||||||
typename coordinate_type<Box>::type s
|
coordinate_type_t<Box> s
|
||||||
= geometry::math::abs(geometry::get<1, Dimension>(box) - geometry::get<0, Dimension>(box));
|
= geometry::math::abs(geometry::get<1, Dimension>(box) - geometry::get<0, Dimension>(box));
|
||||||
|
|
||||||
return (std::max)(s, get_max_size_box<Box, Dimension - 1>::apply(box));
|
return (std::max)(s, get_max_size_box<Box, Dimension - 1>::apply(box));
|
||||||
@ -45,7 +45,7 @@ struct get_max_size_box
|
|||||||
template <typename Box>
|
template <typename Box>
|
||||||
struct get_max_size_box<Box, 0>
|
struct get_max_size_box<Box, 0>
|
||||||
{
|
{
|
||||||
static inline typename coordinate_type<Box>::type apply(Box const& box)
|
static inline coordinate_type_t<Box> apply(Box const& box)
|
||||||
{
|
{
|
||||||
return geometry::math::abs(geometry::get<1, 0>(box) - geometry::get<0, 0>(box));
|
return geometry::math::abs(geometry::get<1, 0>(box) - geometry::get<0, 0>(box));
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ struct get_max_size_box<Box, 0>
|
|||||||
// This might be implemented later on for other geometries too.
|
// This might be implemented later on for other geometries too.
|
||||||
// Not dispatched yet.
|
// Not dispatched yet.
|
||||||
template <typename Box>
|
template <typename Box>
|
||||||
inline typename coordinate_type<Box>::type get_max_size(Box const& box)
|
inline coordinate_type_t<Box> get_max_size(Box const& box)
|
||||||
{
|
{
|
||||||
return get_max_size_box<Box, dimension<Box>::value - 1>::apply(box);
|
return get_max_size_box<Box, dimension<Box>::value - 1>::apply(box);
|
||||||
}
|
}
|
||||||
|
@ -46,20 +46,20 @@ struct self_intersects
|
|||||||
{
|
{
|
||||||
concepts::check<Geometry const>();
|
concepts::check<Geometry const>();
|
||||||
|
|
||||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
typedef typename strategies::relate::services::default_strategy
|
using strategy_type = typename strategies::relate::services::default_strategy
|
||||||
<
|
<
|
||||||
Geometry, Geometry
|
Geometry, Geometry
|
||||||
>::type strategy_type;
|
>::type;
|
||||||
|
|
||||||
typedef detail::overlay::turn_info<point_type> turn_info;
|
using turn_info = detail::overlay::turn_info<point_type>;
|
||||||
|
|
||||||
std::deque<turn_info> turns;
|
std::deque<turn_info> turns;
|
||||||
|
|
||||||
typedef detail::overlay::get_turn_info
|
using turn_policy = detail::overlay::get_turn_info
|
||||||
<
|
<
|
||||||
detail::overlay::assign_null_policy
|
detail::overlay::assign_null_policy
|
||||||
> turn_policy;
|
>;
|
||||||
|
|
||||||
strategy_type strategy;
|
strategy_type strategy;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ template
|
|||||||
typename Tag = typename tag<Geometry>::type,
|
typename Tag = typename tag<Geometry>::type,
|
||||||
bool HasFloatingPointCoordinates = std::is_floating_point
|
bool HasFloatingPointCoordinates = std::is_floating_point
|
||||||
<
|
<
|
||||||
typename coordinate_type<Geometry>::type
|
coordinate_type_t<Geometry>
|
||||||
>::value
|
>::value
|
||||||
>
|
>
|
||||||
struct has_invalid_coordinate
|
struct has_invalid_coordinate
|
||||||
|
@ -59,8 +59,8 @@ struct box_box_loop
|
|||||||
{
|
{
|
||||||
assert_dimension_equal<Box1, Box2>();
|
assert_dimension_equal<Box1, Box2>();
|
||||||
|
|
||||||
typedef typename coordinate_type<Box1>::type coordinate_type1;
|
using coordinate_type1 = coordinate_type_t<Box1>;
|
||||||
typedef typename coordinate_type<Box2>::type coordinate_type2;
|
using coordinate_type2 = coordinate_type_t<Box2>;
|
||||||
|
|
||||||
coordinate_type1 const& min1 = get<min_corner, Dimension>(b1);
|
coordinate_type1 const& min1 = get<min_corner, Dimension>(b1);
|
||||||
coordinate_type1 const& max1 = get<max_corner, Dimension>(b1);
|
coordinate_type1 const& max1 = get<max_corner, Dimension>(b1);
|
||||||
|
@ -99,8 +99,8 @@ public:
|
|||||||
|
|
||||||
inline bool clip_segment(Box const& b, segment_type& s, bool& sp1_clipped, bool& sp2_clipped) const
|
inline bool clip_segment(Box const& b, segment_type& s, bool& sp1_clipped, bool& sp2_clipped) const
|
||||||
{
|
{
|
||||||
typedef typename select_coordinate_type<Box, Point>::type coordinate_type;
|
using coordinate_type = typename select_coordinate_type<Box, Point>::type;
|
||||||
typedef typename select_most_precise<coordinate_type, double>::type calc_type;
|
using calc_type = typename select_most_precise<coordinate_type, double>::type;
|
||||||
|
|
||||||
calc_type t1 = 0;
|
calc_type t1 = 0;
|
||||||
calc_type t2 = 1;
|
calc_type t2 = 1;
|
||||||
|
@ -25,7 +25,7 @@ namespace detail { namespace overlay
|
|||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename Point,
|
typename Point,
|
||||||
typename CoordinateType = typename geometry::coordinate_type<Point>::type,
|
typename CoordinateType = geometry::coordinate_type_t<Point>,
|
||||||
typename CsTag = typename geometry::cs_tag<Point>::type,
|
typename CsTag = typename geometry::cs_tag<Point>::type,
|
||||||
bool IsIntegral = std::is_integral<CoordinateType>::value
|
bool IsIntegral = std::is_integral<CoordinateType>::value
|
||||||
>
|
>
|
||||||
|
@ -318,12 +318,11 @@ inline void create_map(Turns const& turns, MappedVector& mapped_vector,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Point1, typename Point2>
|
template <typename Point1, typename Point2>
|
||||||
inline typename geometry::coordinate_type<Point1>::type
|
inline geometry::coordinate_type_t<Point1> distance_measure(Point1 const& a, Point2 const& b)
|
||||||
distance_measure(Point1 const& a, Point2 const& b)
|
|
||||||
{
|
{
|
||||||
// TODO: use comparable distance for point-point instead - but that
|
// TODO: use comparable distance for point-point instead - but that
|
||||||
// causes currently cycling include problems
|
// causes currently cycling include problems
|
||||||
using ctype = typename geometry::coordinate_type<Point1>::type;
|
using ctype = geometry::coordinate_type_t<Point1>;
|
||||||
ctype const dx = get<0>(a) - get<0>(b);
|
ctype const dx = get<0>(a) - get<0>(b);
|
||||||
ctype const dy = get<1>(a) - get<1>(b);
|
ctype const dy = get<1>(a) - get<1>(b);
|
||||||
return dx * dx + dy * dy;
|
return dx * dx + dy * dy;
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
template <typename P>
|
template <typename P>
|
||||||
static inline bool equals(P const& p1, P const& p2)
|
static inline bool equals(P const& p1, P const& p2)
|
||||||
{
|
{
|
||||||
using coor_t = typename coordinate_type<P>::type;
|
using coor_t = coordinate_type_t<P>;
|
||||||
static auto const tolerance
|
static auto const tolerance
|
||||||
= common_approximately_equals_epsilon_multiplier<coor_t>::value();
|
= common_approximately_equals_epsilon_multiplier<coor_t>::value();
|
||||||
return approximately_equals(p1, p2, tolerance);
|
return approximately_equals(p1, p2, tolerance);
|
||||||
@ -101,7 +101,7 @@ inline void get_clusters(Turns& turns, Clusters& clusters)
|
|||||||
|
|
||||||
sweep_equal_policy
|
sweep_equal_policy
|
||||||
<
|
<
|
||||||
std::is_integral<typename coordinate_type<point_type>::type>::value
|
std::is_integral<coordinate_type_t<point_type>>::value
|
||||||
> equal_policy;
|
> equal_policy;
|
||||||
|
|
||||||
std::vector<turn_with_point<point_type>> points;
|
std::vector<turn_with_point<point_type>> points;
|
||||||
|
@ -216,7 +216,7 @@ struct turn_info_verification_functions
|
|||||||
BOOST_GEOMETRY_ASSERT(index_p > 0 && index_p <= 2);
|
BOOST_GEOMETRY_ASSERT(index_p > 0 && index_p <= 2);
|
||||||
BOOST_GEOMETRY_ASSERT(index_q > 0 && index_q <= 2);
|
BOOST_GEOMETRY_ASSERT(index_q > 0 && index_q <= 2);
|
||||||
|
|
||||||
using distance_measure_result_type = typename geometry::coordinate_type<decltype(ti.point)>::type;
|
using distance_measure_result_type = geometry::coordinate_type_t<decltype(ti.point)>;
|
||||||
|
|
||||||
bool const p_in_range = index_p < range_p.size();
|
bool const p_in_range = index_p < range_p.size();
|
||||||
bool const q_in_range = index_q < range_q.size();
|
bool const q_in_range = index_q < range_q.size();
|
||||||
|
@ -390,8 +390,8 @@ public :
|
|||||||
|
|
||||||
|
|
||||||
private :
|
private :
|
||||||
typedef typename geometry::point_type<Geometry1>::type point1_type;
|
using point1_type = geometry::point_type_t<Geometry1>;
|
||||||
typedef typename geometry::point_type<Geometry2>::type point2_type;
|
using point2_type = geometry::point_type_t<Geometry2>;
|
||||||
|
|
||||||
// It is NOT possible to have section-iterators here
|
// It is NOT possible to have section-iterators here
|
||||||
// because of the logistics of "index" (the section-iterator automatically
|
// because of the logistics of "index" (the section-iterator automatically
|
||||||
@ -540,9 +540,9 @@ template
|
|||||||
>
|
>
|
||||||
struct get_turns_cs
|
struct get_turns_cs
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Range>::type range_point_type;
|
using range_point_type = geometry::point_type_t<Range>;
|
||||||
typedef typename geometry::point_type<Box>::type box_point_type;
|
using box_point_type = geometry::point_type_t<Box>;
|
||||||
typedef std::array<box_point_type, 4> box_array;
|
using box_array = std::array<box_point_type, 4>;
|
||||||
|
|
||||||
using view_type = detail::closed_clockwise_view
|
using view_type = detail::closed_clockwise_view
|
||||||
<
|
<
|
||||||
|
@ -288,7 +288,7 @@ struct intersection_of_linestring_with_areal
|
|||||||
|
|
||||||
typedef geometry::segment_ratio
|
typedef geometry::segment_ratio
|
||||||
<
|
<
|
||||||
typename coordinate_type<point_type>::type
|
coordinate_type_t<point_type>
|
||||||
> ratio_type;
|
> ratio_type;
|
||||||
|
|
||||||
typedef detail::overlay::turn_info
|
typedef detail::overlay::turn_info
|
||||||
@ -419,9 +419,9 @@ struct intersection_linear_areal_point
|
|||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
Strategy const& strategy)
|
Strategy const& strategy)
|
||||||
{
|
{
|
||||||
typedef geometry::segment_ratio<typename geometry::coordinate_type<PointOut>::type> ratio_type;
|
using ratio_type = geometry::segment_ratio<geometry::coordinate_type_t<PointOut>>;
|
||||||
|
|
||||||
typedef detail::overlay::turn_info
|
using turn_info = detail::overlay::turn_info
|
||||||
<
|
<
|
||||||
PointOut,
|
PointOut,
|
||||||
ratio_type,
|
ratio_type,
|
||||||
@ -430,12 +430,12 @@ struct intersection_linear_areal_point
|
|||||||
PointOut,
|
PointOut,
|
||||||
ratio_type
|
ratio_type
|
||||||
>
|
>
|
||||||
> turn_info;
|
>;
|
||||||
|
|
||||||
typedef detail::overlay::get_turn_info_linear_areal
|
using turn_policy = detail::overlay::get_turn_info_linear_areal
|
||||||
<
|
<
|
||||||
detail::overlay::assign_null_policy
|
detail::overlay::assign_null_policy
|
||||||
> turn_policy;
|
>;
|
||||||
|
|
||||||
std::vector<turn_info> turns;
|
std::vector<turn_info> turns;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ private :
|
|||||||
Geometry2 const& m_geometry2;
|
Geometry2 const& m_geometry2;
|
||||||
Strategy const& m_strategy;
|
Strategy const& m_strategy;
|
||||||
|
|
||||||
typedef typename geometry::point_type<Geometry1>::type point_type;
|
using point_type = geometry::point_type_t<Geometry1>;
|
||||||
|
|
||||||
inline bool default_order(Indexed const& left, Indexed const& right) const
|
inline bool default_order(Indexed const& left, Indexed const& right) const
|
||||||
{
|
{
|
||||||
|
@ -182,7 +182,7 @@ inline OutputIterator return_if_one_input_is_empty(Geometry1 const& geometry1,
|
|||||||
|
|
||||||
typedef ring_properties
|
typedef ring_properties
|
||||||
<
|
<
|
||||||
typename geometry::point_type<ring_type>::type,
|
geometry::point_type_t<ring_type>,
|
||||||
typename geometry::area_result<ring_type, Strategy>::type
|
typename geometry::area_result<ring_type, Strategy>::type
|
||||||
> properties;
|
> properties;
|
||||||
|
|
||||||
@ -248,23 +248,23 @@ struct overlay
|
|||||||
>(geometry1, geometry2, out, strategy);
|
>(geometry1, geometry2, out, strategy);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename geometry::point_type<GeometryOut>::type point_type;
|
using point_type = geometry::point_type_t<GeometryOut>;
|
||||||
typedef detail::overlay::traversal_turn_info
|
using turn_info = detail::overlay::traversal_turn_info
|
||||||
<
|
<
|
||||||
point_type,
|
point_type,
|
||||||
typename segment_ratio_type<point_type>::type
|
typename segment_ratio_type<point_type>::type
|
||||||
> turn_info;
|
>;
|
||||||
typedef std::deque<turn_info> turn_container_type;
|
using turn_container_type = std::deque<turn_info>;
|
||||||
|
|
||||||
typedef typename geometry::ring_type<GeometryOut>::type ring_type;
|
using ring_type = typename geometry::ring_type<GeometryOut>::type;
|
||||||
typedef std::deque<ring_type> ring_container_type;
|
using ring_container_type = std::deque<ring_type>;
|
||||||
|
|
||||||
// Define the clusters, mapping cluster_id -> turns
|
// Define the clusters, mapping cluster_id -> turns
|
||||||
typedef std::map
|
using cluster_type = std::map
|
||||||
<
|
<
|
||||||
signed_size_type,
|
signed_size_type,
|
||||||
cluster_info
|
cluster_info
|
||||||
> cluster_type;
|
>;
|
||||||
|
|
||||||
turn_container_type turns;
|
turn_container_type turns;
|
||||||
|
|
||||||
|
@ -183,14 +183,14 @@ private:
|
|||||||
{
|
{
|
||||||
item_visitor_type<OutputIterator, Strategy> item_visitor(multipolygon, oit, strategy);
|
item_visitor_type<OutputIterator, Strategy> item_visitor(multipolygon, oit, strategy);
|
||||||
|
|
||||||
typedef geometry::model::point
|
using point_type = geometry::model::point
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<MultiPoint>::type,
|
geometry::coordinate_type_t<MultiPoint>,
|
||||||
geometry::dimension<MultiPoint>::value,
|
geometry::dimension<MultiPoint>::value,
|
||||||
typename geometry::coordinate_system<MultiPoint>::type
|
typename geometry::coordinate_system<MultiPoint>::type
|
||||||
> point_type;
|
>;
|
||||||
typedef geometry::model::box<point_type> box_type;
|
using box_type = geometry::model::box<point_type>;
|
||||||
typedef std::pair<box_type, std::size_t> box_pair;
|
using box_pair = std::pair<box_type, std::size_t>;
|
||||||
std::vector<box_pair> box_pairs;
|
std::vector<box_pair> box_pairs;
|
||||||
box_pairs.reserve(boost::size(multipolygon));
|
box_pairs.reserve(boost::size(multipolygon));
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ struct points_range
|
|||||||
template <typename Box>
|
template <typename Box>
|
||||||
struct points_range<Box, box_tag>
|
struct points_range<Box, box_tag>
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Box>::type point_type;
|
using point_type = geometry::point_type_t<Box>;
|
||||||
typedef const point_type * iterator_type;
|
using iterator_type = const point_type *;
|
||||||
|
|
||||||
explicit points_range(Box const& box)
|
explicit points_range(Box const& box)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ struct segment_as_subrange
|
|||||||
geometry::set<1>(m_p2, geometry::get<1, 1>(m_segment));
|
geometry::set<1>(m_p2, geometry::get<1, 1>(m_segment));
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename geometry::point_type<Segment>::type point_type;
|
using point_type = geometry::point_type_t<Segment>;
|
||||||
|
|
||||||
point_type const& at(std::size_t index) const
|
point_type const& at(std::size_t index) const
|
||||||
{
|
{
|
||||||
|
@ -131,13 +131,13 @@ struct get_turns
|
|||||||
InterruptPolicy& interrupt_policy,
|
InterruptPolicy& interrupt_policy,
|
||||||
int source_index, bool skip_adjacent)
|
int source_index, bool skip_adjacent)
|
||||||
{
|
{
|
||||||
typedef model::box<typename geometry::point_type<Geometry>::type> box_type;
|
using box_type = model::box<geometry::point_type_t<Geometry>>;
|
||||||
|
|
||||||
// sectionalize in two dimensions to detect
|
// sectionalize in two dimensions to detect
|
||||||
// all potential spikes correctly
|
// all potential spikes correctly
|
||||||
typedef geometry::sections<box_type, 2> sections_type;
|
using sections_type = geometry::sections<box_type, 2>;
|
||||||
|
|
||||||
typedef std::integer_sequence<std::size_t, 0, 1> dimensions;
|
using dimensions = std::integer_sequence<std::size_t, 0, 1>;
|
||||||
|
|
||||||
sections_type sec;
|
sections_type sec;
|
||||||
geometry::sectionalize<Reverse, dimensions>(geometry,
|
geometry::sectionalize<Reverse, dimensions>(geometry,
|
||||||
|
@ -322,7 +322,7 @@ public :
|
|||||||
// Use the coordinate type, but if it is too small (e.g. std::int16), use a double
|
// Use the coordinate type, but if it is too small (e.g. std::int16), use a double
|
||||||
using ct_type = typename geometry::select_most_precise
|
using ct_type = typename geometry::select_most_precise
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<Point>::type,
|
geometry::coordinate_type_t<Point>,
|
||||||
double
|
double
|
||||||
>::type;
|
>::type;
|
||||||
|
|
||||||
|
@ -92,16 +92,16 @@ private :
|
|||||||
|
|
||||||
static const operation_type target_operation = operation_from_overlay<OverlayType>::value;
|
static const operation_type target_operation = operation_from_overlay<OverlayType>::value;
|
||||||
|
|
||||||
typedef typename sort_by_side::side_compare<target_operation>::type side_compare_type;
|
using side_compare_type = typename sort_by_side::side_compare<target_operation>::type;
|
||||||
typedef typename boost::range_value<Turns>::type turn_type;
|
using turn_type = typename boost::range_value<Turns>::type;
|
||||||
typedef typename turn_type::turn_operation_type turn_operation_type;
|
using turn_operation_type = typename turn_type::turn_operation_type;
|
||||||
|
|
||||||
typedef typename geometry::point_type<Geometry1>::type point_type;
|
using point_type = geometry::point_type_t<Geometry1>;
|
||||||
typedef sort_by_side::side_sorter
|
using sbs_type = sort_by_side::side_sorter
|
||||||
<
|
<
|
||||||
Reverse1, Reverse2, OverlayType,
|
Reverse1, Reverse2, OverlayType,
|
||||||
point_type, Strategy, side_compare_type
|
point_type, Strategy, side_compare_type
|
||||||
> sbs_type;
|
>;
|
||||||
|
|
||||||
public :
|
public :
|
||||||
inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2,
|
inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2,
|
||||||
|
@ -57,7 +57,7 @@ struct turn_operation
|
|||||||
segment_identifier seg_id;
|
segment_identifier seg_id;
|
||||||
SegmentRatio fraction;
|
SegmentRatio fraction;
|
||||||
|
|
||||||
typedef typename coordinate_type<Point>::type comparable_distance_type;
|
using comparable_distance_type = coordinate_type_t<Point>;
|
||||||
comparable_distance_type remaining_distance;
|
comparable_distance_type remaining_distance;
|
||||||
|
|
||||||
inline turn_operation()
|
inline turn_operation()
|
||||||
@ -79,7 +79,7 @@ struct turn_operation
|
|||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename Point,
|
typename Point,
|
||||||
typename SegmentRatio = geometry::segment_ratio<typename coordinate_type<Point>::type>,
|
typename SegmentRatio = geometry::segment_ratio<coordinate_type_t<Point>>,
|
||||||
typename Operation = turn_operation<Point, SegmentRatio>,
|
typename Operation = turn_operation<Point, SegmentRatio>,
|
||||||
typename Container = std::array<Operation, 2>
|
typename Container = std::array<Operation, 2>
|
||||||
>
|
>
|
||||||
|
@ -77,7 +77,7 @@ struct include_all_policy
|
|||||||
template <std::size_t Dimension, typename Box>
|
template <std::size_t Dimension, typename Box>
|
||||||
inline void divide_box(Box const& box, Box& lower_box, Box& upper_box)
|
inline void divide_box(Box const& box, Box& lower_box, Box& upper_box)
|
||||||
{
|
{
|
||||||
using coor_t = typename coordinate_type<Box>::type;
|
using coor_t = coordinate_type_t<Box>;
|
||||||
|
|
||||||
// Divide input box into two halves
|
// Divide input box into two halves
|
||||||
// either left/right (Dimension 0)
|
// either left/right (Dimension 0)
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using point_type = typename geometry::point_type<Areal>::type;
|
using point_type = geometry::point_type_t<Areal>;
|
||||||
typename helper_geometry<point_type>::type pt;
|
typename helper_geometry<point_type>::type pt;
|
||||||
bool const ok = geometry::point_on_border(pt, areal);
|
bool const ok = geometry::point_on_border(pt, areal);
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ struct gc_gc
|
|||||||
typename traits::geometry_types<Geometry1>::type,
|
typename traits::geometry_types<Geometry1>::type,
|
||||||
util::is_multi_polygon
|
util::is_multi_polygon
|
||||||
>::type;
|
>::type;
|
||||||
using pt1_t = typename geometry::point_type<Geometry1>::type;
|
using pt1_t = geometry::point_type_t<Geometry1>;
|
||||||
using mpt1_t = std::conditional_t
|
using mpt1_t = std::conditional_t
|
||||||
<
|
<
|
||||||
std::is_void<mpt1_found_t>::value,
|
std::is_void<mpt1_found_t>::value,
|
||||||
@ -158,7 +158,7 @@ struct gc_gc
|
|||||||
typename traits::geometry_types<Geometry2>::type,
|
typename traits::geometry_types<Geometry2>::type,
|
||||||
util::is_multi_polygon
|
util::is_multi_polygon
|
||||||
>::type;
|
>::type;
|
||||||
using pt2_t = typename geometry::point_type<Geometry2>::type;
|
using pt2_t = geometry::point_type_t<Geometry2>;
|
||||||
using mpt2_t = std::conditional_t
|
using mpt2_t = std::conditional_t
|
||||||
<
|
<
|
||||||
std::is_void<mpt2_found_t>::value,
|
std::is_void<mpt2_found_t>::value,
|
||||||
|
@ -172,7 +172,7 @@ public:
|
|||||||
// TODO:
|
// TODO:
|
||||||
// handle empty/invalid geometries in a different way than below?
|
// handle empty/invalid geometries in a different way than below?
|
||||||
|
|
||||||
using point_type = typename geometry::point_type<Areal>::type;
|
using point_type = geometry::point_type_t<Areal>;
|
||||||
typename helper_geometry<point_type>::type pt;
|
typename helper_geometry<point_type>::type pt;
|
||||||
bool const ok = geometry::point_on_border(pt, areal);
|
bool const ok = geometry::point_on_border(pt, areal);
|
||||||
|
|
||||||
|
@ -224,8 +224,8 @@ struct multipoint_multipoint
|
|||||||
Result & result)
|
Result & result)
|
||||||
{
|
{
|
||||||
// sort points from the 1 MPt
|
// sort points from the 1 MPt
|
||||||
typedef typename geometry::point_type<SortedMultiPoint>::type point_type;
|
using point_type = geometry::point_type_t<SortedMultiPoint>;
|
||||||
typedef geometry::less<void, -1, Strategy> less_type;
|
using less_type = geometry::less<void, -1, Strategy>;
|
||||||
|
|
||||||
std::vector<point_type> points(boost::begin(sorted_mpt), boost::end(sorted_mpt));
|
std::vector<point_type> points(boost::begin(sorted_mpt), boost::end(sorted_mpt));
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ private:
|
|||||||
mutable bool m_has_interior;
|
mutable bool m_has_interior;
|
||||||
mutable bool m_has_boundary;
|
mutable bool m_has_boundary;
|
||||||
|
|
||||||
typedef typename geometry::point_type<MultiLinestring>::type point_type;
|
using point_type = geometry::point_type_t<MultiLinestring>;
|
||||||
mutable std::vector<point_type> m_endpoints;
|
mutable std::vector<point_type> m_endpoints;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ struct get_turns
|
|||||||
{
|
{
|
||||||
using turn_point_type = typename helper_geometry
|
using turn_point_type = typename helper_geometry
|
||||||
<
|
<
|
||||||
typename geometry::point_type<Geometry1>::type
|
geometry::point_type_t<Geometry1>
|
||||||
>::type;
|
>::type;
|
||||||
|
|
||||||
template
|
template
|
||||||
|
@ -189,7 +189,7 @@ struct get_direction_loop<Point, DimensionVector, 0, Count, spherical_tag>
|
|||||||
static inline void apply(Segment const& seg,
|
static inline void apply(Segment const& seg,
|
||||||
int directions[Count])
|
int directions[Count])
|
||||||
{
|
{
|
||||||
using coordinate_type = typename coordinate_type<Segment>::type;
|
using coordinate_type = coordinate_type_t<Segment>;
|
||||||
using units_t = typename coordinate_system<Point>::type::units;
|
using units_t = typename coordinate_system<Point>::type::units;
|
||||||
|
|
||||||
coordinate_type const diff = math::longitude_distance_signed
|
coordinate_type const diff = math::longitude_distance_signed
|
||||||
@ -391,7 +391,7 @@ struct sectionalize_part
|
|||||||
{
|
{
|
||||||
using section_type = typename boost::range_value<Sections>::type;
|
using section_type = typename boost::range_value<Sections>::type;
|
||||||
using box_type = typename section_type::box_type;
|
using box_type = typename section_type::box_type;
|
||||||
using point_type = typename geometry::point_type<box_type>::type;
|
using point_type = geometry::point_type_t<box_type>;
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT
|
BOOST_STATIC_ASSERT
|
||||||
(
|
(
|
||||||
@ -713,7 +713,7 @@ inline void enlarge_sections(Sections& sections, Strategy const&)
|
|||||||
// but that somehow is not accepted by the NVCC (CUDA 12.4) compiler.
|
// but that somehow is not accepted by the NVCC (CUDA 12.4) compiler.
|
||||||
using section_t = typename boost::range_value<Sections>::type;
|
using section_t = typename boost::range_value<Sections>::type;
|
||||||
using box_t = typename section_t::box_type;
|
using box_t = typename section_t::box_type;
|
||||||
using coor_t = typename geometry::coordinate_type<box_t>::type;
|
using coor_t = geometry::coordinate_type_t<box_t>;
|
||||||
|
|
||||||
static auto const eps = math::scaled_epsilon<coor_t>(1000);
|
static auto const eps = math::scaled_epsilon<coor_t>(1000);
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ struct box_box_loop
|
|||||||
template <typename Box1, typename Box2>
|
template <typename Box1, typename Box2>
|
||||||
static inline bool apply(Box1 const& b1, Box2 const& b2, bool & touch)
|
static inline bool apply(Box1 const& b1, Box2 const& b2, bool & touch)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Box1>::type coordinate_type1;
|
using coordinate_type1 = coordinate_type_t<Box1>;
|
||||||
typedef typename coordinate_type<Box2>::type coordinate_type2;
|
using coordinate_type2 = coordinate_type_t<Box2>;
|
||||||
|
|
||||||
coordinate_type1 const& min1 = get<min_corner, Dimension>(b1);
|
coordinate_type1 const& min1 = get<min_corner, Dimension>(b1);
|
||||||
coordinate_type1 const& max1 = get<max_corner, Dimension>(b1);
|
coordinate_type1 const& max1 = get<max_corner, Dimension>(b1);
|
||||||
@ -217,7 +217,7 @@ inline bool point_on_border_within(Geometry1 const& geometry1,
|
|||||||
Geometry2 const& geometry2,
|
Geometry2 const& geometry2,
|
||||||
Strategy const& strategy)
|
Strategy const& strategy)
|
||||||
{
|
{
|
||||||
using point_type = typename geometry::point_type<Geometry1>::type;
|
using point_type = geometry::point_type_t<Geometry1>;
|
||||||
typename helper_geometry<point_type>::type pt;
|
typename helper_geometry<point_type>::type pt;
|
||||||
return geometry::point_on_border(pt, geometry1)
|
return geometry::point_on_border(pt, geometry1)
|
||||||
&& geometry::within(pt, geometry2, strategy);
|
&& geometry::within(pt, geometry2, strategy);
|
||||||
@ -242,7 +242,7 @@ struct areal_areal
|
|||||||
Geometry2 const& geometry2,
|
Geometry2 const& geometry2,
|
||||||
Strategy const& strategy)
|
Strategy const& strategy)
|
||||||
{
|
{
|
||||||
using point_type = typename geometry::point_type<Geometry1>::type;
|
using point_type = geometry::point_type_t<Geometry1>;
|
||||||
using mutable_point_type = typename helper_geometry<point_type>::type;
|
using mutable_point_type = typename helper_geometry<point_type>::type;
|
||||||
using turn_info = detail::overlay::turn_info<mutable_point_type>;
|
using turn_info = detail::overlay::turn_info<mutable_point_type>;
|
||||||
|
|
||||||
@ -505,17 +505,17 @@ struct self_touches
|
|||||||
{
|
{
|
||||||
concepts::check<Geometry const>();
|
concepts::check<Geometry const>();
|
||||||
|
|
||||||
typedef typename strategies::relate::services::default_strategy
|
using strategy_type = typename strategies::relate::services::default_strategy
|
||||||
<
|
<
|
||||||
Geometry, Geometry
|
Geometry, Geometry
|
||||||
>::type strategy_type;
|
>::type;
|
||||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
typedef detail::overlay::turn_info<point_type> turn_info;
|
using turn_info = detail::overlay::turn_info<point_type>;
|
||||||
|
|
||||||
typedef detail::overlay::get_turn_info
|
using policy_type = detail::overlay::get_turn_info
|
||||||
<
|
<
|
||||||
detail::overlay::assign_null_policy
|
detail::overlay::assign_null_policy
|
||||||
> policy_type;
|
>;
|
||||||
|
|
||||||
std::deque<turn_info> turns;
|
std::deque<turn_info> turns;
|
||||||
detail::touches::areal_interrupt_policy policy;
|
detail::touches::areal_interrupt_policy policy;
|
||||||
|
@ -94,7 +94,7 @@ struct point_in_geometry<Segment, segment_tag>
|
|||||||
template <typename Point, typename Strategy> static inline
|
template <typename Point, typename Strategy> static inline
|
||||||
int apply(Point const& point, Segment const& segment, Strategy const& strategy)
|
int apply(Point const& point, Segment const& segment, Strategy const& strategy)
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Segment>::type point_type;
|
using point_type = geometry::point_type_t<Segment>;
|
||||||
point_type p0, p1;
|
point_type p0, p1;
|
||||||
// TODO: don't copy points
|
// TODO: don't copy points
|
||||||
detail::assign_point_from_index<0>(segment, p0);
|
detail::assign_point_from_index<0>(segment, p0);
|
||||||
|
@ -66,7 +66,7 @@ template
|
|||||||
>
|
>
|
||||||
inline void distribute_element(Geometry const& geometry, It it, PointLike& , Linear&, Areal& areal)
|
inline void distribute_element(Geometry const& geometry, It it, PointLike& , Linear&, Areal& areal)
|
||||||
{
|
{
|
||||||
typename geometry::point_type<Geometry>::type point;
|
geometry::point_type_t<Geometry> point;
|
||||||
if (geometry::point_on_border(point, geometry))
|
if (geometry::point_on_border(point, geometry))
|
||||||
{
|
{
|
||||||
using point_t = typename Areal::value_type::first_type;
|
using point_t = typename Areal::value_type::first_type;
|
||||||
@ -81,7 +81,7 @@ template
|
|||||||
>
|
>
|
||||||
inline void distribute_element(Geometry const& geometry, It it, PointLike& , Linear& linear, Areal& )
|
inline void distribute_element(Geometry const& geometry, It it, PointLike& , Linear& linear, Areal& )
|
||||||
{
|
{
|
||||||
typename geometry::point_type<Geometry>::type point;
|
geometry::point_type_t<Geometry> point;
|
||||||
if (geometry::point_on_border(point, geometry))
|
if (geometry::point_on_border(point, geometry))
|
||||||
{
|
{
|
||||||
using point_t = typename Linear::value_type::first_type;
|
using point_t = typename Linear::value_type::first_type;
|
||||||
@ -96,7 +96,7 @@ template
|
|||||||
>
|
>
|
||||||
inline void distribute_element(Geometry const& geometry, It it, PointLike& pointlike, Linear& , Areal& )
|
inline void distribute_element(Geometry const& geometry, It it, PointLike& pointlike, Linear& , Areal& )
|
||||||
{
|
{
|
||||||
typename geometry::point_type<Geometry>::type point;
|
geometry::point_type_t<Geometry> point;
|
||||||
if (geometry::point_on_border(point, geometry))
|
if (geometry::point_on_border(point, geometry))
|
||||||
{
|
{
|
||||||
using point_t = typename Linear::value_type::first_type;
|
using point_t = typename Linear::value_type::first_type;
|
||||||
@ -268,11 +268,11 @@ struct merge_gc
|
|||||||
GeometryCollection & out,
|
GeometryCollection & out,
|
||||||
Strategy const& strategy)
|
Strategy const& strategy)
|
||||||
{
|
{
|
||||||
using original_point_t = typename geometry::point_type<GeometryCollection>::type;
|
using original_point_t = geometry::point_type_t<GeometryCollection>;
|
||||||
using iterator_t = typename boost::range_iterator<GeometryCollection const>::type;
|
using iterator_t = typename boost::range_iterator<GeometryCollection const>::type;
|
||||||
using coordinate_t = typename geometry::coordinate_type<original_point_t>::type;
|
using coor_t = geometry::coordinate_type_t<original_point_t>;
|
||||||
using cs_t = typename geometry::coordinate_system<original_point_t>::type;
|
using cs_t = typename geometry::coordinate_system<original_point_t>::type;
|
||||||
using point_t = model::point<coordinate_t, 2, cs_t>;
|
using point_t = model::point<coor_t, 2, cs_t>;
|
||||||
|
|
||||||
using multi_point_t = typename util::sequence_find_if
|
using multi_point_t = typename util::sequence_find_if
|
||||||
<
|
<
|
||||||
|
@ -146,7 +146,7 @@ struct min_of_intruder
|
|||||||
template <typename Point, typename P>
|
template <typename Point, typename P>
|
||||||
inline void calculate_average(Point& point, std::vector<P> const& points)
|
inline void calculate_average(Point& point, std::vector<P> const& points)
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||||
|
|
||||||
coordinate_type x = 0;
|
coordinate_type x = 0;
|
||||||
coordinate_type y = 0;
|
coordinate_type y = 0;
|
||||||
@ -237,8 +237,8 @@ template <int Dimension, typename Geometry, typename Point, typename SideStrateg
|
|||||||
inline bool calculate_point_on_surface(Geometry const& geometry, Point& point,
|
inline bool calculate_point_on_surface(Geometry const& geometry, Point& point,
|
||||||
SideStrategy const& strategy)
|
SideStrategy const& strategy)
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
typedef typename geometry::coordinate_type<Geometry>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Geometry>;
|
||||||
std::vector<point_type> extremes;
|
std::vector<point_type> extremes;
|
||||||
|
|
||||||
typedef std::vector<std::vector<point_type> > intruders_type;
|
typedef std::vector<std::vector<point_type> > intruders_type;
|
||||||
@ -327,10 +327,10 @@ inline void point_on_surface(Geometry const& geometry, Point & point)
|
|||||||
\return The Point guaranteed to lie on the surface of the Geometry
|
\return The Point guaranteed to lie on the surface of the Geometry
|
||||||
*/
|
*/
|
||||||
template<typename Geometry, typename SideStrategy>
|
template<typename Geometry, typename SideStrategy>
|
||||||
inline typename geometry::point_type<Geometry>::type
|
inline geometry::point_type_t<Geometry>
|
||||||
return_point_on_surface(Geometry const& geometry, SideStrategy const& strategy)
|
return_point_on_surface(Geometry const& geometry, SideStrategy const& strategy)
|
||||||
{
|
{
|
||||||
typename geometry::point_type<Geometry>::type result;
|
geometry::point_type_t<Geometry> result;
|
||||||
geometry::point_on_surface(geometry, result, strategy);
|
geometry::point_on_surface(geometry, result, strategy);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -342,10 +342,10 @@ return_point_on_surface(Geometry const& geometry, SideStrategy const& strategy)
|
|||||||
\return The Point guaranteed to lie on the surface of the Geometry
|
\return The Point guaranteed to lie on the surface of the Geometry
|
||||||
*/
|
*/
|
||||||
template<typename Geometry>
|
template<typename Geometry>
|
||||||
inline typename geometry::point_type<Geometry>::type
|
inline geometry::point_type_t<Geometry>
|
||||||
return_point_on_surface(Geometry const& geometry)
|
return_point_on_surface(Geometry const& geometry)
|
||||||
{
|
{
|
||||||
typename geometry::point_type<Geometry>::type result;
|
geometry::point_type_t<Geometry> result;
|
||||||
geometry::point_on_surface(geometry, result);
|
geometry::point_on_surface(geometry, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ private :
|
|||||||
auto const cdistance_strategy = strategies::distance::detail::make_comparable(strategies)
|
auto const cdistance_strategy = strategies::distance::detail::make_comparable(strategies)
|
||||||
.distance(detail::dummy_point(), detail::dummy_point());
|
.distance(detail::dummy_point(), detail::dummy_point());
|
||||||
|
|
||||||
using point_type = typename geometry::point_type<Ring>::type;
|
using point_type = geometry::point_type_t<Ring>;
|
||||||
using cdistance_type = decltype(cdistance_strategy.apply(
|
using cdistance_type = decltype(cdistance_strategy.apply(
|
||||||
std::declval<point_type>(), std::declval<point_type>()));
|
std::declval<point_type>(), std::declval<point_type>()));
|
||||||
|
|
||||||
@ -444,7 +444,7 @@ public :
|
|||||||
// Rotate it into a copied vector
|
// Rotate it into a copied vector
|
||||||
// (vector, because source type might not support rotation)
|
// (vector, because source type might not support rotation)
|
||||||
// (duplicate end point will be simplified away)
|
// (duplicate end point will be simplified away)
|
||||||
typedef typename geometry::point_type<RingIn>::type point_type;
|
using point_type = geometry::point_type_t<RingIn>;
|
||||||
|
|
||||||
std::vector<point_type> rotated;
|
std::vector<point_type> rotated;
|
||||||
rotated.reserve(size + 1); // 1 because open rings are closed
|
rotated.reserve(size + 1); // 1 because open rings are closed
|
||||||
|
@ -84,10 +84,10 @@ struct transform_box
|
|||||||
{
|
{
|
||||||
// Create a valid box and therefore swap if necessary
|
// Create a valid box and therefore swap if necessary
|
||||||
using coordinate_type = coordinate_type_t<point_type2>;
|
using coordinate_type = coordinate_type_t<point_type2>;
|
||||||
coordinate_type x1 = geometry::get<0>(p1)
|
coordinate_type x1 = geometry::get<0>(p1);
|
||||||
, y1 = geometry::get<1>(p1)
|
coordinate_type y1 = geometry::get<1>(p1);
|
||||||
, x2 = geometry::get<0>(p2)
|
coordinate_type x2 = geometry::get<0>(p2);
|
||||||
, y2 = geometry::get<1>(p2);
|
coordinate_type y2 = geometry::get<1>(p2);
|
||||||
|
|
||||||
if (x1 > x2) { std::swap(x1, x2); }
|
if (x1 > x2) { std::swap(x1, x2); }
|
||||||
if (y1 > y2) { std::swap(y1, y2); }
|
if (y1 > y2) { std::swap(y1, y2); }
|
||||||
|
@ -167,10 +167,10 @@ inline void unique(Geometry& geometry)
|
|||||||
concepts::check<Geometry>();
|
concepts::check<Geometry>();
|
||||||
|
|
||||||
// Default strategy is the default point-comparison policy
|
// Default strategy is the default point-comparison policy
|
||||||
typedef geometry::equal_to
|
using policy = geometry::equal_to
|
||||||
<
|
<
|
||||||
typename geometry::point_type<Geometry>::type
|
geometry::point_type_t<Geometry>
|
||||||
> policy;
|
>;
|
||||||
|
|
||||||
|
|
||||||
dispatch::unique<Geometry>::apply(geometry, policy());
|
dispatch::unique<Geometry>::apply(geometry, policy());
|
||||||
|
@ -41,7 +41,7 @@ namespace boost { namespace geometry
|
|||||||
\param value value to add
|
\param value value to add
|
||||||
*/
|
*/
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline void add_value(Point& p, typename coordinate_type<Point>::type const& value)
|
inline void add_value(Point& p, coordinate_type_t<Point> const& value)
|
||||||
{
|
{
|
||||||
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ inline void add_point(Point1& p1, Point2 const& p2)
|
|||||||
\param value value to subtract
|
\param value value to subtract
|
||||||
*/
|
*/
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline void subtract_value(Point& p, typename coordinate_type<Point>::type const& value)
|
inline void subtract_value(Point& p, coordinate_type_t<Point> const& value)
|
||||||
{
|
{
|
||||||
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ inline void subtract_point(Point1& p1, Point2 const& p2)
|
|||||||
\param value value to multiply by
|
\param value value to multiply by
|
||||||
*/
|
*/
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline void multiply_value(Point& p, typename coordinate_type<Point>::type const& value)
|
inline void multiply_value(Point& p, coordinate_type_t<Point> const& value)
|
||||||
{
|
{
|
||||||
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ inline void multiply_point(Point1& p1, Point2 const& p2)
|
|||||||
\param value value to divide by
|
\param value value to divide by
|
||||||
*/
|
*/
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline void divide_value(Point& p, typename coordinate_type<Point>::type const& value)
|
inline void divide_value(Point& p, coordinate_type_t<Point> const& value)
|
||||||
{
|
{
|
||||||
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ inline void divide_point(Point1& p1, Point2 const& p2)
|
|||||||
\param value value to assign
|
\param value value to assign
|
||||||
*/
|
*/
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline void assign_value(Point& p, typename coordinate_type<Point>::type const& value)
|
inline void assign_value(Point& p, coordinate_type_t<Point> const& value)
|
||||||
{
|
{
|
||||||
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ inline ReturnType determinant(U const& u, V const& v)
|
|||||||
return calculate_determinant
|
return calculate_determinant
|
||||||
<
|
<
|
||||||
ReturnType,
|
ReturnType,
|
||||||
typename geometry::coordinate_type<U>::type,
|
geometry::coordinate_type_t<U>,
|
||||||
typename geometry::coordinate_type<V>::type
|
geometry::coordinate_type_t<V>
|
||||||
>::apply(get<0>(u), get<1>(u), get<0>(v), get<1>(v));
|
>::apply(get<0>(u), get<1>(u), get<0>(v), get<1>(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ inline
|
|||||||
typename select_most_precise
|
typename select_most_precise
|
||||||
<
|
<
|
||||||
Type,
|
Type,
|
||||||
typename geometry::coordinate_type<Point>::type
|
geometry::coordinate_type_t<Point>
|
||||||
>::type
|
>::type
|
||||||
side_value(model::infinite_line<Type> const& line, Point const& p)
|
side_value(model::infinite_line<Type> const& line, Point const& p)
|
||||||
{
|
{
|
||||||
|
@ -26,22 +26,22 @@ namespace detail
|
|||||||
{
|
{
|
||||||
|
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline typename coordinate_type<Point>::type vec_length_sqr(Point const& pt)
|
inline coordinate_type_t<Point> vec_length_sqr(Point const& pt)
|
||||||
{
|
{
|
||||||
return dot_product(pt, pt);
|
return dot_product(pt, pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline typename coordinate_type<Point>::type vec_length(Point const& pt)
|
inline coordinate_type_t<Point> vec_length(Point const& pt)
|
||||||
{
|
{
|
||||||
// NOTE: hypot() could be used instead of sqrt()
|
// NOTE: hypot() could be used instead of sqrt()
|
||||||
return math::sqrt(dot_product(pt, pt));
|
return math::sqrt(dot_product(pt, pt));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline bool vec_normalize(Point & pt, typename coordinate_type<Point>::type & len)
|
inline bool vec_normalize(Point & pt, coordinate_type_t<Point>& len)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coord_t;
|
using coord_t = coordinate_type_t<Point>;
|
||||||
|
|
||||||
coord_t const c0 = 0;
|
coord_t const c0 = 0;
|
||||||
len = vec_length(pt);
|
len = vec_length(pt);
|
||||||
@ -58,7 +58,7 @@ inline bool vec_normalize(Point & pt, typename coordinate_type<Point>::type & le
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
inline bool vec_normalize(Point & pt)
|
inline bool vec_normalize(Point & pt)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coord_t;
|
using coord_t = coordinate_type_t<Point>;
|
||||||
coord_t len;
|
coord_t len;
|
||||||
return vec_normalize(pt, len);
|
return vec_normalize(pt, len);
|
||||||
}
|
}
|
||||||
|
@ -49,10 +49,10 @@ struct promote_floating_point
|
|||||||
template <typename Geometry>
|
template <typename Geometry>
|
||||||
struct fp_coordinate_type
|
struct fp_coordinate_type
|
||||||
{
|
{
|
||||||
typedef typename promote_floating_point
|
using type = typename promote_floating_point
|
||||||
<
|
<
|
||||||
typename coordinate_type<Geometry>::type
|
coordinate_type_t<Geometry>
|
||||||
>::type type;
|
>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
|
@ -35,7 +35,7 @@ namespace formula {
|
|||||||
template <typename Point3d, typename PointGeo, typename Spheroid>
|
template <typename Point3d, typename PointGeo, typename Spheroid>
|
||||||
inline Point3d geo_to_cart3d(PointGeo const& point_geo, Spheroid const& spheroid)
|
inline Point3d geo_to_cart3d(PointGeo const& point_geo, Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type calc_t;
|
using calc_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
calc_t const c1 = 1;
|
calc_t const c1 = 1;
|
||||||
calc_t const e_sqr = eccentricity_sqr<calc_t>(spheroid);
|
calc_t const e_sqr = eccentricity_sqr<calc_t>(spheroid);
|
||||||
@ -61,7 +61,7 @@ inline Point3d geo_to_cart3d(PointGeo const& point_geo, Spheroid const& spheroid
|
|||||||
template <typename PointGeo, typename Spheroid, typename Point3d>
|
template <typename PointGeo, typename Spheroid, typename Point3d>
|
||||||
inline void geo_to_cart3d(PointGeo const& point_geo, Point3d & result, Point3d & north, Point3d & east, Spheroid const& spheroid)
|
inline void geo_to_cart3d(PointGeo const& point_geo, Point3d & result, Point3d & north, Point3d & east, Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type calc_t;
|
using calc_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
calc_t const c1 = 1;
|
calc_t const c1 = 1;
|
||||||
calc_t const e_sqr = eccentricity_sqr<calc_t>(spheroid);
|
calc_t const e_sqr = eccentricity_sqr<calc_t>(spheroid);
|
||||||
@ -94,8 +94,8 @@ inline void geo_to_cart3d(PointGeo const& point_geo, Point3d & result, Point3d &
|
|||||||
template <typename PointGeo, typename Point3d, typename Spheroid>
|
template <typename PointGeo, typename Point3d, typename Spheroid>
|
||||||
inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid)
|
inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<PointGeo>::type coord_t;
|
using coord_t = coordinate_type_t<PointGeo>;
|
||||||
typedef typename coordinate_type<Point3d>::type calc_t;
|
using calc_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
calc_t const c1 = 1;
|
calc_t const c1 = 1;
|
||||||
//calc_t const c2 = 2;
|
//calc_t const c2 = 2;
|
||||||
@ -141,7 +141,7 @@ inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid)
|
|||||||
template <typename Point3d, typename Spheroid>
|
template <typename Point3d, typename Spheroid>
|
||||||
inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid)
|
inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
// len_xy = sqrt(x^2 + y^2)
|
// len_xy = sqrt(x^2 + y^2)
|
||||||
// r = len_xy - |z / tan(lat)|
|
// r = len_xy - |z / tan(lat)|
|
||||||
@ -167,7 +167,7 @@ inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid
|
|||||||
template <typename Point3d, typename Spheroid>
|
template <typename Point3d, typename Spheroid>
|
||||||
inline Point3d projected_to_surface(Point3d const& direction, Spheroid const& spheroid)
|
inline Point3d projected_to_surface(Point3d const& direction, Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
//coord_t const c0 = 0;
|
//coord_t const c0 = 0;
|
||||||
coord_t const c2 = 2;
|
coord_t const c2 = 2;
|
||||||
@ -206,7 +206,7 @@ inline bool projected_to_surface(Point3d const& origin, Point3d const& direction
|
|||||||
Point3d & result1, Point3d & result2,
|
Point3d & result1, Point3d & result2,
|
||||||
Spheroid const& spheroid)
|
Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
coord_t const c0 = 0;
|
coord_t const c0 = 0;
|
||||||
coord_t const c1 = 1;
|
coord_t const c1 = 1;
|
||||||
@ -265,7 +265,7 @@ inline bool great_elliptic_intersection(Point3d const& a1, Point3d const& a2,
|
|||||||
Point3d & result,
|
Point3d & result,
|
||||||
Spheroid const& spheroid)
|
Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
coord_t c0 = 0;
|
coord_t c0 = 0;
|
||||||
coord_t c1 = 1;
|
coord_t c1 = 1;
|
||||||
@ -308,7 +308,7 @@ inline bool great_elliptic_intersection(Point3d const& a1, Point3d const& a2,
|
|||||||
template <typename Point3d1, typename Point3d2>
|
template <typename Point3d1, typename Point3d2>
|
||||||
static inline int elliptic_side_value(Point3d1 const& origin, Point3d1 const& norm, Point3d2 const& pt)
|
static inline int elliptic_side_value(Point3d1 const& origin, Point3d1 const& norm, Point3d2 const& pt)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d1>::type calc_t;
|
using calc_t = coordinate_type_t<Point3d1>;
|
||||||
calc_t c0 = 0;
|
calc_t c0 = 0;
|
||||||
|
|
||||||
// vector oposite to pt - origin
|
// vector oposite to pt - origin
|
||||||
@ -330,7 +330,7 @@ inline bool planes_spheroid_intersection(Point3d const& o1, Point3d const& n1,
|
|||||||
Point3d & ip1, Point3d & ip2,
|
Point3d & ip1, Point3d & ip2,
|
||||||
Spheroid const& spheroid)
|
Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
coord_t c0 = 0;
|
coord_t c0 = 0;
|
||||||
coord_t c1 = 1;
|
coord_t c1 = 1;
|
||||||
@ -381,7 +381,7 @@ inline void experimental_elliptic_plane(Point3d const& p1, Point3d const& p2,
|
|||||||
Point3d & origin, Point3d & normal,
|
Point3d & origin, Point3d & normal,
|
||||||
Spheroid const& spheroid)
|
Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
Point3d xy1 = projected_to_xy(p1, spheroid);
|
Point3d xy1 = projected_to_xy(p1, spheroid);
|
||||||
Point3d xy2 = projected_to_xy(p2, spheroid);
|
Point3d xy2 = projected_to_xy(p2, spheroid);
|
||||||
@ -416,7 +416,7 @@ inline bool experimental_elliptic_intersection(Point3d const& a1, Point3d const&
|
|||||||
Point3d & result,
|
Point3d & result,
|
||||||
Spheroid const& spheroid)
|
Spheroid const& spheroid)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type coord_t;
|
using coord_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
coord_t c0 = 0;
|
coord_t c0 = 0;
|
||||||
coord_t c1 = 1;
|
coord_t c1 = 1;
|
||||||
|
@ -56,7 +56,7 @@ static inline void sph_to_cart3d(T const& lon, T const& lat, T & x, T & y, T & z
|
|||||||
template <typename Point3d, typename PointSph>
|
template <typename Point3d, typename PointSph>
|
||||||
static inline Point3d sph_to_cart3d(PointSph const& point_sph)
|
static inline Point3d sph_to_cart3d(PointSph const& point_sph)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point3d>::type calc_t;
|
using calc_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
calc_t const lon = get_as_radian<0>(point_sph);
|
calc_t const lon = get_as_radian<0>(point_sph);
|
||||||
calc_t const lat = get_as_radian<1>(point_sph);
|
calc_t const lat = get_as_radian<1>(point_sph);
|
||||||
@ -81,8 +81,8 @@ static inline void cart3d_to_sph(T const& x, T const& y, T const& z, T & lon, T
|
|||||||
template <typename PointSph, typename Point3d>
|
template <typename PointSph, typename Point3d>
|
||||||
static inline PointSph cart3d_to_sph(Point3d const& point_3d)
|
static inline PointSph cart3d_to_sph(Point3d const& point_3d)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<PointSph>::type coord_t;
|
using coord_t = coordinate_type_t<PointSph>;
|
||||||
typedef typename coordinate_type<Point3d>::type calc_t;
|
using calc_t = coordinate_type_t<Point3d>;
|
||||||
|
|
||||||
calc_t const x = get<0>(point_3d);
|
calc_t const x = get<0>(point_3d);
|
||||||
calc_t const y = get<1>(point_3d);
|
calc_t const y = get<1>(point_3d);
|
||||||
|
@ -140,7 +140,7 @@ struct access
|
|||||||
>
|
>
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Sequence>::type ctype;
|
using ctype = coordinate_type_t<Sequence>;
|
||||||
|
|
||||||
static inline ctype get(Sequence const& point)
|
static inline ctype get(Sequence const& point)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ struct point_type<std::pair<Point, Point> >
|
|||||||
template <typename Point, std::size_t Dimension>
|
template <typename Point, std::size_t Dimension>
|
||||||
struct indexed_access<std::pair<Point, Point>, 0, Dimension>
|
struct indexed_access<std::pair<Point, Point>, 0, Dimension>
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||||
|
|
||||||
static inline coordinate_type get(std::pair<Point, Point> const& s)
|
static inline coordinate_type get(std::pair<Point, Point> const& s)
|
||||||
{
|
{
|
||||||
@ -74,7 +74,7 @@ struct indexed_access<std::pair<Point, Point>, 0, Dimension>
|
|||||||
template <typename Point, std::size_t Dimension>
|
template <typename Point, std::size_t Dimension>
|
||||||
struct indexed_access<std::pair<Point, Point>, 1, Dimension>
|
struct indexed_access<std::pair<Point, Point>, 1, Dimension>
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||||
|
|
||||||
static inline coordinate_type get(std::pair<Point, Point> const& s)
|
static inline coordinate_type get(std::pair<Point, Point> const& s)
|
||||||
{
|
{
|
||||||
|
@ -204,7 +204,7 @@ struct point_type<model::box<Point> >
|
|||||||
template <typename Point, std::size_t Dimension>
|
template <typename Point, std::size_t Dimension>
|
||||||
struct indexed_access<model::box<Point>, min_corner, Dimension>
|
struct indexed_access<model::box<Point>, min_corner, Dimension>
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||||
|
|
||||||
static constexpr coordinate_type get(model::box<Point> const& b)
|
static constexpr coordinate_type get(model::box<Point> const& b)
|
||||||
{
|
{
|
||||||
@ -220,7 +220,7 @@ struct indexed_access<model::box<Point>, min_corner, Dimension>
|
|||||||
template <typename Point, std::size_t Dimension>
|
template <typename Point, std::size_t Dimension>
|
||||||
struct indexed_access<model::box<Point>, max_corner, Dimension>
|
struct indexed_access<model::box<Point>, max_corner, Dimension>
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||||
|
|
||||||
static constexpr coordinate_type get(model::box<Point> const& b)
|
static constexpr coordinate_type get(model::box<Point> const& b)
|
||||||
{
|
{
|
||||||
|
@ -40,8 +40,8 @@ class Point
|
|||||||
{
|
{
|
||||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||||
|
|
||||||
typedef typename coordinate_type<Geometry>::type ctype;
|
using ctype = coordinate_type_t<Geometry>;
|
||||||
typedef typename coordinate_system<Geometry>::type csystem;
|
using csystem = typename coordinate_system<Geometry>::type;
|
||||||
|
|
||||||
// The following enum is used to fully instantiate the coordinate
|
// The following enum is used to fully instantiate the coordinate
|
||||||
// system class; this is needed in order to check the units passed
|
// system class; this is needed in order to check the units passed
|
||||||
@ -93,7 +93,7 @@ class ConstPoint
|
|||||||
{
|
{
|
||||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||||
|
|
||||||
typedef typename coordinate_type<Geometry>::type ctype;
|
typedef coordinate_type_t<Geometry> ctype;
|
||||||
typedef typename coordinate_system<Geometry>::type csystem;
|
typedef typename coordinate_system<Geometry>::type csystem;
|
||||||
|
|
||||||
// The following enum is used to fully instantiate the coordinate
|
// The following enum is used to fully instantiate the coordinate
|
||||||
|
@ -129,7 +129,7 @@ struct helper_geometry<Ring, NewCoordinateType, NewUnits, ring_tag>
|
|||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename Geometry,
|
typename Geometry,
|
||||||
typename NewCoordinateType = typename coordinate_type<Geometry>::type,
|
typename NewCoordinateType = coordinate_type_t<Geometry>,
|
||||||
typename NewUnits = typename detail::cs_angular_units<Geometry>::type
|
typename NewUnits = typename detail::cs_angular_units<Geometry>::type
|
||||||
>
|
>
|
||||||
struct helper_geometry
|
struct helper_geometry
|
||||||
|
@ -84,17 +84,14 @@ struct tag<model::pointing_segment<Point> >
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
struct point_type<model::pointing_segment<Point> >
|
struct point_type<model::pointing_segment<Point> >
|
||||||
{
|
{
|
||||||
typedef Point type;
|
using type = Point;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Point, std::size_t Dimension>
|
template <typename Point, std::size_t Dimension>
|
||||||
struct indexed_access<model::pointing_segment<Point>, 0, Dimension>
|
struct indexed_access<model::pointing_segment<Point>, 0, Dimension>
|
||||||
{
|
{
|
||||||
typedef model::pointing_segment<Point> segment_type;
|
using segment_type = model::pointing_segment<Point>;
|
||||||
typedef typename geometry::coordinate_type
|
using coordinate_type = geometry::coordinate_type_t<segment_type>;
|
||||||
<
|
|
||||||
segment_type
|
|
||||||
>::type coordinate_type;
|
|
||||||
|
|
||||||
static inline coordinate_type get(segment_type const& s)
|
static inline coordinate_type get(segment_type const& s)
|
||||||
{
|
{
|
||||||
@ -113,11 +110,8 @@ struct indexed_access<model::pointing_segment<Point>, 0, Dimension>
|
|||||||
template <typename Point, std::size_t Dimension>
|
template <typename Point, std::size_t Dimension>
|
||||||
struct indexed_access<model::pointing_segment<Point>, 1, Dimension>
|
struct indexed_access<model::pointing_segment<Point>, 1, Dimension>
|
||||||
{
|
{
|
||||||
typedef model::pointing_segment<Point> segment_type;
|
using segment_type = model::pointing_segment<Point>;
|
||||||
typedef typename geometry::coordinate_type
|
using coordinate_type = geometry::coordinate_type_t<segment_type>;
|
||||||
<
|
|
||||||
segment_type
|
|
||||||
>::type coordinate_type;
|
|
||||||
|
|
||||||
static inline coordinate_type get(segment_type const& s)
|
static inline coordinate_type get(segment_type const& s)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
template <size_t D> \
|
template <size_t D> \
|
||||||
struct indexed_access<Box, min_corner, D> \
|
struct indexed_access<Box, min_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Box const& b) \
|
static inline ct get(Box const& b) \
|
||||||
{ return geometry::get<D>(b. MinCorner); } \
|
{ return geometry::get<D>(b. MinCorner); } \
|
||||||
static inline void set(Box& b, ct const& value) \
|
static inline void set(Box& b, ct const& value) \
|
||||||
@ -32,7 +32,7 @@ struct indexed_access<Box, min_corner, D> \
|
|||||||
template <size_t D> \
|
template <size_t D> \
|
||||||
struct indexed_access<Box, max_corner, D> \
|
struct indexed_access<Box, max_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Box const& b) \
|
static inline ct get(Box const& b) \
|
||||||
{ return geometry::get<D>(b. MaxCorner); } \
|
{ return geometry::get<D>(b. MaxCorner); } \
|
||||||
static inline void set(Box& b, ct const& value) \
|
static inline void set(Box& b, ct const& value) \
|
||||||
@ -44,7 +44,7 @@ struct indexed_access<Box, max_corner, D> \
|
|||||||
template <typename P, size_t D> \
|
template <typename P, size_t D> \
|
||||||
struct indexed_access<Box<P>, min_corner, D> \
|
struct indexed_access<Box<P>, min_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<P>::type ct; \
|
using ct = coordinate_type_t<P>; \
|
||||||
static inline ct get(Box<P> const& b) \
|
static inline ct get(Box<P> const& b) \
|
||||||
{ return geometry::get<D>(b. MinCorner); } \
|
{ return geometry::get<D>(b. MinCorner); } \
|
||||||
static inline void set(Box<P>& b, ct const& value) \
|
static inline void set(Box<P>& b, ct const& value) \
|
||||||
@ -53,7 +53,7 @@ struct indexed_access<Box<P>, min_corner, D> \
|
|||||||
template <typename P, size_t D> \
|
template <typename P, size_t D> \
|
||||||
struct indexed_access<Box<P>, max_corner, D> \
|
struct indexed_access<Box<P>, max_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<P>::type ct; \
|
using ct = coordinate_type_t<P>; \
|
||||||
static inline ct get(Box<P> const& b) \
|
static inline ct get(Box<P> const& b) \
|
||||||
{ return geometry::get<D>(b. MaxCorner); } \
|
{ return geometry::get<D>(b. MaxCorner); } \
|
||||||
static inline void set(Box<P>& b, ct const& value) \
|
static inline void set(Box<P>& b, ct const& value) \
|
||||||
@ -64,25 +64,25 @@ struct indexed_access<Box<P>, max_corner, D> \
|
|||||||
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top) \
|
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top) \
|
||||||
template <> struct indexed_access<Box, min_corner, 0> \
|
template <> struct indexed_access<Box, min_corner, 0> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Box const& b) { return b. Left; } \
|
static inline ct get(Box const& b) { return b. Left; } \
|
||||||
static inline void set(Box& b, ct const& value) { b. Left = value; } \
|
static inline void set(Box& b, ct const& value) { b. Left = value; } \
|
||||||
}; \
|
}; \
|
||||||
template <> struct indexed_access<Box, min_corner, 1> \
|
template <> struct indexed_access<Box, min_corner, 1> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Box const& b) { return b. Bottom; } \
|
static inline ct get(Box const& b) { return b. Bottom; } \
|
||||||
static inline void set(Box& b, ct const& value) { b. Bottom = value; } \
|
static inline void set(Box& b, ct const& value) { b. Bottom = value; } \
|
||||||
}; \
|
}; \
|
||||||
template <> struct indexed_access<Box, max_corner, 0> \
|
template <> struct indexed_access<Box, max_corner, 0> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Box const& b) { return b. Right; } \
|
static inline ct get(Box const& b) { return b. Right; } \
|
||||||
static inline void set(Box& b, ct const& value) { b. Right = value; } \
|
static inline void set(Box& b, ct const& value) { b. Right = value; } \
|
||||||
}; \
|
}; \
|
||||||
template <> struct indexed_access<Box, max_corner, 1> \
|
template <> struct indexed_access<Box, max_corner, 1> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Box const& b) { return b. Top; } \
|
static inline ct get(Box const& b) { return b. Top; } \
|
||||||
static inline void set(Box& b, ct const& value) { b. Top = value; } \
|
static inline void set(Box& b, ct const& value) { b. Top = value; } \
|
||||||
};
|
};
|
||||||
|
@ -31,10 +31,10 @@
|
|||||||
|
|
||||||
// Starting point, specialize basic traits necessary to register a point
|
// Starting point, specialize basic traits necessary to register a point
|
||||||
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, Dim, CoordinateType, CoordinateSystem) \
|
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, Dim, CoordinateType, CoordinateSystem) \
|
||||||
template<> struct tag<Point> { typedef point_tag type; }; \
|
template<> struct tag<Point> { using type = point_tag; }; \
|
||||||
template<> struct dimension<Point> : std::integral_constant<std::size_t, Dim> {}; \
|
template<> struct dimension<Point> : std::integral_constant<std::size_t, Dim> {}; \
|
||||||
template<> struct coordinate_type<Point> { typedef CoordinateType type; }; \
|
template<> struct coordinate_type<Point> { using type = CoordinateType; }; \
|
||||||
template<> struct coordinate_system<Point> { typedef CoordinateSystem type; };
|
template<> struct coordinate_system<Point> { using type = CoordinateSystem; };
|
||||||
|
|
||||||
// Specialize access class per dimension
|
// Specialize access class per dimension
|
||||||
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, Dim, CoordinateType, Get, Set) \
|
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, Dim, CoordinateType, Get, Set) \
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
template <size_t D> \
|
template <size_t D> \
|
||||||
struct indexed_access<Segment, min_corner, D> \
|
struct indexed_access<Segment, min_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Segment const& b) \
|
static inline ct get(Segment const& b) \
|
||||||
{ return geometry::get<D>(b. Index0); } \
|
{ return geometry::get<D>(b. Index0); } \
|
||||||
static inline void set(Segment& b, ct const& value) \
|
static inline void set(Segment& b, ct const& value) \
|
||||||
@ -32,7 +32,7 @@ struct indexed_access<Segment, min_corner, D> \
|
|||||||
template <size_t D> \
|
template <size_t D> \
|
||||||
struct indexed_access<Segment, max_corner, D> \
|
struct indexed_access<Segment, max_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Segment const& b) \
|
static inline ct get(Segment const& b) \
|
||||||
{ return geometry::get<D>(b. Index1); } \
|
{ return geometry::get<D>(b. Index1); } \
|
||||||
static inline void set(Segment& b, ct const& value) \
|
static inline void set(Segment& b, ct const& value) \
|
||||||
@ -44,7 +44,7 @@ struct indexed_access<Segment, max_corner, D> \
|
|||||||
template <typename P, size_t D> \
|
template <typename P, size_t D> \
|
||||||
struct indexed_access<Segment<P>, min_corner, D> \
|
struct indexed_access<Segment<P>, min_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<P>::type ct; \
|
using ct = coordinate_type_t<P>; \
|
||||||
static inline ct get(Segment<P> const& b) \
|
static inline ct get(Segment<P> const& b) \
|
||||||
{ return geometry::get<D>(b. Index0); } \
|
{ return geometry::get<D>(b. Index0); } \
|
||||||
static inline void set(Segment<P>& b, ct const& value) \
|
static inline void set(Segment<P>& b, ct const& value) \
|
||||||
@ -53,7 +53,7 @@ struct indexed_access<Segment<P>, min_corner, D> \
|
|||||||
template <typename P, size_t D> \
|
template <typename P, size_t D> \
|
||||||
struct indexed_access<Segment<P>, max_corner, D> \
|
struct indexed_access<Segment<P>, max_corner, D> \
|
||||||
{ \
|
{ \
|
||||||
typedef typename coordinate_type<P>::type ct; \
|
using ct = coordinate_type_t<P>; \
|
||||||
static inline ct get(Segment<P> const& b) \
|
static inline ct get(Segment<P> const& b) \
|
||||||
{ return geometry::get<D>(b. Index1); } \
|
{ return geometry::get<D>(b. Index1); } \
|
||||||
static inline void set(Segment<P>& b, ct const& value) \
|
static inline void set(Segment<P>& b, ct const& value) \
|
||||||
@ -64,25 +64,25 @@ struct indexed_access<Segment<P>, max_corner, D> \
|
|||||||
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_SEGMENT_ACCESS_4VALUES(Segment, Point, Left, Bottom, Right, Top) \
|
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_SEGMENT_ACCESS_4VALUES(Segment, Point, Left, Bottom, Right, Top) \
|
||||||
template <> struct indexed_access<Segment, min_corner, 0> \
|
template <> struct indexed_access<Segment, min_corner, 0> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Segment const& b) { return b. Left; } \
|
static inline ct get(Segment const& b) { return b. Left; } \
|
||||||
static inline void set(Segment& b, ct const& value) { b. Left = value; } \
|
static inline void set(Segment& b, ct const& value) { b. Left = value; } \
|
||||||
}; \
|
}; \
|
||||||
template <> struct indexed_access<Segment, min_corner, 1> \
|
template <> struct indexed_access<Segment, min_corner, 1> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Segment const& b) { return b. Bottom; } \
|
static inline ct get(Segment const& b) { return b. Bottom; } \
|
||||||
static inline void set(Segment& b, ct const& value) { b. Bottom = value; } \
|
static inline void set(Segment& b, ct const& value) { b. Bottom = value; } \
|
||||||
}; \
|
}; \
|
||||||
template <> struct indexed_access<Segment, max_corner, 0> \
|
template <> struct indexed_access<Segment, max_corner, 0> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Segment const& b) { return b. Right; } \
|
static inline ct get(Segment const& b) { return b. Right; } \
|
||||||
static inline void set(Segment& b, ct const& value) { b. Right = value; } \
|
static inline void set(Segment& b, ct const& value) { b. Right = value; } \
|
||||||
}; \
|
}; \
|
||||||
template <> struct indexed_access<Segment, max_corner, 1> \
|
template <> struct indexed_access<Segment, max_corner, 1> \
|
||||||
{ \
|
{ \
|
||||||
typedef coordinate_type<Point>::type ct; \
|
using ct = coordinate_type_t<Point>; \
|
||||||
static inline ct get(Segment const& b) { return b. Top; } \
|
static inline ct get(Segment const& b) { return b. Top; } \
|
||||||
static inline void set(Segment& b, ct const& value) { b. Top = value; } \
|
static inline void set(Segment& b, ct const& value) { b. Top = value; } \
|
||||||
};
|
};
|
||||||
|
@ -137,7 +137,7 @@ template <typename Point, std::size_t Dimension>
|
|||||||
struct indexed_access<model::segment<Point>, 0, Dimension>
|
struct indexed_access<model::segment<Point>, 0, Dimension>
|
||||||
{
|
{
|
||||||
typedef model::segment<Point> segment_type;
|
typedef model::segment<Point> segment_type;
|
||||||
typedef typename geometry::coordinate_type<segment_type>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<segment_type>;
|
||||||
|
|
||||||
static constexpr coordinate_type get(segment_type const& s)
|
static constexpr coordinate_type get(segment_type const& s)
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ template <typename Point, std::size_t Dimension>
|
|||||||
struct indexed_access<model::segment<Point>, 1, Dimension>
|
struct indexed_access<model::segment<Point>, 1, Dimension>
|
||||||
{
|
{
|
||||||
typedef model::segment<Point> segment_type;
|
typedef model::segment<Point> segment_type;
|
||||||
typedef typename geometry::coordinate_type<segment_type>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<segment_type>;
|
||||||
|
|
||||||
static constexpr coordinate_type get(segment_type const& s)
|
static constexpr coordinate_type get(segment_type const& s)
|
||||||
{
|
{
|
||||||
@ -200,7 +200,7 @@ template <typename ConstOrNonConstPoint, std::size_t Dimension>
|
|||||||
struct indexed_access<model::referring_segment<ConstOrNonConstPoint>, 0, Dimension>
|
struct indexed_access<model::referring_segment<ConstOrNonConstPoint>, 0, Dimension>
|
||||||
{
|
{
|
||||||
typedef model::referring_segment<ConstOrNonConstPoint> segment_type;
|
typedef model::referring_segment<ConstOrNonConstPoint> segment_type;
|
||||||
typedef typename geometry::coordinate_type<segment_type>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<segment_type>;
|
||||||
|
|
||||||
static inline coordinate_type get(segment_type const& s)
|
static inline coordinate_type get(segment_type const& s)
|
||||||
{
|
{
|
||||||
@ -218,7 +218,7 @@ template <typename ConstOrNonConstPoint, std::size_t Dimension>
|
|||||||
struct indexed_access<model::referring_segment<ConstOrNonConstPoint>, 1, Dimension>
|
struct indexed_access<model::referring_segment<ConstOrNonConstPoint>, 1, Dimension>
|
||||||
{
|
{
|
||||||
typedef model::referring_segment<ConstOrNonConstPoint> segment_type;
|
typedef model::referring_segment<ConstOrNonConstPoint> segment_type;
|
||||||
typedef typename geometry::coordinate_type<segment_type>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<segment_type>;
|
||||||
|
|
||||||
static inline coordinate_type get(segment_type const& s)
|
static inline coordinate_type get(segment_type const& s)
|
||||||
{
|
{
|
||||||
|
@ -49,8 +49,8 @@ struct sum_for_indexable_dimension<Point, BoxIndexable, box_tag, comparable_dist
|
|||||||
|
|
||||||
inline static result_type apply(Point const& pt, BoxIndexable const& i)
|
inline static result_type apply(Point const& pt, BoxIndexable const& i)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type point_coord_t;
|
using point_coord_t = coordinate_type_t<Point>;
|
||||||
typedef typename coordinate_type<BoxIndexable>::type indexable_coord_t;
|
using indexable_coord_t = coordinate_type_t<BoxIndexable>;
|
||||||
|
|
||||||
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
||||||
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
||||||
|
@ -37,8 +37,8 @@ struct sum_for_indexable_dimension<Point, BoxIndexable, box_tag, comparable_dist
|
|||||||
|
|
||||||
inline static result_type apply(Point const& pt, BoxIndexable const& i)
|
inline static result_type apply(Point const& pt, BoxIndexable const& i)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type point_coord_t;
|
using point_coord_t = coordinate_type_t<Point>;
|
||||||
typedef typename coordinate_type<BoxIndexable>::type indexable_coord_t;
|
using indexable_coord_t = coordinate_type<BoxIndexable>;
|
||||||
|
|
||||||
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
||||||
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
||||||
|
@ -44,12 +44,12 @@ template <
|
|||||||
size_t DimensionIndex>
|
size_t DimensionIndex>
|
||||||
struct sum_for_indexable_dimension<Point, BoxIndexable, box_tag, comparable_distance_near_tag, DimensionIndex>
|
struct sum_for_indexable_dimension<Point, BoxIndexable, box_tag, comparable_distance_near_tag, DimensionIndex>
|
||||||
{
|
{
|
||||||
typedef typename geometry::default_comparable_distance_result<Point, BoxIndexable>::type result_type;
|
using result_type = typename geometry::default_comparable_distance_result<Point, BoxIndexable>::type;
|
||||||
|
|
||||||
inline static result_type apply(Point const& pt, BoxIndexable const& i)
|
inline static result_type apply(Point const& pt, BoxIndexable const& i)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type point_coord_t;
|
using point_coord_t = coordinate_type_t<Point>;
|
||||||
typedef typename coordinate_type<BoxIndexable>::type indexable_coord_t;
|
using indexable_coord_t = coordinate_type_t<BoxIndexable>;
|
||||||
|
|
||||||
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
||||||
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
||||||
|
@ -34,7 +34,7 @@ struct default_margin_result
|
|||||||
{
|
{
|
||||||
using type = typename select_most_precise
|
using type = typename select_most_precise
|
||||||
<
|
<
|
||||||
typename coordinate_type<Box>::type,
|
coordinate_type_t<Box>,
|
||||||
double
|
double
|
||||||
>::type;
|
>::type;
|
||||||
};
|
};
|
||||||
|
@ -34,12 +34,12 @@ template <
|
|||||||
size_t DimensionIndex>
|
size_t DimensionIndex>
|
||||||
struct smallest_for_indexable_dimension<Point, BoxIndexable, box_tag, minmaxdist_tag, DimensionIndex>
|
struct smallest_for_indexable_dimension<Point, BoxIndexable, box_tag, minmaxdist_tag, DimensionIndex>
|
||||||
{
|
{
|
||||||
typedef typename geometry::default_comparable_distance_result<Point, BoxIndexable>::type result_type;
|
using result_type = typename geometry::default_comparable_distance_result<Point, BoxIndexable>::type;
|
||||||
|
|
||||||
inline static result_type apply(Point const& pt, BoxIndexable const& i, result_type const& maxd)
|
inline static result_type apply(Point const& pt, BoxIndexable const& i, result_type const& maxd)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type point_coord_t;
|
using point_coord_t = coordinate_type_t<Point>;
|
||||||
typedef typename coordinate_type<BoxIndexable>::type indexable_coord_t;
|
using indexable_coord_t = coordinate_type_t<BoxIndexable>;
|
||||||
|
|
||||||
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
|
||||||
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
|
||||||
|
@ -32,7 +32,7 @@ namespace boost { namespace geometry { namespace index { namespace detail {
|
|||||||
// typedef typename select_most_precise<
|
// typedef typename select_most_precise<
|
||||||
// typename select_most_precise<
|
// typename select_most_precise<
|
||||||
// typename coordinate_type<Indexable>::type,
|
// typename coordinate_type<Indexable>::type,
|
||||||
// typename coordinate_type<Point>::type
|
// coordinate_type_t<Point>
|
||||||
// >::type,
|
// >::type,
|
||||||
// float // TODO - use bigger type, calculated from the size of coordinate types
|
// float // TODO - use bigger type, calculated from the size of coordinate types
|
||||||
// >::type type;
|
// >::type type;
|
||||||
|
@ -66,7 +66,7 @@ template <typename Segment, typename Box, typename Strategy>
|
|||||||
struct bounded_view_base<Segment, Box, Strategy, segment_tag, box_tag, cartesian_tag>
|
struct bounded_view_base<Segment, Box, Strategy, segment_tag, box_tag, cartesian_tag>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename geometry::coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Box>;
|
||||||
|
|
||||||
bounded_view_base(Segment const& segment, Strategy const& )
|
bounded_view_base(Segment const& segment, Strategy const& )
|
||||||
: m_segment(segment)
|
: m_segment(segment)
|
||||||
@ -95,7 +95,7 @@ private:
|
|||||||
template <typename Segment, typename Box, typename Strategy, typename CSTag>
|
template <typename Segment, typename Box, typename Strategy, typename CSTag>
|
||||||
struct bounded_view_base<Segment, Box, Strategy, segment_tag, box_tag, CSTag>
|
struct bounded_view_base<Segment, Box, Strategy, segment_tag, box_tag, CSTag>
|
||||||
{
|
{
|
||||||
typedef typename geometry::coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Box>;
|
||||||
|
|
||||||
bounded_view_base(Segment const& segment, Strategy const& strategy)
|
bounded_view_base(Segment const& segment, Strategy const& strategy)
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@ template <typename BoxIn, typename Box, typename Strategy, typename CSTag>
|
|||||||
struct bounded_view_base<BoxIn, Box, Strategy, box_tag, box_tag, CSTag>
|
struct bounded_view_base<BoxIn, Box, Strategy, box_tag, box_tag, CSTag>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename geometry::coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Box>;
|
||||||
|
|
||||||
bounded_view_base(BoxIn const& box, Strategy const& )
|
bounded_view_base(BoxIn const& box, Strategy const& )
|
||||||
: m_box(box)
|
: m_box(box)
|
||||||
@ -154,7 +154,7 @@ template <typename Point, typename Box, typename Strategy, typename CSTag>
|
|||||||
struct bounded_view_base<Point, Box, Strategy, point_tag, box_tag, CSTag>
|
struct bounded_view_base<Point, Box, Strategy, point_tag, box_tag, CSTag>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename geometry::coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Box>;
|
||||||
|
|
||||||
bounded_view_base(Point const& point, Strategy const& )
|
bounded_view_base(Point const& point, Strategy const& )
|
||||||
: m_point(point)
|
: m_point(point)
|
||||||
@ -249,7 +249,7 @@ struct indexed_access<index::detail::bounded_view<Geometry, Box, Strategy, Tag,
|
|||||||
min_corner, Dimension>
|
min_corner, Dimension>
|
||||||
{
|
{
|
||||||
typedef index::detail::bounded_view<Geometry, Box, Strategy, Tag, box_tag> box_type;
|
typedef index::detail::bounded_view<Geometry, Box, Strategy, Tag, box_tag> box_type;
|
||||||
typedef typename geometry::coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Box>;
|
||||||
|
|
||||||
static inline coordinate_type get(box_type const& b)
|
static inline coordinate_type get(box_type const& b)
|
||||||
{
|
{
|
||||||
@ -267,7 +267,7 @@ struct indexed_access<index::detail::bounded_view<Geometry, Box, Strategy, Tag,
|
|||||||
max_corner, Dimension>
|
max_corner, Dimension>
|
||||||
{
|
{
|
||||||
typedef index::detail::bounded_view<Geometry, Box, Strategy, Tag, box_tag> box_type;
|
typedef index::detail::bounded_view<Geometry, Box, Strategy, Tag, box_tag> box_type;
|
||||||
typedef typename geometry::coordinate_type<Box>::type coordinate_type;
|
using coordinate_type = geometry::coordinate_type_t<Box>;
|
||||||
|
|
||||||
static inline coordinate_type get(box_type const& b)
|
static inline coordinate_type get(box_type const& b)
|
||||||
{
|
{
|
||||||
|
@ -42,10 +42,10 @@ struct biggest_edge
|
|||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT(0 < Dimension);
|
BOOST_STATIC_ASSERT(0 < Dimension);
|
||||||
template <typename Box>
|
template <typename Box>
|
||||||
static inline void apply(Box const& box, typename coordinate_type<Box>::type & length, std::size_t & dim_index)
|
static inline void apply(Box const& box, coordinate_type_t<Box> & length, std::size_t & dim_index)
|
||||||
{
|
{
|
||||||
biggest_edge<Dimension-1>::apply(box, length, dim_index);
|
biggest_edge<Dimension-1>::apply(box, length, dim_index);
|
||||||
typename coordinate_type<Box>::type curr
|
coordinate_type_t<Box> curr
|
||||||
= geometry::get<max_corner, Dimension-1>(box) - geometry::get<min_corner, Dimension-1>(box);
|
= geometry::get<max_corner, Dimension-1>(box) - geometry::get<min_corner, Dimension-1>(box);
|
||||||
if ( length < curr )
|
if ( length < curr )
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ template <>
|
|||||||
struct biggest_edge<1>
|
struct biggest_edge<1>
|
||||||
{
|
{
|
||||||
template <typename Box>
|
template <typename Box>
|
||||||
static inline void apply(Box const& box, typename coordinate_type<Box>::type & length, std::size_t & dim_index)
|
static inline void apply(Box const& box, coordinate_type_t<Box> & length, std::size_t & dim_index)
|
||||||
{
|
{
|
||||||
dim_index = 0;
|
dim_index = 0;
|
||||||
length = geometry::get<max_corner, 0>(box) - geometry::get<min_corner, 0>(box);
|
length = geometry::get<max_corner, 0>(box) - geometry::get<min_corner, 0>(box);
|
||||||
|
@ -39,10 +39,10 @@ struct gl_draw_point
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
struct gl_draw_point<Point, 2>
|
struct gl_draw_point<Point, 2>
|
||||||
{
|
{
|
||||||
static inline void apply(Point const& p, typename coordinate_type<Point>::type z)
|
static inline void apply(Point const& p, coordinate_type_t<Point> z)
|
||||||
{
|
{
|
||||||
typename coordinate_type<Point>::type const& x = geometry::get<0>(p);
|
coordinate_type_t<Point> const& x = geometry::get<0>(p);
|
||||||
typename coordinate_type<Point>::type const& y = geometry::get<1>(p);
|
coordinate_type_t<Point> const& y = geometry::get<1>(p);
|
||||||
/*glBegin(GL_POINT);
|
/*glBegin(GL_POINT);
|
||||||
glVertex3f(x, y, z);
|
glVertex3f(x, y, z);
|
||||||
glEnd();*/
|
glEnd();*/
|
||||||
@ -62,7 +62,7 @@ struct gl_draw_box
|
|||||||
template <typename Box>
|
template <typename Box>
|
||||||
struct gl_draw_box<Box, 2>
|
struct gl_draw_box<Box, 2>
|
||||||
{
|
{
|
||||||
static inline void apply(Box const& b, typename coordinate_type<Box>::type z)
|
static inline void apply(Box const& b, coordinate_type_t<Box> z)
|
||||||
{
|
{
|
||||||
glBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
glVertex3f(geometry::get<min_corner, 0>(b), geometry::get<min_corner, 1>(b), z);
|
glVertex3f(geometry::get<min_corner, 0>(b), geometry::get<min_corner, 1>(b), z);
|
||||||
@ -80,7 +80,7 @@ struct gl_draw_segment
|
|||||||
template <typename Segment>
|
template <typename Segment>
|
||||||
struct gl_draw_segment<Segment, 2>
|
struct gl_draw_segment<Segment, 2>
|
||||||
{
|
{
|
||||||
static inline void apply(Segment const& s, typename coordinate_type<Segment>::type z)
|
static inline void apply(Segment const& s, coordinate_type_t<Segment> z)
|
||||||
{
|
{
|
||||||
glBegin(GL_LINES);
|
glBegin(GL_LINES);
|
||||||
glVertex3f(geometry::get<0, 0>(s), geometry::get<0, 1>(s), z);
|
glVertex3f(geometry::get<0, 0>(s), geometry::get<0, 1>(s), z);
|
||||||
@ -115,7 +115,7 @@ struct gl_draw_indexable<Segment, segment_tag>
|
|||||||
} // namespace dispatch
|
} // namespace dispatch
|
||||||
|
|
||||||
template <typename Indexable> inline
|
template <typename Indexable> inline
|
||||||
void gl_draw_indexable(Indexable const& i, typename coordinate_type<Indexable>::type z)
|
void gl_draw_indexable(Indexable const& i, coordinate_type_t<Indexable> z)
|
||||||
{
|
{
|
||||||
dispatch::gl_draw_indexable<
|
dispatch::gl_draw_indexable<
|
||||||
Indexable,
|
Indexable,
|
||||||
@ -142,7 +142,7 @@ struct gl_draw
|
|||||||
inline gl_draw(translator_type const& t,
|
inline gl_draw(translator_type const& t,
|
||||||
size_t level_first = 0,
|
size_t level_first = 0,
|
||||||
size_t level_last = (std::numeric_limits<size_t>::max)(),
|
size_t level_last = (std::numeric_limits<size_t>::max)(),
|
||||||
typename coordinate_type<box_type>::type z_coord_level_multiplier = 1
|
coordinate_type_t<box_type> z_coord_level_multiplier = 1
|
||||||
)
|
)
|
||||||
: tr(t)
|
: tr(t)
|
||||||
, level_f(level_first)
|
, level_f(level_first)
|
||||||
@ -219,7 +219,7 @@ struct gl_draw
|
|||||||
translator_type const& tr;
|
translator_type const& tr;
|
||||||
size_t level_f;
|
size_t level_f;
|
||||||
size_t level_l;
|
size_t level_l;
|
||||||
typename coordinate_type<box_type>::type z_mul;
|
coordinate_type_t<box_type> z_mul;
|
||||||
|
|
||||||
size_t level;
|
size_t level;
|
||||||
};
|
};
|
||||||
@ -230,9 +230,7 @@ template <typename Rtree> inline
|
|||||||
void gl_draw(Rtree const& tree,
|
void gl_draw(Rtree const& tree,
|
||||||
size_t level_first = 0,
|
size_t level_first = 0,
|
||||||
size_t level_last = (std::numeric_limits<size_t>::max)(),
|
size_t level_last = (std::numeric_limits<size_t>::max)(),
|
||||||
typename coordinate_type<
|
coordinate_type_t<typename Rtree::bounds_type> z_coord_level_multiplier = 1
|
||||||
typename Rtree::bounds_type
|
|
||||||
>::type z_coord_level_multiplier = 1
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typedef utilities::view<Rtree> RTV;
|
typedef utilities::view<Rtree> RTV;
|
||||||
|
@ -252,7 +252,7 @@ struct serialize_point
|
|||||||
template <typename Archive>
|
template <typename Archive>
|
||||||
static inline void save(Archive & ar, P const& p, unsigned int version)
|
static inline void save(Archive & ar, P const& p, unsigned int version)
|
||||||
{
|
{
|
||||||
typename coordinate_type<P>::type c = get<I>(p);
|
coordinate_type_t<P> c = get<I>(p);
|
||||||
ar << boost::serialization::make_nvp("c", c);
|
ar << boost::serialization::make_nvp("c", c);
|
||||||
serialize_point<P, I+1, D>::save(ar, p, version);
|
serialize_point<P, I+1, D>::save(ar, p, version);
|
||||||
}
|
}
|
||||||
@ -260,7 +260,7 @@ struct serialize_point
|
|||||||
template <typename Archive>
|
template <typename Archive>
|
||||||
static inline void load(Archive & ar, P & p, unsigned int version)
|
static inline void load(Archive & ar, P & p, unsigned int version)
|
||||||
{
|
{
|
||||||
typename geometry::coordinate_type<P>::type c;
|
geometry::coordinate_type_t<P> c;
|
||||||
ar >> boost::serialization::make_nvp("c", c);
|
ar >> boost::serialization::make_nvp("c", c);
|
||||||
set<I>(p, c);
|
set<I>(p, c);
|
||||||
serialize_point<P, I+1, D>::load(ar, p, version);
|
serialize_point<P, I+1, D>::load(ar, p, version);
|
||||||
|
@ -193,7 +193,7 @@ public:
|
|||||||
/*! \brief The Box type used by the R-tree. */
|
/*! \brief The Box type used by the R-tree. */
|
||||||
typedef geometry::model::box<
|
typedef geometry::model::box<
|
||||||
geometry::model::point<
|
geometry::model::point<
|
||||||
typename coordinate_type<indexable_type>::type,
|
coordinate_type_t<indexable_type>,
|
||||||
dimension<indexable_type>::value,
|
dimension<indexable_type>::value,
|
||||||
typename coordinate_system<indexable_type>::type
|
typename coordinate_system<indexable_type>::type
|
||||||
>
|
>
|
||||||
|
@ -270,7 +270,7 @@ class svg_mapper : boost::noncopyable
|
|||||||
|
|
||||||
typedef typename geometry::select_most_precise
|
typedef typename geometry::select_most_precise
|
||||||
<
|
<
|
||||||
typename coordinate_type<Point>::type,
|
coordinate_type_t<Point>,
|
||||||
double
|
double
|
||||||
>::type calculation_type;
|
>::type calculation_type;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ struct svg_box
|
|||||||
// Prevent invisible boxes, making them >=1, using "max"
|
// Prevent invisible boxes, making them >=1, using "max"
|
||||||
BOOST_USING_STD_MAX();
|
BOOST_USING_STD_MAX();
|
||||||
|
|
||||||
typedef typename coordinate_type<Box>::type ct;
|
using ct = coordinate_type_t<Box>;
|
||||||
ct x = geometry::get<geometry::min_corner, 0>(box);
|
ct x = geometry::get<geometry::min_corner, 0>(box);
|
||||||
ct y = geometry::get<geometry::min_corner, 1>(box);
|
ct y = geometry::get<geometry::min_corner, 1>(box);
|
||||||
ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1),
|
ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1),
|
||||||
@ -92,11 +92,11 @@ struct svg_segment
|
|||||||
static inline void apply(std::basic_ostream<Char, Traits>& os,
|
static inline void apply(std::basic_ostream<Char, Traits>& os,
|
||||||
Segment const& segment, std::string const& style, double)
|
Segment const& segment, std::string const& style, double)
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Segment>::type ct;
|
using ct = coordinate_type_t<Segment>;
|
||||||
ct x1 = geometry::get<0, 0>(segment);
|
ct const x1 = geometry::get<0, 0>(segment);
|
||||||
ct y1 = geometry::get<0, 1>(segment);
|
ct const y1 = geometry::get<0, 1>(segment);
|
||||||
ct x2 = geometry::get<1, 0>(segment);
|
ct const x2 = geometry::get<1, 0>(segment);
|
||||||
ct y2 = geometry::get<1, 1>(segment);
|
ct const y2 = geometry::get<1, 1>(segment);
|
||||||
|
|
||||||
os << "<line x1=\"" << x1 << "\" y1=\"" << y1
|
os << "<line x1=\"" << x1 << "\" y1=\"" << y1
|
||||||
<< "\" x2=\"" << x2 << "\" y2=\"" << y2
|
<< "\" x2=\"" << x2 << "\" y2=\"" << y2
|
||||||
|
@ -132,7 +132,7 @@ struct parsing_assigner
|
|||||||
Point& point,
|
Point& point,
|
||||||
std::string const& wkt)
|
std::string const& wkt)
|
||||||
{
|
{
|
||||||
using coordinate_type = typename coordinate_type<Point>::type;
|
using coordinate_type = coordinate_type_t<Point>;
|
||||||
|
|
||||||
// Stop at end of tokens, or at "," ot ")"
|
// Stop at end of tokens, or at "," ot ")"
|
||||||
bool finished = (it == end || *it == "," || *it == ")");
|
bool finished = (it == end || *it == "," || *it == ")");
|
||||||
@ -263,7 +263,7 @@ template <typename Geometry,
|
|||||||
struct stateful_range_appender
|
struct stateful_range_appender
|
||||||
{
|
{
|
||||||
// NOTE: Geometry is a reference
|
// NOTE: Geometry is a reference
|
||||||
inline void append(Geometry geom, typename geometry::point_type<Geometry>::type const& point, bool)
|
inline void append(Geometry geom, geometry::point_type_t<Geometry> const& point, bool)
|
||||||
{
|
{
|
||||||
geometry::append(geom, point);
|
geometry::append(geom, point);
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ struct stateful_range_appender
|
|||||||
template <typename Geometry>
|
template <typename Geometry>
|
||||||
struct stateful_range_appender<Geometry, open>
|
struct stateful_range_appender<Geometry, open>
|
||||||
{
|
{
|
||||||
using point_type = typename geometry::point_type<Geometry>::type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
using size_type = typename boost::range_size
|
using size_type = typename boost::range_size
|
||||||
<
|
<
|
||||||
typename util::remove_cptrref<Geometry>::type
|
typename util::remove_cptrref<Geometry>::type
|
||||||
@ -329,7 +329,7 @@ private:
|
|||||||
template <typename Geometry>
|
template <typename Geometry>
|
||||||
struct container_appender
|
struct container_appender
|
||||||
{
|
{
|
||||||
using point_type = typename geometry::point_type<Geometry>::type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
|
|
||||||
template <typename TokenizerIterator>
|
template <typename TokenizerIterator>
|
||||||
static inline void apply(TokenizerIterator& it,
|
static inline void apply(TokenizerIterator& it,
|
||||||
|
@ -32,8 +32,8 @@ struct value_type
|
|||||||
typedef std::conditional_t
|
typedef std::conditional_t
|
||||||
<
|
<
|
||||||
! std::is_const<Geometry>::value,
|
! std::is_const<Geometry>::value,
|
||||||
typename geometry::point_type<Geometry>::type,
|
geometry::point_type_t<Geometry>,
|
||||||
typename geometry::point_type<Geometry>::type const
|
geometry::point_type_t<Geometry> const
|
||||||
> type;
|
> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ private :
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
struct segment_ratio_type
|
struct segment_ratio_type
|
||||||
{
|
{
|
||||||
using type = segment_ratio<typename geometry::coordinate_type<Point>::type>;
|
using type = segment_ratio<geometry::coordinate_type_t<Point>>;
|
||||||
};
|
};
|
||||||
|
|
||||||
}} // namespace boost::geometry
|
}} // namespace boost::geometry
|
||||||
|
@ -75,7 +75,7 @@ template
|
|||||||
>
|
>
|
||||||
struct z_access
|
struct z_access
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type type;
|
using type = coordinate_type_t<Point>;
|
||||||
static inline type get(Point const& point)
|
static inline type get(Point const& point)
|
||||||
{
|
{
|
||||||
return geometry::get<2>(point);
|
return geometry::get<2>(point);
|
||||||
@ -89,7 +89,7 @@ struct z_access
|
|||||||
template <typename Point>
|
template <typename Point>
|
||||||
struct z_access<Point, false>
|
struct z_access<Point, false>
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type type;
|
using type = coordinate_type_t<Point>;
|
||||||
static inline type get(Point const& )
|
static inline type get(Point const& )
|
||||||
{
|
{
|
||||||
return type(0);
|
return type(0);
|
||||||
@ -119,9 +119,9 @@ template
|
|||||||
>
|
>
|
||||||
struct range_wrapper
|
struct range_wrapper
|
||||||
{
|
{
|
||||||
typedef Range range_type;
|
using range_type = Range;
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename coordinate_type<point_type>::type coord_t;
|
using coord_t = coordinate_type_t<point_type>;
|
||||||
|
|
||||||
range_wrapper(Range & range)
|
range_wrapper(Range & range)
|
||||||
: m_range(range)
|
: m_range(range)
|
||||||
@ -139,9 +139,9 @@ private:
|
|||||||
template <typename Range>
|
template <typename Range>
|
||||||
struct range_wrapper<Range, true>
|
struct range_wrapper<Range, true>
|
||||||
{
|
{
|
||||||
typedef Range range_type;
|
using range_type = Range;
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename coordinate_type<point_type>::type coord_t;
|
using coord_t = coordinate_type_t<point_type>;
|
||||||
|
|
||||||
range_wrapper(Range & range)
|
range_wrapper(Range & range)
|
||||||
: m_range(range)
|
: m_range(range)
|
||||||
@ -237,8 +237,8 @@ inline bool pj_transform(SrcPrj const& srcprj, Par const& srcdefn,
|
|||||||
Grids const& dstgrids)
|
Grids const& dstgrids)
|
||||||
|
|
||||||
{
|
{
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename coordinate_type<point_type>::type coord_t;
|
using coord_t = coordinate_type_t<point_type>;
|
||||||
static const std::size_t dimension = geometry::dimension<point_type>::value;
|
static const std::size_t dimension = geometry::dimension<point_type>::value;
|
||||||
std::size_t point_count = boost::size(range);
|
std::size_t point_count = boost::size(range);
|
||||||
bool result = true;
|
bool result = true;
|
||||||
@ -616,9 +616,7 @@ inline int pj_geodetic_to_geocentric( T const& a, T const& es,
|
|||||||
range_wrapper<Range, AddZ> & range_wrapper )
|
range_wrapper<Range, AddZ> & range_wrapper )
|
||||||
|
|
||||||
{
|
{
|
||||||
//typedef typename boost::range_iterator<Range>::type iterator;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
|
||||||
//typedef typename coordinate_type<point_type>::type coord_t;
|
|
||||||
|
|
||||||
Range & rng = range_wrapper.get_range();
|
Range & rng = range_wrapper.get_range();
|
||||||
std::size_t point_count = boost::size(rng);
|
std::size_t point_count = boost::size(rng);
|
||||||
@ -671,9 +669,7 @@ inline int pj_geocentric_to_geodetic( T const& a, T const& es,
|
|||||||
range_wrapper<Range, AddZ> & range_wrapper )
|
range_wrapper<Range, AddZ> & range_wrapper )
|
||||||
|
|
||||||
{
|
{
|
||||||
//typedef typename boost::range_iterator<Range>::type iterator;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
|
||||||
//typedef typename coordinate_type<point_type>::type coord_t;
|
|
||||||
|
|
||||||
Range & rng = range_wrapper.get_range();
|
Range & rng = range_wrapper.get_range();
|
||||||
std::size_t point_count = boost::size(rng);
|
std::size_t point_count = boost::size(rng);
|
||||||
@ -762,20 +758,22 @@ inline int pj_geocentric_to_wgs84( Par const& defn,
|
|||||||
range_wrapper<Range, AddZ> & range_wrapper )
|
range_wrapper<Range, AddZ> & range_wrapper )
|
||||||
|
|
||||||
{
|
{
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename coordinate_type<point_type>::type coord_t;
|
using coord_t = coordinate_type_t<point_type>;
|
||||||
|
|
||||||
Range & rng = range_wrapper.get_range();
|
Range& rng = range_wrapper.get_range();
|
||||||
std::size_t point_count = boost::size(rng);
|
std::size_t point_count = boost::size(rng);
|
||||||
|
|
||||||
if( defn.datum_type == datum_3param )
|
if (defn.datum_type == datum_3param)
|
||||||
{
|
{
|
||||||
for(std::size_t i = 0; i < point_count; i++ )
|
for (std::size_t i = 0; i < point_count; i++ )
|
||||||
{
|
{
|
||||||
point_type & point = range::at(rng, i);
|
point_type& point = range::at(rng, i);
|
||||||
|
|
||||||
if( is_invalid_point(point) )
|
if (is_invalid_point(point))
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
set<0>(point, get<0>(point) + Dx_BF(defn));
|
set<0>(point, get<0>(point) + Dx_BF(defn));
|
||||||
set<1>(point, get<1>(point) + Dy_BF(defn));
|
set<1>(point, get<1>(point) + Dy_BF(defn));
|
||||||
@ -819,20 +817,22 @@ inline int pj_geocentric_from_wgs84( Par const& defn,
|
|||||||
range_wrapper<Range, AddZ> & range_wrapper )
|
range_wrapper<Range, AddZ> & range_wrapper )
|
||||||
|
|
||||||
{
|
{
|
||||||
typedef typename boost::range_value<Range>::type point_type;
|
using point_type = typename boost::range_value<Range>::type;
|
||||||
typedef typename coordinate_type<point_type>::type coord_t;
|
using coord_t = coordinate_type_t<point_type>;
|
||||||
|
|
||||||
Range & rng = range_wrapper.get_range();
|
Range& rng = range_wrapper.get_range();
|
||||||
std::size_t point_count = boost::size(rng);
|
std::size_t point_count = boost::size(rng);
|
||||||
|
|
||||||
if( defn.datum_type == datum_3param )
|
if (defn.datum_type == datum_3param)
|
||||||
{
|
{
|
||||||
for(std::size_t i = 0; i < point_count; i++ )
|
for (std::size_t i = 0; i < point_count; i++ )
|
||||||
{
|
{
|
||||||
point_type & point = range::at(rng, i);
|
point_type& point = range::at(rng, i);
|
||||||
|
|
||||||
if( is_invalid_point(point) )
|
if (is_invalid_point(point))
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
set<0>(point, get<0>(point) - Dx_BF(defn));
|
set<0>(point, get<0>(point) - Dx_BF(defn));
|
||||||
set<1>(point, get<1>(point) - Dy_BF(defn));
|
set<1>(point, get<1>(point) - Dy_BF(defn));
|
||||||
|
@ -93,18 +93,18 @@ struct transform_geometry_point_coordinates<PtIn, PtOut, false>
|
|||||||
template <typename Geometry, typename CT>
|
template <typename Geometry, typename CT>
|
||||||
struct transform_geometry_point
|
struct transform_geometry_point
|
||||||
{
|
{
|
||||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
using point_type = geometry::point_type_t<Geometry>;
|
||||||
|
|
||||||
typedef geometry::model::point
|
using type = geometry::model::point
|
||||||
<
|
<
|
||||||
typename select_most_precise
|
typename select_most_precise
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<point_type>::type,
|
geometry::coordinate_type_t<point_type>,
|
||||||
CT
|
CT
|
||||||
>::type,
|
>::type,
|
||||||
geometry::dimension<point_type>::type::value,
|
geometry::dimension<point_type>::type::value,
|
||||||
typename geometry::coordinate_system<point_type>::type
|
typename geometry::coordinate_system<point_type>::type
|
||||||
> type;
|
>;
|
||||||
|
|
||||||
template <typename PtIn, typename PtOut>
|
template <typename PtIn, typename PtOut>
|
||||||
static inline void apply(PtIn const& in, PtOut & out, bool enable_angles)
|
static inline void apply(PtIn const& in, PtOut & out, bool enable_angles)
|
||||||
@ -229,10 +229,10 @@ template
|
|||||||
<
|
<
|
||||||
typename select_most_precise
|
typename select_most_precise
|
||||||
<
|
<
|
||||||
typename geometry::coordinate_type<OutGeometry>::type,
|
geometry::coordinate_type_t<OutGeometry>,
|
||||||
CT
|
CT
|
||||||
>::type,
|
>::type,
|
||||||
typename geometry::coordinate_type<OutGeometry>::type
|
geometry::coordinate_type_t<OutGeometry>
|
||||||
>::value
|
>::value
|
||||||
>
|
>
|
||||||
struct transform_geometry_wrapper
|
struct transform_geometry_wrapper
|
||||||
|
@ -118,13 +118,12 @@ public :
|
|||||||
RangeOut& range_out) const
|
RangeOut& range_out) const
|
||||||
{
|
{
|
||||||
boost::ignore_unused(perp_left_point);
|
boost::ignore_unused(perp_left_point);
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
|
||||||
|
|
||||||
typedef typename geometry::select_most_precise
|
using promoted_type = typename geometry::select_most_precise
|
||||||
<
|
<
|
||||||
coordinate_type,
|
coordinate_type_t<Point>,
|
||||||
double
|
double
|
||||||
>::type promoted_type;
|
>::type;
|
||||||
|
|
||||||
promoted_type const dist_left = distance.apply(penultimate_point, ultimate_point, buffer_side_left);
|
promoted_type const dist_left = distance.apply(penultimate_point, ultimate_point, buffer_side_left);
|
||||||
promoted_type const dist_right = distance.apply(penultimate_point, ultimate_point, buffer_side_right);
|
promoted_type const dist_right = distance.apply(penultimate_point, ultimate_point, buffer_side_right);
|
||||||
|
@ -77,12 +77,11 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
using promoted_type = typename geometry::select_most_precise
|
||||||
typedef typename geometry::select_most_precise
|
|
||||||
<
|
<
|
||||||
coordinate_type,
|
coordinate_type_t<Point>,
|
||||||
double
|
double
|
||||||
>::type promoted_type;
|
>::type;
|
||||||
|
|
||||||
Point p = ip;
|
Point p = ip;
|
||||||
|
|
||||||
|
@ -128,18 +128,12 @@ public :
|
|||||||
DistanceType const& buffer_distance,
|
DistanceType const& buffer_distance,
|
||||||
RangeOut& range_out) const
|
RangeOut& range_out) const
|
||||||
{
|
{
|
||||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
using promoted_type = typename geometry::select_most_precise
|
||||||
typedef typename boost::range_value<RangeOut>::type output_point_type;
|
|
||||||
|
|
||||||
typedef typename geometry::select_most_precise
|
|
||||||
<
|
<
|
||||||
typename geometry::select_most_precise
|
coordinate_type_t<Point>,
|
||||||
<
|
geometry::coordinate_type_t<typename boost::range_value<RangeOut>::type>,
|
||||||
coordinate_type,
|
|
||||||
typename geometry::coordinate_type<output_point_type>::type
|
|
||||||
>::type,
|
|
||||||
double
|
double
|
||||||
>::type promoted_type;
|
>::type;
|
||||||
|
|
||||||
geometry::equal_to<Point> equals;
|
geometry::equal_to<Point> equals;
|
||||||
if (equals(perp1, perp2))
|
if (equals(perp1, perp2))
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user