mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 15:14:02 +00:00
Merge branch 'develop'
This commit is contained in:
commit
cda019d3f4
@ -12,8 +12,8 @@ Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.co
|
||||
|
||||
Branch | Build | Coverage | Regression | Documentation
|
||||
------------|---------------|----------------|------------|--------------
|
||||
**develop** | [](https://circleci.com/gh/boostorg/geometry/tree/develop) <br> [](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=develop) <br> [](https://codecov.io/gh/boostorg/geometry/branch/develop) | [](http://www.boost.org/development/tests/develop/developer/geometry.html) [](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
|
||||
**master** | [](https://circleci.com/gh/boostorg/geometry/tree/master) <br> [](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=master) <br> [](https://codecov.io/gh/boostorg/geometry/branch/master) | [](http://www.boost.org/development/tests/master/developer/geometry.html) [](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
|
||||
**develop** | [](https://circleci.com/gh/boostorg/geometry/tree/develop) <br> [](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=develop) <br> [](https://codecov.io/gh/boostorg/geometry/branch/develop) | [](http://www.boost.org/development/tests/develop/developer/geometry.html) [](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
|
||||
**master** | [](https://circleci.com/gh/boostorg/geometry/tree/master) <br> [](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=master) <br> [](https://codecov.io/gh/boostorg/geometry/branch/master) | [](http://www.boost.org/development/tests/master/developer/geometry.html) [](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
|
||||
|
||||
### Directories
|
||||
|
||||
|
@ -72,11 +72,11 @@ template <typename Curr, typename Next>
|
||||
struct more_precise_coordinate_type
|
||||
: std::is_same
|
||||
<
|
||||
typename geometry::coordinate_type<Curr>::type,
|
||||
geometry::coordinate_type_t<Curr>,
|
||||
typename geometry::select_most_precise
|
||||
<
|
||||
typename geometry::coordinate_type<Curr>::type,
|
||||
typename geometry::coordinate_type<Next>::type
|
||||
geometry::coordinate_type_t<Curr>,
|
||||
geometry::coordinate_type_t<Next>
|
||||
>::type
|
||||
>
|
||||
{};
|
||||
|
@ -46,8 +46,8 @@ namespace dispatch
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename tag<Geometry1>::type,
|
||||
typename Tag2 = typename tag<Geometry2>::type
|
||||
typename Tag1 = tag_t<Geometry1>,
|
||||
typename Tag2 = tag_t<Geometry2>
|
||||
>
|
||||
struct azimuth : not_implemented<Tag1, Tag2>
|
||||
{};
|
||||
@ -58,11 +58,12 @@ struct azimuth<Point1, Point2, point_tag, point_tag>
|
||||
template <typename 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,
|
||||
typename coordinate_type<Point2>::type
|
||||
>::type calc_t;
|
||||
coordinate_type_t<Point1>,
|
||||
coordinate_type_t<Point2>
|
||||
>::type;
|
||||
|
||||
calc_t result = 0;
|
||||
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 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.
|
||||
// For now radians are always returned but a user could expect
|
||||
|
@ -381,11 +381,9 @@ struct convert<Box, Polygon, box_tag, polygon_tag, 2, false>
|
||||
{
|
||||
static inline void apply(Box const& box, Polygon& polygon)
|
||||
{
|
||||
typedef typename ring_type<Polygon>::type ring_type;
|
||||
|
||||
convert
|
||||
<
|
||||
Box, ring_type,
|
||||
Box, ring_type_t<Polygon>,
|
||||
box_tag, ring_tag,
|
||||
2, false
|
||||
>::apply(box, exterior_ring(polygon));
|
||||
@ -415,10 +413,9 @@ struct convert<Ring, Polygon, ring_tag, polygon_tag, DimensionCount, false>
|
||||
{
|
||||
static inline void apply(Ring const& ring, Polygon& polygon)
|
||||
{
|
||||
typedef typename ring_type<Polygon>::type ring_type;
|
||||
convert
|
||||
<
|
||||
Ring, ring_type,
|
||||
Ring, ring_type_t<Polygon>,
|
||||
ring_tag, ring_tag,
|
||||
DimensionCount, false
|
||||
>::apply(ring, exterior_ring(polygon));
|
||||
@ -431,11 +428,9 @@ struct convert<Polygon, Ring, polygon_tag, ring_tag, DimensionCount, false>
|
||||
{
|
||||
static inline void apply(Polygon const& polygon, Ring& ring)
|
||||
{
|
||||
typedef typename ring_type<Polygon>::type ring_type;
|
||||
|
||||
convert
|
||||
<
|
||||
ring_type, Ring,
|
||||
ring_type_t<Polygon>, Ring,
|
||||
ring_tag, ring_tag,
|
||||
DimensionCount, false
|
||||
>::apply(exterior_ring(polygon), ring);
|
||||
|
@ -48,8 +48,8 @@ template
|
||||
<
|
||||
typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename Tag1 = typename tag<Geometry1>::type,
|
||||
typename Tag2 = typename tag<Geometry2>::type
|
||||
typename Tag1 = tag_t<Geometry1>,
|
||||
typename Tag2 = tag_t<Geometry2>
|
||||
>
|
||||
struct crosses
|
||||
: detail::relate::relate_impl
|
||||
@ -215,8 +215,8 @@ namespace resolve_dynamic
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct crosses
|
||||
{
|
||||
|
@ -170,8 +170,8 @@ template
|
||||
<
|
||||
typename Geometry,
|
||||
typename GeometryOut,
|
||||
typename Tag1 = typename tag<Geometry>::type,
|
||||
typename Tag2 = typename tag<GeometryOut>::type
|
||||
typename Tag1 = tag_t<Geometry>,
|
||||
typename Tag2 = tag_t<GeometryOut>
|
||||
>
|
||||
struct densify
|
||||
: not_implemented<Tag1, Tag2>
|
||||
@ -360,7 +360,7 @@ struct densify<default_strategy, false>
|
||||
|
||||
namespace resolve_dynamic {
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct densify
|
||||
{
|
||||
template <typename Distance, typename Strategy>
|
||||
|
@ -59,10 +59,7 @@ inline void assign_point_to_index(Point const& point, Geometry& geometry)
|
||||
detail::for_each_dimension<Geometry>([&](auto dimension)
|
||||
{
|
||||
geometry::set<Index, dimension>(geometry,
|
||||
util::numeric_cast
|
||||
<
|
||||
typename coordinate_type<Geometry>::type
|
||||
>(geometry::get<dimension>(point)));
|
||||
util::numeric_cast<coordinate_type_t<Geometry>>(geometry::get<dimension>(point)));
|
||||
});
|
||||
}
|
||||
|
||||
@ -93,7 +90,7 @@ inline void assign_point_from_index(Geometry const& geometry, Point& point)
|
||||
geometry::set<dimension>(point,
|
||||
util::numeric_cast
|
||||
<
|
||||
typename coordinate_type<Point>::type
|
||||
coordinate_type_t<Point>
|
||||
>(geometry::get<Index, dimension>(geometry)));
|
||||
});
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ struct assign_zero_point
|
||||
template <typename 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;
|
||||
detail::for_each_dimension<Point>([&](auto dimension)
|
||||
@ -71,7 +71,7 @@ struct assign_inverse_box_or_segment
|
||||
template <typename BoxOrSegment>
|
||||
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 lowest = util::bounds<coordinate_type>::lowest();
|
||||
@ -90,7 +90,7 @@ struct assign_zero_box_or_segment
|
||||
template <typename BoxOrSegment>
|
||||
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;
|
||||
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>();
|
||||
|
||||
// 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<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>
|
||||
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
|
||||
// -> Most logical is: x1,y1,x2,y2
|
||||
@ -161,7 +161,7 @@ struct assign
|
||||
template <typename Point>
|
||||
struct assign<point_tag, Point, 2>
|
||||
{
|
||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
||||
using coordinate_type = coordinate_type_t<Point>;
|
||||
|
||||
template <typename T>
|
||||
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>
|
||||
struct assign<point_tag, Point, 3>
|
||||
{
|
||||
typedef typename coordinate_type<Point>::type coordinate_type;
|
||||
using coordinate_type = coordinate_type_t<Point>;
|
||||
|
||||
template <typename T>
|
||||
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>
|
||||
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)
|
||||
{
|
||||
|
@ -221,10 +221,10 @@ struct buffer_range
|
||||
{
|
||||
boost::ignore_unused(segment_strategy);
|
||||
|
||||
typedef typename std::iterator_traits
|
||||
using point_type = typename std::iterator_traits
|
||||
<
|
||||
Iterator
|
||||
>::value_type point_type;
|
||||
>::value_type;
|
||||
|
||||
point_type second_point, penultimate_point, ultimate_point; // last two points from begin/end
|
||||
|
||||
@ -469,7 +469,7 @@ struct buffer_inserter_ring
|
||||
{
|
||||
output_point_type first_p1, first_p2, last_p1, last_p2;
|
||||
|
||||
typedef detail::buffer::buffer_range<RingOutput> buffer_range;
|
||||
using buffer_range = detail::buffer::buffer_range<RingOutput>;
|
||||
|
||||
geometry::strategy::buffer::result_code result
|
||||
= buffer_range::iterate(collection, begin, end,
|
||||
@ -747,11 +747,10 @@ template
|
||||
struct buffer_inserter<polygon_tag, PolygonInput, PolygonOutput>
|
||||
{
|
||||
private:
|
||||
typedef typename ring_type<PolygonInput>::type input_ring_type;
|
||||
typedef typename ring_type<PolygonOutput>::type output_ring_type;
|
||||
|
||||
typedef buffer_inserter_ring<input_ring_type, output_ring_type> policy;
|
||||
using input_ring_type = ring_type_t<PolygonInput>;
|
||||
using output_ring_type = ring_type_t<PolygonOutput>;
|
||||
|
||||
using policy = buffer_inserter_ring<input_ring_type, output_ring_type>;
|
||||
|
||||
template
|
||||
<
|
||||
@ -873,12 +872,9 @@ struct buffer_inserter<multi_tag, Multi, PolygonOutput>
|
||||
PolygonOutput,
|
||||
dispatch::buffer_inserter
|
||||
<
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<Multi>::type
|
||||
>::type,
|
||||
typename single_tag_of<tag_t<Multi>>::type,
|
||||
typename boost::range_value<Multi const>::type,
|
||||
typename geometry::ring_type<PolygonOutput>::type
|
||||
geometry::ring_type_t<PolygonOutput>
|
||||
>
|
||||
>
|
||||
{};
|
||||
@ -918,7 +914,7 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
|
||||
|
||||
using collection_type = detail::buffer::buffered_piece_collection
|
||||
<
|
||||
typename geometry::ring_type<GeometryOutput>::type,
|
||||
geometry::ring_type_t<GeometryOutput>,
|
||||
Strategies,
|
||||
DistanceStrategy
|
||||
>;
|
||||
|
@ -39,7 +39,7 @@ namespace detail { namespace buffer
|
||||
class backtrack_for_buffer
|
||||
{
|
||||
public :
|
||||
typedef detail::overlay::backtrack_state state_type;
|
||||
using state_type = detail::overlay::backtrack_state;
|
||||
|
||||
template
|
||||
<
|
||||
@ -87,20 +87,6 @@ g_backtrack_warning_count++;
|
||||
struct buffer_overlay_visitor
|
||||
{
|
||||
public :
|
||||
void print(char const* /*header*/)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Turns>
|
||||
void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Turns>
|
||||
void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/, int /*op_index*/)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Turns>
|
||||
void visit_turns(int , Turns const& ) {}
|
||||
|
||||
@ -148,7 +134,7 @@ struct buffer_turn_info
|
||||
buffer_turn_operation<Point, SegmentRatio>
|
||||
>
|
||||
{
|
||||
typedef Point point_type;
|
||||
using point_type = Point;
|
||||
|
||||
std::size_t turn_index;
|
||||
|
||||
@ -170,26 +156,6 @@ struct buffer_turn_info
|
||||
{}
|
||||
};
|
||||
|
||||
struct buffer_less
|
||||
{
|
||||
template <typename Indexed>
|
||||
inline bool operator()(Indexed const& left, Indexed const& right) const
|
||||
{
|
||||
if (! (left.subject->seg_id == right.subject->seg_id))
|
||||
{
|
||||
return left.subject->seg_id < right.subject->seg_id;
|
||||
}
|
||||
|
||||
// Both left and right are located on the SAME segment.
|
||||
if (! (left.subject->fraction == right.subject->fraction))
|
||||
{
|
||||
return left.subject->fraction < right.subject->fraction;
|
||||
}
|
||||
|
||||
return left.turn_index < right.turn_index;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Strategy>
|
||||
struct piece_get_box
|
||||
{
|
||||
|
@ -124,29 +124,29 @@ template
|
||||
>
|
||||
struct buffered_piece_collection
|
||||
{
|
||||
typedef typename geometry::point_type<Ring>::type point_type;
|
||||
typedef typename geometry::coordinate_type<Ring>::type coordinate_type;
|
||||
using point_type = geometry::point_type_t<Ring>;
|
||||
using coordinate_type = geometry::coordinate_type_t<Ring>;
|
||||
|
||||
// Ring/polygon type, always clockwise
|
||||
typedef geometry::model::ring<point_type> clockwise_ring_type;
|
||||
using clockwise_ring_type = geometry::model::ring<point_type>;
|
||||
|
||||
typedef geometry::model::box<point_type> box_type;
|
||||
using box_type = geometry::model::box<point_type>;
|
||||
|
||||
typedef buffer_turn_info
|
||||
using buffer_turn_info_type = buffer_turn_info
|
||||
<
|
||||
point_type,
|
||||
typename segment_ratio_type<point_type>::type
|
||||
> buffer_turn_info_type;
|
||||
>;
|
||||
|
||||
typedef buffer_turn_operation
|
||||
using buffer_turn_operation_type = buffer_turn_operation
|
||||
<
|
||||
point_type,
|
||||
typename segment_ratio_type<point_type>::type
|
||||
> buffer_turn_operation_type;
|
||||
>;
|
||||
|
||||
typedef std::vector<buffer_turn_info_type> turn_vector_type;
|
||||
using turn_vector_type = std::vector<buffer_turn_info_type>;
|
||||
|
||||
typedef piece_border<Ring, point_type> piece_border_type;
|
||||
using piece_border_type = piece_border<Ring, point_type> ;
|
||||
|
||||
struct piece
|
||||
{
|
||||
@ -203,7 +203,7 @@ struct buffered_piece_collection
|
||||
|
||||
struct original_ring
|
||||
{
|
||||
typedef geometry::sections<box_type, 1> sections_type;
|
||||
using sections_type = geometry::sections<box_type, 1>;
|
||||
|
||||
// Creates an empty instance
|
||||
inline original_ring()
|
||||
@ -224,7 +224,7 @@ struct buffered_piece_collection
|
||||
// The dimension is critical because the direction is later used
|
||||
// in the optimization for within checks using winding strategy
|
||||
// and this strategy is scanning in x direction.
|
||||
typedef std::integer_sequence<std::size_t, 0> dimensions;
|
||||
using dimensions = std::integer_sequence<std::size_t, 0>;
|
||||
geometry::sectionalize
|
||||
<
|
||||
false, dimensions
|
||||
@ -239,7 +239,7 @@ struct buffered_piece_collection
|
||||
bool m_has_interiors;
|
||||
};
|
||||
|
||||
typedef std::vector<piece> piece_vector_type;
|
||||
using piece_vector_type = std::vector<piece>;
|
||||
|
||||
piece_vector_type m_pieces;
|
||||
turn_vector_type m_turns;
|
||||
@ -258,15 +258,15 @@ struct buffered_piece_collection
|
||||
segment_identifier current_segment_id;
|
||||
|
||||
// Monotonic sections (used for offsetted rings around points)
|
||||
typedef geometry::sections<box_type, 2> sections_type;
|
||||
using sections_type = geometry::sections<box_type, 2>;
|
||||
sections_type monotonic_sections;
|
||||
|
||||
// Define the clusters, mapping cluster_id -> turns
|
||||
typedef std::map
|
||||
using cluster_type = std::map
|
||||
<
|
||||
signed_size_type,
|
||||
detail::overlay::cluster_info
|
||||
> cluster_type;
|
||||
>;
|
||||
|
||||
cluster_type m_clusters;
|
||||
|
||||
@ -447,7 +447,7 @@ struct buffered_piece_collection
|
||||
// Check if turns are inside pieces
|
||||
turn_in_piece_visitor
|
||||
<
|
||||
typename geometry::cs_tag<point_type>::type,
|
||||
geometry::cs_tag_t<point_type>,
|
||||
turn_vector_type, piece_vector_type, DistanceStrategy, Strategy
|
||||
> visitor(m_turns, m_pieces, m_distance_strategy, m_strategy);
|
||||
|
||||
@ -1028,14 +1028,14 @@ struct buffered_piece_collection
|
||||
|
||||
inline void traverse()
|
||||
{
|
||||
typedef detail::overlay::traverse
|
||||
using traverser = detail::overlay::traverse
|
||||
<
|
||||
false, false,
|
||||
buffered_ring_collection<buffered_ring<Ring> >,
|
||||
buffered_ring_collection<buffered_ring<Ring > >,
|
||||
overlay_buffer,
|
||||
backtrack_for_buffer
|
||||
> traverser;
|
||||
>;
|
||||
std::map<ring_identifier, overlay::ring_turn_info> turn_info_per_ring;
|
||||
|
||||
traversed_rings.clear();
|
||||
@ -1065,14 +1065,14 @@ struct buffered_piece_collection
|
||||
template <typename GeometryOutput, typename OutputIterator>
|
||||
inline OutputIterator assign(OutputIterator out) const
|
||||
{
|
||||
typedef typename geometry::area_result
|
||||
using area_result_type = typename geometry::area_result
|
||||
<
|
||||
buffered_ring<Ring>, Strategy
|
||||
>::type area_result_type;
|
||||
typedef detail::overlay::ring_properties
|
||||
>::type;
|
||||
using properties = detail::overlay::ring_properties
|
||||
<
|
||||
point_type, area_result_type
|
||||
> properties;
|
||||
>;
|
||||
|
||||
std::map<ring_identifier, properties> selected;
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace traits
|
||||
template <typename Ring>
|
||||
struct tag<geometry::detail::buffer::buffered_ring<Ring> >
|
||||
{
|
||||
typedef ring_tag type;
|
||||
using type = ring_tag;
|
||||
};
|
||||
|
||||
|
||||
@ -129,13 +129,13 @@ struct closure<geometry::detail::buffer::buffered_ring<Ring> >
|
||||
template <typename 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>
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ struct ring_type
|
||||
detail::buffer::buffered_ring_collection<Ring>
|
||||
>
|
||||
{
|
||||
typedef Ring type;
|
||||
using type = Ring;
|
||||
};
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ struct point_order<detail::buffer::buffered_ring_collection_tag,
|
||||
template <>
|
||||
struct single_tag_of<detail::buffer::buffered_ring_collection_tag>
|
||||
{
|
||||
typedef ring_tag type;
|
||||
using type = ring_tag;
|
||||
};
|
||||
|
||||
|
||||
@ -269,7 +269,7 @@ template<>
|
||||
struct get_ring<detail::buffer::buffered_ring_collection_tag>
|
||||
{
|
||||
template<typename MultiGeometry>
|
||||
static inline typename ring_type<MultiGeometry>::type const& apply(
|
||||
static inline ring_type_t<MultiGeometry> const& apply(
|
||||
ring_identifier const& id,
|
||||
MultiGeometry const& multi_ring)
|
||||
{
|
||||
|
@ -43,8 +43,8 @@ namespace detail { namespace buffer
|
||||
template <typename Ring>
|
||||
struct unique_sub_range_from_piece
|
||||
{
|
||||
typedef typename boost::range_iterator<Ring const>::type iterator_type;
|
||||
typedef typename geometry::point_type<Ring const>::type point_type;
|
||||
using iterator_type = typename boost::range_iterator<Ring const>::type;
|
||||
using point_type = geometry::point_type_t<Ring const>;
|
||||
|
||||
unique_sub_range_from_piece(Ring const& ring,
|
||||
iterator_type iterator_at_i, iterator_type iterator_at_j)
|
||||
@ -190,8 +190,8 @@ class piece_turn_visitor
|
||||
inline void calculate_turns(Piece const& piece1, Piece const& piece2,
|
||||
Section const& section1, Section const& section2)
|
||||
{
|
||||
typedef typename boost::range_value<Rings const>::type ring_type;
|
||||
typedef typename boost::range_value<Turns const>::type turn_type;
|
||||
using ring_type = typename boost::range_value<Rings const>::type;
|
||||
using turn_type = typename boost::range_value<Turns const>::type;
|
||||
|
||||
signed_size_type const piece1_first_index = piece1.first_seg_id.segment_index;
|
||||
signed_size_type const piece2_first_index = piece2.first_seg_id.segment_index;
|
||||
@ -261,10 +261,10 @@ class piece_turn_visitor
|
||||
{
|
||||
unique_sub_range_from_piece<ring_type> unique_sub_range2(ring2, prev2, it2);
|
||||
|
||||
typedef detail::overlay::get_turn_info
|
||||
using turn_policy = detail::overlay::get_turn_info
|
||||
<
|
||||
detail::overlay::assign_policy_only_start_turns
|
||||
> turn_policy;
|
||||
>;
|
||||
|
||||
turn_policy::apply(unique_sub_range1, unique_sub_range2,
|
||||
the_model,
|
||||
@ -292,9 +292,8 @@ public:
|
||||
{
|
||||
boost::ignore_unused(first);
|
||||
|
||||
typedef typename boost::range_value<Pieces const>::type piece_type;
|
||||
piece_type const& piece1 = m_pieces[section1.ring_id.source_index];
|
||||
piece_type const& piece2 = m_pieces[section2.ring_id.source_index];
|
||||
auto const& piece1 = m_pieces[section1.ring_id.source_index];
|
||||
auto const& piece2 = m_pieces[section2.ring_id.source_index];
|
||||
|
||||
if ( piece1.index == piece2.index
|
||||
|| is_adjacent(piece1, piece2)
|
||||
|
@ -76,7 +76,7 @@ struct buffer_all<Input, Output, TagIn, multi_polygon_tag>
|
||||
PointStrategy const& point_strategy,
|
||||
Strategies const& strategies)
|
||||
{
|
||||
typedef typename boost::range_value<Output>::type polygon_type;
|
||||
using polygon_type = typename boost::range_value<Output>::type;
|
||||
|
||||
if (geometry::is_empty(geometry_in))
|
||||
{
|
||||
|
@ -38,8 +38,8 @@ template
|
||||
<
|
||||
typename Input,
|
||||
typename Output,
|
||||
typename TagIn = typename tag<Input>::type,
|
||||
typename TagOut = typename tag<Output>::type
|
||||
typename TagIn = tag_t<Input>,
|
||||
typename TagOut = tag_t<Output>
|
||||
>
|
||||
struct buffer_dc : not_implemented<TagIn, TagOut>
|
||||
{};
|
||||
@ -48,8 +48,8 @@ template
|
||||
<
|
||||
typename Input,
|
||||
typename Output,
|
||||
typename TagIn = typename tag<Input>::type,
|
||||
typename TagOut = typename tag<Output>::type
|
||||
typename TagIn = tag_t<Input>,
|
||||
typename TagOut = tag_t<Output>
|
||||
>
|
||||
struct buffer_all : not_implemented<TagIn, TagOut>
|
||||
{};
|
||||
@ -64,7 +64,7 @@ namespace resolve_dynamic
|
||||
template
|
||||
<
|
||||
typename Input,
|
||||
typename TagIn = typename geometry::tag<Input>::type
|
||||
typename TagIn = geometry::tag_t<Input>
|
||||
>
|
||||
struct buffer_dc
|
||||
{
|
||||
@ -101,7 +101,7 @@ struct buffer_dc<Input, dynamic_geometry_tag>
|
||||
template
|
||||
<
|
||||
typename Input,
|
||||
typename TagIn = typename geometry::tag<Input>::type
|
||||
typename TagIn = geometry::tag_t<Input>
|
||||
>
|
||||
struct buffer_all
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ struct line_line_intersection
|
||||
// in a custom strategy, then the calculation of the point in between
|
||||
// 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 q = detail::make::make_infinite_line<ct>(qi, qj);
|
||||
|
@ -103,9 +103,9 @@ namespace detail { namespace buffer
|
||||
template <typename Ring, typename Point>
|
||||
struct piece_border
|
||||
{
|
||||
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
|
||||
typedef typename default_comparable_distance_result<Point>::type radius_type;
|
||||
typedef typename geometry::strategy::buffer::turn_in_ring_winding<coordinate_type>::state_type state_type;
|
||||
using coordinate_type = geometry::coordinate_type_t<Point>;
|
||||
using radius_type = typename default_comparable_distance_result<Point>::type;
|
||||
using state_type = typename geometry::strategy::buffer::turn_in_ring_winding<coordinate_type>::state_type;
|
||||
|
||||
bool m_reversed;
|
||||
|
||||
@ -475,7 +475,7 @@ private :
|
||||
template <typename It>
|
||||
inline void calculate_radii(Point const& center, It begin, It end)
|
||||
{
|
||||
typedef geometry::model::referring_segment<Point const> segment_type;
|
||||
using segment_type = geometry::model::referring_segment<Point const>;
|
||||
|
||||
bool first = true;
|
||||
|
||||
|
@ -345,10 +345,10 @@ inline geometry::order_selector calculate_point_order(Ring const& ring, Strategy
|
||||
template <typename Ring>
|
||||
inline geometry::order_selector calculate_point_order(Ring const& ring)
|
||||
{
|
||||
typedef typename strategy::point_order::services::default_strategy
|
||||
using strategy_type = typename strategy::point_order::services::default_strategy
|
||||
<
|
||||
typename geometry::cs_tag<Ring>::type
|
||||
>::type strategy_type;
|
||||
geometry::cs_tag_t<Ring>
|
||||
>::type;
|
||||
|
||||
concepts::check<Ring const>();
|
||||
|
||||
|
@ -53,8 +53,8 @@ template
|
||||
>
|
||||
struct translating_transformer
|
||||
{
|
||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
||||
typedef boost::reference_wrapper<point_type const> result_type;
|
||||
using point_type = geometry::point_type_t<Geometry>;
|
||||
using result_type = boost::reference_wrapper<point_type const>;
|
||||
|
||||
explicit translating_transformer(Geometry const&) {}
|
||||
explicit translating_transformer(point_type const&) {}
|
||||
@ -72,8 +72,8 @@ struct translating_transformer
|
||||
template <typename Geometry>
|
||||
struct translating_transformer<Geometry, areal_tag, cartesian_tag>
|
||||
{
|
||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
||||
typedef point_type result_type;
|
||||
using point_type = geometry::point_type_t<Geometry>;
|
||||
using result_type = point_type;
|
||||
|
||||
explicit translating_transformer(Geometry const& geom)
|
||||
: m_origin(NULL)
|
||||
|
@ -38,7 +38,7 @@ struct linear_to_areal
|
||||
|
||||
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<Areal>
|
||||
>::type;
|
||||
@ -141,7 +141,7 @@ struct areal_to_areal
|
||||
|
||||
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<Areal2>
|
||||
>::type;
|
||||
|
@ -253,7 +253,7 @@ template
|
||||
typename MultiGeometry,
|
||||
bool CheckCoveredBy = std::is_same
|
||||
<
|
||||
typename tag<MultiGeometry>::type, multi_polygon_tag
|
||||
tag_t<MultiGeometry>, multi_polygon_tag
|
||||
>::value
|
||||
>
|
||||
class point_to_multigeometry
|
||||
@ -429,7 +429,7 @@ struct closest_points
|
||||
> : closest_points
|
||||
<
|
||||
Point, Linear,
|
||||
point_tag, typename tag<Linear>::type, false
|
||||
point_tag, tag_t<Linear>, false
|
||||
>
|
||||
{};
|
||||
|
||||
@ -441,7 +441,7 @@ struct closest_points
|
||||
> : closest_points
|
||||
<
|
||||
Point, Areal,
|
||||
point_tag, typename tag<Areal>::type, false
|
||||
point_tag, tag_t<Areal>, false
|
||||
>
|
||||
{};
|
||||
|
||||
|
@ -124,8 +124,8 @@ namespace resolve_dynamic
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct comparable_distance
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ struct indexed_to_indexed
|
||||
{
|
||||
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,
|
||||
util::numeric_cast<coordinate_type>(
|
||||
|
@ -43,7 +43,7 @@ struct point_to_point
|
||||
{
|
||||
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)));
|
||||
point_to_point<Source, Destination, Dimension + 1, DimensionCount>::apply(source, destination);
|
||||
|
@ -128,7 +128,7 @@ private:
|
||||
|
||||
// TODO: Or just implement point_type<> for GeometryCollection
|
||||
// and enforce the same point_type used in the whole sequence in check().
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct default_strategy
|
||||
{
|
||||
using type = typename strategies::convex_hull::services::default_strategy
|
||||
@ -201,7 +201,7 @@ namespace dispatch
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
typename Tag = tag_t<Geometry>
|
||||
>
|
||||
struct convex_hull
|
||||
{
|
||||
@ -258,7 +258,7 @@ struct convex_hull<GeometryCollection, geometry_collection_tag>
|
||||
{
|
||||
// Assuming that single point_type is used by the GeometryCollection
|
||||
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>;
|
||||
|
||||
// Calculate box rings once
|
||||
@ -304,7 +304,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
template <typename OutputGeometry, typename Tag = typename tag<OutputGeometry>::type>
|
||||
template <typename OutputGeometry, typename Tag = tag_t<OutputGeometry>>
|
||||
struct convex_hull_out
|
||||
{
|
||||
BOOST_GEOMETRY_STATIC_ASSERT_FALSE("This OutputGeometry is not supported.", OutputGeometry, Tag);
|
||||
@ -531,7 +531,7 @@ struct convex_hull<default_strategy>
|
||||
|
||||
namespace resolve_dynamic {
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct convex_hull
|
||||
{
|
||||
template <typename OutputGeometry, typename Strategy>
|
||||
|
@ -38,8 +38,8 @@ template
|
||||
<
|
||||
typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename Tag1 = typename tag<Geometry1>::type,
|
||||
typename Tag2 = typename tag<Geometry2>::type
|
||||
typename Tag1 = tag_t<Geometry1>,
|
||||
typename Tag2 = tag_t<Geometry2>
|
||||
>
|
||||
struct covered_by
|
||||
: not_implemented<Tag1, Tag2>
|
||||
@ -122,8 +122,8 @@ namespace resolve_dynamic {
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct covered_by
|
||||
{
|
||||
|
@ -105,9 +105,9 @@ struct direction_code_impl<spherical_equatorial_tag>
|
||||
units_sa_t, units_p_t);
|
||||
}
|
||||
|
||||
using coor_sa_t = typename coordinate_type<PointSegmentA>::type;
|
||||
using coor_sb_t = typename coordinate_type<PointSegmentB>::type;
|
||||
using coor_p_t = typename coordinate_type<Point2>::type;
|
||||
using coor_sa_t = coordinate_type_t<PointSegmentA>;
|
||||
using coor_sb_t = coordinate_type_t<PointSegmentB>;
|
||||
using coor_p_t = coordinate_type_t<Point2>;
|
||||
|
||||
// Declare unit type (equal for all types) and calc type (coerced to most precise)
|
||||
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
|
||||
<
|
||||
typename coordinate_type<PointSegmentA>::type,
|
||||
coordinate_type_t<PointSegmentA>,
|
||||
typename cs_angular_units<PointSegmentA>::type
|
||||
>;
|
||||
using constants_p_t = math::detail::constants_on_spheroid
|
||||
<
|
||||
typename coordinate_type<Point2>::type,
|
||||
coordinate_type_t<Point2>,
|
||||
typename cs_angular_units<Point2>::type
|
||||
>;
|
||||
|
||||
@ -249,7 +249,7 @@ struct direction_code_impl<spherical_tag>
|
||||
<
|
||||
std::is_same
|
||||
<
|
||||
typename geometry::cs_tag<PointSegmentA>::type,
|
||||
geometry::cs_tag_t<PointSegmentA>,
|
||||
spherical_polar_tag
|
||||
>::value,
|
||||
spherical_polar_tag,
|
||||
|
@ -48,7 +48,7 @@ inline bool point_on_border_covered_by(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
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;
|
||||
return geometry::point_on_border(pt, geometry1)
|
||||
&& geometry::covered_by(pt, geometry2, strategy);
|
||||
|
@ -130,7 +130,7 @@ template
|
||||
<
|
||||
typename Segment,
|
||||
typename Areal,
|
||||
typename Tag = typename tag<Areal>::type
|
||||
typename Tag = tag_t<Areal>
|
||||
>
|
||||
struct disjoint_segment_areal
|
||||
: not_implemented<Segment, Areal>
|
||||
@ -170,7 +170,7 @@ public:
|
||||
{
|
||||
if (! disjoint_range_segment_or_box
|
||||
<
|
||||
typename geometry::ring_type<Polygon>::type,
|
||||
geometry::ring_type_t<Polygon>,
|
||||
Segment
|
||||
>::apply(geometry::exterior_ring(polygon), segment, strategy))
|
||||
{
|
||||
|
@ -90,12 +90,9 @@ struct disjoint_linear
|
||||
Geometry2 const& geometry2,
|
||||
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 ratio_type = geometry::segment_ratio
|
||||
<
|
||||
typename coordinate_type<point_type>::type
|
||||
> ;
|
||||
using ratio_type = geometry::segment_ratio<coordinate_type_t<point_type>>;
|
||||
using turn_info_type = overlay::turn_info
|
||||
<
|
||||
mutable_point_type,
|
||||
@ -114,8 +111,8 @@ struct disjoint_linear
|
||||
disjoint_interrupt_policy interrupt_policy;
|
||||
dispatch::get_turns
|
||||
<
|
||||
typename geometry::tag<Geometry1>::type,
|
||||
typename geometry::tag<Geometry2>::type,
|
||||
geometry::tag_t<Geometry1>,
|
||||
geometry::tag_t<Geometry2>,
|
||||
Geometry1,
|
||||
Geometry2,
|
||||
overlay::do_reverse<geometry::point_order<Geometry1>::value>::value, // should be false
|
||||
|
@ -45,7 +45,7 @@ namespace detail { namespace disjoint
|
||||
template
|
||||
<
|
||||
typename SegmentOrBox,
|
||||
typename Tag = typename tag<SegmentOrBox>::type
|
||||
typename Tag = tag_t<SegmentOrBox>
|
||||
>
|
||||
struct disjoint_point_segment_or_box
|
||||
: not_implemented<Tag>
|
||||
@ -135,7 +135,7 @@ template
|
||||
<
|
||||
typename Linear,
|
||||
typename SegmentOrBox,
|
||||
typename Tag = typename tag<Linear>::type
|
||||
typename Tag = tag_t<Linear>
|
||||
>
|
||||
struct disjoint_linear_segment_or_box
|
||||
: not_implemented<Linear, SegmentOrBox>
|
||||
|
@ -461,7 +461,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiPoint, typename Areal, typename Tag = typename tag<Areal>::type>
|
||||
template <typename MultiPoint, typename Areal, typename Tag = tag_t<Areal>>
|
||||
struct multipoint_areal
|
||||
: multi_point_single_geometry<MultiPoint, Areal>
|
||||
{};
|
||||
|
@ -131,17 +131,17 @@ struct disjoint_segment_box_sphere_or_spheroid
|
||||
|
||||
// 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;
|
||||
NormalizeStrategy::apply(p0, p0_normalized);
|
||||
segment_point_type p1_normalized;
|
||||
NormalizeStrategy::apply(p1, p1_normalized);
|
||||
|
||||
CT lon1 = geometry::get_as_radian<0>(p0_normalized);
|
||||
CT lat1 = geometry::get_as_radian<1>(p0_normalized);
|
||||
CT lon2 = geometry::get_as_radian<0>(p1_normalized);
|
||||
CT lat2 = geometry::get_as_radian<1>(p1_normalized);
|
||||
coor_t lon1 = geometry::get_as_radian<0>(p0_normalized);
|
||||
coor_t lat1 = geometry::get_as_radian<1>(p0_normalized);
|
||||
coor_t lon2 = geometry::get_as_radian<0>(p1_normalized);
|
||||
coor_t lat2 = geometry::get_as_radian<1>(p1_normalized);
|
||||
|
||||
if (lon1 > lon2)
|
||||
{
|
||||
@ -166,12 +166,12 @@ struct disjoint_segment_box_sphere_or_spheroid
|
||||
|
||||
// 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);
|
||||
CT 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);
|
||||
CT b_lat_max = geometry::get_as_radian<geometry::max_corner, 1>(box);
|
||||
coor_t b_lon_min = geometry::get_as_radian<geometry::min_corner, 0>(box);
|
||||
coor_t b_lat_min = geometry::get_as_radian<geometry::min_corner, 1>(box);
|
||||
coor_t b_lon_max = geometry::get_as_radian<geometry::max_corner, 0>(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, 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)
|
||||
// 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)
|
||||
|| (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)
|
||||
{
|
||||
@ -230,7 +230,7 @@ struct disjoint_segment_box_sphere_or_spheroid
|
||||
|
||||
//optimization TODO: computing the spherical longitude should suffice for
|
||||
// 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,
|
||||
lon2, lat2,
|
||||
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 point1_t = typename geometry::point_type<GeometryCollection1>::type;
|
||||
using point1_t = geometry::point_type_t<GeometryCollection1>;
|
||||
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 rtree_value_t = std::pair<box1_t, typename boost::range_iterator<GeometryCollection1 const>::type>;
|
||||
|
@ -51,7 +51,7 @@ namespace detail { namespace distance
|
||||
template
|
||||
<
|
||||
typename SegmentOrBox,
|
||||
typename Tag = typename tag<SegmentOrBox>::type
|
||||
typename Tag = tag_t<SegmentOrBox>
|
||||
>
|
||||
struct segment_or_box_point_range_closure
|
||||
: not_implemented<SegmentOrBox>
|
||||
@ -76,7 +76,7 @@ template
|
||||
typename Geometry,
|
||||
typename SegmentOrBox,
|
||||
typename Strategies,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
typename Tag = tag_t<Geometry>
|
||||
>
|
||||
class geometry_to_segment_or_box
|
||||
{
|
||||
@ -97,7 +97,7 @@ private:
|
||||
template
|
||||
<
|
||||
typename SegOrBox,
|
||||
typename SegOrBoxTag = typename tag<SegOrBox>::type
|
||||
typename SegOrBoxTag = tag_t<SegOrBox>
|
||||
>
|
||||
struct assign_new_min_iterator
|
||||
: not_implemented<SegOrBox>
|
||||
@ -128,7 +128,7 @@ private:
|
||||
<
|
||||
typename SegOrBox,
|
||||
typename PointRange,
|
||||
typename SegOrBoxTag = typename tag<SegOrBox>::type
|
||||
typename SegOrBoxTag = tag_t<SegOrBox>
|
||||
>
|
||||
struct assign_segment_or_box_points
|
||||
{};
|
||||
|
@ -187,8 +187,8 @@ namespace resolve_dynamic
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct distance
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace detail { namespace distance
|
||||
|
||||
|
||||
// class to choose between point_iterator and segment_iterator
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct iterator_selector
|
||||
{
|
||||
typedef geometry::segment_iterator<Geometry> iterator_type;
|
||||
|
@ -253,7 +253,7 @@ public:
|
||||
private:
|
||||
typedef point_to_range
|
||||
<
|
||||
Point, typename ring_type<Polygon>::type, Closure, Strategies
|
||||
Point, ring_type_t<Polygon>, Closure, Strategies
|
||||
> per_ring;
|
||||
|
||||
struct distance_to_interior_rings
|
||||
@ -315,10 +315,7 @@ template
|
||||
typename Point,
|
||||
typename MultiGeometry,
|
||||
typename Strategies,
|
||||
bool CheckCoveredBy = std::is_same
|
||||
<
|
||||
typename tag<MultiGeometry>::type, multi_polygon_tag
|
||||
>::value
|
||||
bool CheckCoveredBy = std::is_same<tag_t<MultiGeometry>, multi_polygon_tag>::value
|
||||
>
|
||||
class point_to_multigeometry
|
||||
{
|
||||
@ -509,7 +506,7 @@ struct distance
|
||||
> : distance
|
||||
<
|
||||
Point, Linear, Strategy,
|
||||
point_tag, typename tag<Linear>::type,
|
||||
point_tag, tag_t<Linear>,
|
||||
strategy_tag_distance_point_segment, false
|
||||
>
|
||||
{};
|
||||
@ -523,7 +520,7 @@ struct distance
|
||||
> : distance
|
||||
<
|
||||
Point, Areal, Strategy,
|
||||
point_tag, typename tag<Areal>::type,
|
||||
point_tag, tag_t<Areal>,
|
||||
strategy_tag_distance_point_segment, false
|
||||
>
|
||||
{};
|
||||
|
@ -39,15 +39,15 @@ struct dummy_multi_polygon {};
|
||||
namespace traits
|
||||
{
|
||||
|
||||
template <> struct tag<geometry::detail::dummy_point> { typedef point_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_segment> { typedef segment_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_box> { typedef box_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_linestring> { typedef linestring_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_ring> { typedef ring_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_polygon> { typedef polygon_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_multi_point> { typedef multi_point_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_multi_linestring> { typedef multi_linestring_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_multi_polygon> { typedef multi_polygon_tag type; };
|
||||
template <> struct tag<geometry::detail::dummy_point> { using type = point_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_segment> { using type = segment_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_box> { using type = box_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_linestring> { using type = linestring_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_ring> { using type = ring_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_polygon> { using type = polygon_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_multi_point> { using type = multi_point_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_multi_linestring> { using type = multi_linestring_tag; };
|
||||
template <> struct tag<geometry::detail::dummy_multi_polygon> { using type = multi_polygon_tag; };
|
||||
|
||||
} // namespace traits
|
||||
|
||||
|
@ -54,8 +54,7 @@ struct envelope_polygon
|
||||
template <typename Polygon, typename Box, typename Strategy>
|
||||
static inline void apply(Polygon const& polygon, Box& mbr, Strategy const& strategy)
|
||||
{
|
||||
typename ring_return_type<Polygon const>::type ext_ring
|
||||
= exterior_ring(polygon);
|
||||
ring_return_type_t<Polygon const> ext_ring = exterior_ring(polygon);
|
||||
|
||||
if (geometry::is_empty(ext_ring))
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ template
|
||||
>
|
||||
struct initialize
|
||||
{
|
||||
typedef typename coordinate_type<Box>::type coordinate_type;
|
||||
using coordinate_type = coordinate_type_t<Box>;
|
||||
|
||||
static inline void apply(Box& box,
|
||||
coordinate_type min_value
|
||||
|
@ -100,7 +100,7 @@ struct envelope<default_strategy, false>
|
||||
namespace resolve_dynamic
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct envelope
|
||||
{
|
||||
template <typename Box, typename Strategy>
|
||||
|
@ -62,7 +62,7 @@ struct intersects_antimeridian
|
||||
|
||||
return apply
|
||||
<
|
||||
typename coordinate_system<Point>::type::units
|
||||
detail::coordinate_system_units_t<Point>
|
||||
>(geometry::get<0>(p1_normalized),
|
||||
geometry::get<1>(p1_normalized),
|
||||
geometry::get<0>(p2_normalized),
|
||||
|
@ -229,9 +229,9 @@ struct envelope_range_of_boxes
|
||||
{
|
||||
// boxes in the range are assumed to be normalized already
|
||||
|
||||
typedef typename boost::range_value<RangeOfBoxes>::type box_type;
|
||||
typedef typename coordinate_type<box_type>::type coordinate_type;
|
||||
typedef typename detail::cs_angular_units<box_type>::type units_type;
|
||||
using box_type = typename boost::range_value<RangeOfBoxes>::type;
|
||||
using coordinate_type = coordinate_type_t<box_type>;
|
||||
using units_type = typename detail::cs_angular_units<box_type>::type;
|
||||
|
||||
static const bool is_equatorial = ! std::is_same
|
||||
<
|
||||
@ -239,13 +239,13 @@ struct envelope_range_of_boxes
|
||||
spherical_polar_tag
|
||||
>::value;
|
||||
|
||||
typedef math::detail::constants_on_spheroid
|
||||
using constants = math::detail::constants_on_spheroid
|
||||
<
|
||||
coordinate_type, units_type, is_equatorial
|
||||
> constants;
|
||||
>;
|
||||
|
||||
typedef longitude_interval<coordinate_type> interval_type;
|
||||
typedef std::vector<interval_type> interval_range_type;
|
||||
using interval_type = longitude_interval<coordinate_type>;
|
||||
using interval_range_type = std::vector<interval_type>;
|
||||
|
||||
BOOST_GEOMETRY_ASSERT(! boost::empty(range_of_boxes));
|
||||
|
||||
|
@ -37,8 +37,8 @@ template
|
||||
<
|
||||
typename GeometryIn,
|
||||
typename GeometryOut,
|
||||
typename TagIn = typename tag<GeometryIn>::type,
|
||||
typename TagOut = typename tag<GeometryOut>::type
|
||||
typename TagIn = tag_t<GeometryIn>,
|
||||
typename TagOut = tag_t<GeometryOut>
|
||||
>
|
||||
struct transform_units_impl
|
||||
: not_implemented<TagIn, TagOut>
|
||||
|
@ -250,11 +250,11 @@ struct collected_vector_polar
|
||||
private:
|
||||
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
|
||||
<
|
||||
coord_type,
|
||||
typename coordinate_system<Point>::type::units
|
||||
detail::coordinate_system_units_t<Point>
|
||||
> ;
|
||||
|
||||
constexpr coord_type pi_2 = constants::half_period() / 2;
|
||||
@ -395,9 +395,7 @@ struct polygon_collect_vectors
|
||||
{
|
||||
static inline void apply(Collection& collection, Polygon const& polygon)
|
||||
{
|
||||
typedef typename geometry::ring_type<Polygon>::type ring_type;
|
||||
|
||||
typedef range_collect_vectors<ring_type, Collection> per_range;
|
||||
using per_range = range_collect_vectors<geometry::ring_type_t<Polygon>, Collection>;
|
||||
per_range::apply(collection, exterior_ring(polygon));
|
||||
|
||||
auto const& rings = interior_rings(polygon);
|
||||
@ -504,7 +502,7 @@ inline void collect_vectors(Collection& collection, Geometry const& geometry)
|
||||
|
||||
dispatch::collect_vectors
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
tag_t<Geometry>,
|
||||
Collection,
|
||||
Geometry
|
||||
>::apply(collection, geometry);
|
||||
|
@ -215,7 +215,7 @@ struct equals_by_collection
|
||||
>::template type
|
||||
<
|
||||
calculation_type,
|
||||
typename geometry::point_type<Geometry1>::type
|
||||
geometry::point_type_t<Geometry1>
|
||||
>;
|
||||
|
||||
std::vector<collected_vector_type> c1, c2;
|
||||
|
@ -159,8 +159,8 @@ namespace resolve_dynamic {
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct equals
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ struct expand<default_strategy, false>
|
||||
namespace resolve_dynamic
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct expand
|
||||
{
|
||||
template <typename Box, typename Strategy>
|
||||
|
@ -41,7 +41,7 @@ struct corner_by_epsilon
|
||||
{
|
||||
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 seps = math::scaled_epsilon(coord);
|
||||
|
||||
@ -51,9 +51,9 @@ struct corner_by_epsilon
|
||||
}
|
||||
|
||||
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 seps = math::scaled_epsilon(coord, eps);
|
||||
|
||||
@ -72,13 +72,13 @@ template
|
||||
struct corner_by_epsilon<Point, PlusOrMinus, D, D>
|
||||
{
|
||||
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
|
||||
<
|
||||
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
|
||||
{
|
||||
@ -94,7 +94,7 @@ struct expand_by_epsilon
|
||||
}
|
||||
|
||||
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;
|
||||
min_type min_point(box);
|
||||
@ -110,7 +110,7 @@ template <typename Box>
|
||||
struct expand_by_epsilon<Box, false>
|
||||
{
|
||||
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
|
||||
@ -122,8 +122,7 @@ inline void expand_by_epsilon(Box & box)
|
||||
}
|
||||
|
||||
template <typename Box>
|
||||
inline void expand_by_epsilon(Box & box,
|
||||
typename coordinate_type<Box>::type const& eps)
|
||||
inline void expand_by_epsilon(Box & box, coordinate_type_t<Box> const& 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
|
||||
{
|
||||
|
||||
typedef typename geometry::coordinate_type<Ring>::type coordinate_type;
|
||||
typedef typename geometry::point_type<Ring>::type point_type;
|
||||
using coordinate_type = geometry::coordinate_type_t<Ring>;
|
||||
using point_type = geometry::point_type_t<Ring>;
|
||||
|
||||
template <typename CirclingIterator, typename Points>
|
||||
static inline bool extend(CirclingIterator& it,
|
||||
@ -393,7 +393,7 @@ template
|
||||
<
|
||||
typename Geometry,
|
||||
std::size_t Dimension,
|
||||
typename GeometryTag = typename tag<Geometry>::type
|
||||
typename GeometryTag = tag_t<Geometry>
|
||||
>
|
||||
struct extreme_points
|
||||
{};
|
||||
@ -412,11 +412,10 @@ struct extreme_points<Polygon, Dimension, polygon_tag>
|
||||
static inline bool apply(Polygon const& polygon, Extremes& extremes, Intruders& intruders,
|
||||
SideStrategy const& strategy)
|
||||
{
|
||||
typedef typename geometry::ring_type<Polygon>::type ring_type;
|
||||
typedef detail::extreme_points::extreme_points_on_ring
|
||||
using ring_implementation = detail::extreme_points::extreme_points_on_ring
|
||||
<
|
||||
ring_type, Dimension
|
||||
> ring_implementation;
|
||||
geometry::ring_type_t<Polygon>, Dimension
|
||||
>;
|
||||
|
||||
if (! ring_implementation::apply(geometry::exterior_ring(polygon),
|
||||
extremes, intruders, strategy))
|
||||
|
@ -133,7 +133,7 @@ namespace dispatch
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
typename Tag = tag_t<Geometry>
|
||||
>
|
||||
struct for_each_range
|
||||
{
|
||||
|
@ -37,9 +37,9 @@ using gc_make_rtree_box_t = geometry::model::box
|
||||
<
|
||||
geometry::model::point
|
||||
<
|
||||
typename geometry::coordinate_type<GC>::type,
|
||||
geometry::coordinate_type_t<GC>,
|
||||
geometry::dimension<GC>::value,
|
||||
typename geometry::coordinate_system<GC>::type
|
||||
geometry::coordinate_system_t<GC>
|
||||
>
|
||||
>;
|
||||
|
||||
|
@ -33,9 +33,9 @@ namespace detail
|
||||
template <typename Box, std::size_t Dimension>
|
||||
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));
|
||||
|
||||
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>
|
||||
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));
|
||||
}
|
||||
@ -54,7 +54,7 @@ struct get_max_size_box<Box, 0>
|
||||
// This might be implemented later on for other geometries too.
|
||||
// Not dispatched yet.
|
||||
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);
|
||||
}
|
||||
|
@ -75,10 +75,10 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
|
||||
TupledOut& geometry_out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename geometry::detail::output_geometry_value
|
||||
using single_out = typename geometry::detail::output_geometry_value
|
||||
<
|
||||
TupledOut
|
||||
>::type single_out;
|
||||
>::type;
|
||||
|
||||
boost::ignore_unused
|
||||
<
|
||||
@ -89,18 +89,18 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
|
||||
>
|
||||
>();
|
||||
|
||||
typedef geometry::detail::output_geometry_access
|
||||
using areal = geometry::detail::output_geometry_access
|
||||
<
|
||||
single_out, polygon_tag, polygon_tag
|
||||
> areal;
|
||||
typedef geometry::detail::output_geometry_access
|
||||
>;
|
||||
using linear = geometry::detail::output_geometry_access
|
||||
<
|
||||
single_out, linestring_tag, linestring_tag
|
||||
> linear;
|
||||
typedef geometry::detail::output_geometry_access
|
||||
>;
|
||||
using pointlike = geometry::detail::output_geometry_access
|
||||
<
|
||||
single_out, point_tag, point_tag
|
||||
> pointlike;
|
||||
>;
|
||||
|
||||
// A * A -> A
|
||||
call_intersection(areal1, areal2,
|
||||
@ -124,15 +124,15 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
|
||||
// however this results in static assert failure related to rescale policy
|
||||
// After the removing of rescaling replacing boundary with areal geometry results in
|
||||
// some tests failing.
|
||||
typedef typename geometry::tuples::element
|
||||
using areal_out_type = typename geometry::tuples::element
|
||||
<
|
||||
areal::index, TupledOut
|
||||
>::type areal_out_type;
|
||||
>::type;
|
||||
|
||||
typedef geometry::detail::boundary_view
|
||||
using areal_out_boundary_type = geometry::detail::boundary_view
|
||||
<
|
||||
areal_out_type const
|
||||
> areal_out_boundary_type;
|
||||
>;
|
||||
|
||||
areal_out_boundary_type areal_out_boundary(areal::get(geometry_out));
|
||||
|
||||
|
@ -44,8 +44,8 @@ struct gc_can_convert_element
|
||||
template <typename G>
|
||||
using has_same_tag_as_single = std::is_same
|
||||
<
|
||||
typename geometry::tag<G>::type,
|
||||
typename geometry::tag<typename boost::range_value<Multi>::type>::type
|
||||
geometry::tag_t<G>,
|
||||
geometry::tag_t<typename boost::range_value<Multi>::type>
|
||||
>;
|
||||
using gc_types = typename traits::geometry_types<GC>::type;
|
||||
using found_type = typename util::sequence_find_if<gc_types, has_same_tag_as_single>::type;
|
||||
|
@ -37,8 +37,8 @@ namespace dispatch
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type,
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>,
|
||||
bool Reverse = reverse_dispatch<Geometry1, Geometry2>::type::value
|
||||
>
|
||||
struct intersection
|
||||
@ -49,14 +49,14 @@ struct intersection
|
||||
GeometryOut& geometry_out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename geometry::detail::output_geometry_value
|
||||
using single_out = typename geometry::detail::output_geometry_value
|
||||
<
|
||||
GeometryOut
|
||||
>::type SingleOut;
|
||||
>::type;
|
||||
|
||||
intersection_insert
|
||||
<
|
||||
Geometry1, Geometry2, SingleOut,
|
||||
Geometry1, Geometry2, single_out,
|
||||
overlay_intersection
|
||||
>::apply(geometry1, geometry2,
|
||||
geometry::detail::output_geometry_back_inserter(geometry_out),
|
||||
@ -109,9 +109,9 @@ namespace resolve_collection
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2, typename GeometryOut,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type,
|
||||
typename TagOut = typename geometry::tag<GeometryOut>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>,
|
||||
typename TagOut = geometry::tag_t<GeometryOut>
|
||||
>
|
||||
struct intersection
|
||||
{
|
||||
@ -195,10 +195,10 @@ struct intersection<default_strategy, false>
|
||||
GeometryOut & geometry_out,
|
||||
default_strategy)
|
||||
{
|
||||
typedef typename strategies::relate::services::default_strategy
|
||||
using strategy_type = typename strategies::relate::services::default_strategy
|
||||
<
|
||||
Geometry1, Geometry2
|
||||
>::type strategy_type;
|
||||
>::type;
|
||||
|
||||
return intersection
|
||||
<
|
||||
@ -216,8 +216,8 @@ namespace resolve_dynamic
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct intersection
|
||||
{
|
||||
|
@ -46,20 +46,20 @@ struct self_intersects
|
||||
{
|
||||
concepts::check<Geometry const>();
|
||||
|
||||
typedef typename geometry::point_type<Geometry>::type point_type;
|
||||
typedef typename strategies::relate::services::default_strategy
|
||||
using point_type = geometry::point_type_t<Geometry>;
|
||||
using strategy_type = typename strategies::relate::services::default_strategy
|
||||
<
|
||||
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;
|
||||
|
||||
typedef detail::overlay::get_turn_info
|
||||
using turn_policy = detail::overlay::get_turn_info
|
||||
<
|
||||
detail::overlay::assign_null_policy
|
||||
> turn_policy;
|
||||
>;
|
||||
|
||||
strategy_type strategy;
|
||||
|
||||
|
@ -43,7 +43,7 @@ namespace detail { namespace is_simple
|
||||
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_DEBUG
|
||||
template <typename Linear, typename Tag = typename tag<Linear>::type>
|
||||
template <typename Linear, typename Tag = tag_t<Linear>>
|
||||
struct debug_boundary_points_printer
|
||||
: not_implemented<Linear>
|
||||
{};
|
||||
|
@ -80,7 +80,7 @@ template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Strategy,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
typename Tag = tag_t<Geometry>
|
||||
>
|
||||
class is_acceptable_turn
|
||||
: not_implemented<Geometry>
|
||||
|
@ -24,7 +24,7 @@ namespace boost { namespace geometry
|
||||
namespace detail { namespace is_valid
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct debug_validity_phase
|
||||
{
|
||||
static inline void apply(int)
|
||||
|
@ -106,10 +106,10 @@ struct range_has_invalid_coordinate
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type,
|
||||
typename Tag = tag_t<Geometry>,
|
||||
bool HasFloatingPointCoordinates = std::is_floating_point
|
||||
<
|
||||
typename coordinate_type<Geometry>::type
|
||||
coordinate_type_t<Geometry>
|
||||
>::value
|
||||
>
|
||||
struct has_invalid_coordinate
|
||||
|
@ -92,7 +92,7 @@ struct is_valid<default_strategy, false>
|
||||
namespace resolve_dynamic
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct is_valid
|
||||
{
|
||||
template <typename VisitPolicy, typename Strategy>
|
||||
|
@ -33,7 +33,7 @@ template
|
||||
<
|
||||
typename Geometry,
|
||||
order_selector Order = geometry::point_order<Geometry>::value,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
typename Tag = tag_t<Geometry>
|
||||
>
|
||||
struct acceptable_operation
|
||||
{};
|
||||
@ -69,7 +69,7 @@ struct acceptable_operation<MultiPolygon, clockwise, multi_polygon_tag>
|
||||
|
||||
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
template <typename Geometry, typename Tag = tag_t<Geometry>>
|
||||
struct is_acceptable_turn
|
||||
{};
|
||||
|
||||
|
@ -122,15 +122,14 @@ protected:
|
||||
VisitPolicy& visitor,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef debug_validity_phase<Polygon> debug_phase;
|
||||
typedef typename ring_type<Polygon>::type ring_type;
|
||||
using debug_phase = debug_validity_phase<Polygon>;
|
||||
|
||||
// check validity of exterior ring
|
||||
debug_phase::apply(1);
|
||||
|
||||
if (! detail::is_valid::is_valid_ring
|
||||
<
|
||||
ring_type,
|
||||
ring_type_t<Polygon>,
|
||||
false // do not check self intersections
|
||||
>::apply(exterior_ring(polygon), visitor, strategy))
|
||||
{
|
||||
@ -453,10 +452,10 @@ public:
|
||||
else // else prevents unreachable code warning
|
||||
{
|
||||
// compute turns and check if all are acceptable
|
||||
typedef debug_validity_phase<Polygon> debug_phase;
|
||||
using debug_phase = debug_validity_phase<Polygon>;
|
||||
debug_phase::apply(3);
|
||||
|
||||
typedef has_valid_self_turns<Polygon, typename Strategy::cs_tag> has_valid_turns;
|
||||
using has_valid_turns = has_valid_self_turns<Polygon, typename Strategy::cs_tag>;
|
||||
|
||||
std::deque<typename has_valid_turns::turn_type> turns;
|
||||
bool has_invalid_turns
|
||||
|
@ -59,8 +59,8 @@ struct box_box_loop
|
||||
{
|
||||
assert_dimension_equal<Box1, Box2>();
|
||||
|
||||
typedef typename coordinate_type<Box1>::type coordinate_type1;
|
||||
typedef typename coordinate_type<Box2>::type coordinate_type2;
|
||||
using coordinate_type1 = coordinate_type_t<Box1>;
|
||||
using coordinate_type2 = coordinate_type_t<Box2>;
|
||||
|
||||
coordinate_type1 const& min1 = get<min_corner, Dimension>(b1);
|
||||
coordinate_type1 const& max1 = get<max_corner, Dimension>(b1);
|
||||
|
@ -46,8 +46,8 @@ template
|
||||
<
|
||||
typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename Tag1 = typename tag<Geometry1>::type,
|
||||
typename Tag2 = typename tag<Geometry2>::type
|
||||
typename Tag1 = tag_t<Geometry1>,
|
||||
typename Tag2 = tag_t<Geometry2>
|
||||
>
|
||||
struct overlaps
|
||||
: detail::relate::relate_impl
|
||||
@ -131,8 +131,8 @@ namespace resolve_dynamic
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type
|
||||
typename Tag1 = geometry::tag_t<Geometry1>,
|
||||
typename Tag2 = geometry::tag_t<Geometry2>
|
||||
>
|
||||
struct overlaps
|
||||
{
|
||||
|
@ -48,9 +48,9 @@ inline void convert_and_add(GeometryOut& result,
|
||||
ring_identifier id,
|
||||
bool reversed, bool append)
|
||||
{
|
||||
typedef typename geometry::tag<Geometry1>::type tag1;
|
||||
typedef typename geometry::tag<Geometry2>::type tag2;
|
||||
typedef typename geometry::tag<GeometryOut>::type tag_out;
|
||||
using tag1 = geometry::tag_t<Geometry1>;
|
||||
using tag2 = geometry::tag_t<Geometry2>;
|
||||
using tag_out = geometry::tag_t<GeometryOut>;
|
||||
|
||||
if (id.source_index == 0)
|
||||
{
|
||||
@ -133,7 +133,7 @@ inline OutputIterator add_rings(SelectionMap const& map,
|
||||
// everything is figured out yet (sum of positive/negative rings)
|
||||
if (geometry::num_points(result) >= min_num_points)
|
||||
{
|
||||
typedef typename geometry::area_result<GeometryOut, Strategy>::type area_type;
|
||||
using area_type = typename geometry::area_result<GeometryOut, Strategy>::type;
|
||||
area_type const area = geometry::area(result, strategy);
|
||||
area_type const zero = 0;
|
||||
// Ignore if area is 0
|
||||
|
@ -57,8 +57,8 @@ static inline bool within_selected_input(Item const& item2,
|
||||
RingCollection const& collection,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename geometry::tag<Geometry1>::type tag1;
|
||||
typedef typename geometry::tag<Geometry2>::type tag2;
|
||||
using tag1 = geometry::tag_t<Geometry1>;
|
||||
using tag2 = geometry::tag_t<Geometry2>;
|
||||
|
||||
// NOTE: range_in_geometry first checks the item2.point and then
|
||||
// if this point is on boundary it checks points of inner_geometry
|
||||
@ -92,8 +92,8 @@ static inline bool within_selected_input(Item const& item2,
|
||||
RingCollection const& collection,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename geometry::tag<Geometry1>::type tag1;
|
||||
typedef typename geometry::tag<Geometry2>::type tag2;
|
||||
using tag1 = geometry::tag_t<Geometry1>;
|
||||
using tag2 = geometry::tag_t<Geometry2>;
|
||||
|
||||
switch (inner_id.source_index)
|
||||
{
|
||||
@ -178,7 +178,7 @@ template
|
||||
>
|
||||
struct assign_visitor
|
||||
{
|
||||
typedef typename RingMap::mapped_type ring_info_type;
|
||||
using ring_info_type = typename RingMap::mapped_type;
|
||||
|
||||
Geometry1 const& m_geometry1;
|
||||
Geometry2 const& m_geometry2;
|
||||
@ -254,16 +254,16 @@ inline void assign_parents(Geometry1 const& geometry1,
|
||||
static bool const is_dissolve = OverlayType == overlay_dissolve;
|
||||
static bool const check_for_orientation = is_buffer || is_dissolve;
|
||||
|
||||
typedef typename geometry::tag<Geometry1>::type tag1;
|
||||
typedef typename geometry::tag<Geometry2>::type tag2;
|
||||
using tag1 = geometry::tag_t<Geometry1>;
|
||||
using tag2 = geometry::tag_t<Geometry2>;
|
||||
|
||||
typedef typename RingMap::mapped_type ring_info_type;
|
||||
typedef typename ring_info_type::point_type point_type;
|
||||
typedef model::box<point_type> box_type;
|
||||
typedef typename geometry::area_result
|
||||
using ring_info_type = typename RingMap::mapped_type;
|
||||
using point_type = typename ring_info_type::point_type;
|
||||
using box_type = model::box<point_type>;
|
||||
using area_result_type = typename geometry::area_result
|
||||
<
|
||||
point_type, Strategy // TODO: point_type is technically incorrect
|
||||
>::type area_result_type;
|
||||
>::type;
|
||||
|
||||
{
|
||||
std::size_t count_total = ring_map.size();
|
||||
|
@ -100,7 +100,7 @@ class backtrack_check_self_intersections
|
||||
{}
|
||||
};
|
||||
public :
|
||||
typedef state state_type;
|
||||
using state_type = state;
|
||||
|
||||
template
|
||||
<
|
||||
@ -155,7 +155,7 @@ template
|
||||
class backtrack_debug
|
||||
{
|
||||
public :
|
||||
typedef backtrack_state state_type;
|
||||
using state_type = backtrack_state;
|
||||
|
||||
template <typename Operation, typename Rings, typename Turns>
|
||||
static inline void apply(std::size_t size_at_start,
|
||||
|
@ -54,7 +54,7 @@ template<typename Box, typename Point>
|
||||
class liang_barsky
|
||||
{
|
||||
private:
|
||||
typedef model::referring_segment<Point> segment_type;
|
||||
using segment_type = model::referring_segment<Point>;
|
||||
|
||||
template <typename CoordinateType, typename CalcType>
|
||||
inline bool check_edge(CoordinateType const& p, CoordinateType const& q, CalcType& t1, CalcType& t2) const
|
||||
@ -90,7 +90,7 @@ public:
|
||||
|
||||
// TODO: Temporary, this strategy should be moved, it is cartesian-only
|
||||
|
||||
typedef strategy::within::cartesian_point_point equals_point_point_strategy_type;
|
||||
using equals_point_point_strategy_type = strategy::within::cartesian_point_point;
|
||||
|
||||
static inline equals_point_point_strategy_type get_equals_point_point_strategy()
|
||||
{
|
||||
@ -99,8 +99,8 @@ public:
|
||||
|
||||
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;
|
||||
typedef typename select_most_precise<coordinate_type, double>::type calc_type;
|
||||
using coordinate_type = typename select_coordinate_type<Box, Point>::type;
|
||||
using calc_type = typename select_most_precise<coordinate_type, double>::type;
|
||||
|
||||
calc_type t1 = 0;
|
||||
calc_type t2 = 1;
|
||||
|
@ -25,8 +25,8 @@ namespace detail { namespace overlay
|
||||
template
|
||||
<
|
||||
typename Point,
|
||||
typename CoordinateType = typename geometry::coordinate_type<Point>::type,
|
||||
typename CsTag = typename geometry::cs_tag<Point>::type,
|
||||
typename CoordinateType = geometry::coordinate_type_t<Point>,
|
||||
typename CsTag = geometry::cs_tag_t<Point>,
|
||||
bool IsIntegral = std::is_integral<CoordinateType>::value
|
||||
>
|
||||
struct cluster_colocator
|
||||
|
@ -92,7 +92,7 @@ struct copy_segment_point_polygon
|
||||
// Call ring-version with the right ring
|
||||
return copy_segment_point_range
|
||||
<
|
||||
typename geometry::ring_type<Polygon>::type,
|
||||
geometry::ring_type_t<Polygon>,
|
||||
Reverse,
|
||||
SegmentIdentifier,
|
||||
PointOut
|
||||
@ -288,7 +288,7 @@ inline bool copy_segment_point(Geometry const& geometry,
|
||||
|
||||
return dispatch::copy_segment_point
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
tag_t<Geometry>,
|
||||
Geometry,
|
||||
Reverse,
|
||||
SegmentIdentifier,
|
||||
@ -322,7 +322,7 @@ inline bool copy_segment_point(Geometry1 const& geometry1, Geometry2 const& geom
|
||||
{
|
||||
return dispatch::copy_segment_point
|
||||
<
|
||||
typename tag<Geometry1>::type,
|
||||
tag_t<Geometry1>,
|
||||
Geometry1,
|
||||
Reverse1,
|
||||
SegmentIdentifier,
|
||||
@ -333,7 +333,7 @@ inline bool copy_segment_point(Geometry1 const& geometry1, Geometry2 const& geom
|
||||
{
|
||||
return dispatch::copy_segment_point
|
||||
<
|
||||
typename tag<Geometry2>::type,
|
||||
tag_t<Geometry2>,
|
||||
Geometry2,
|
||||
Reverse2,
|
||||
SegmentIdentifier,
|
||||
|
@ -349,7 +349,7 @@ inline void copy_segments(Geometry const& geometry,
|
||||
|
||||
dispatch::copy_segments
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
tag_t<Geometry>,
|
||||
Reverse
|
||||
>::apply(geometry, seg_id, to_index, strategy, range_out);
|
||||
}
|
||||
|
@ -0,0 +1,69 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2025 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2023-2024 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2017-2024.
|
||||
// Modifications copyright (c) 2017-2024 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TRAVERSE_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TRAVERSE_HPP
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
|
||||
#if defined(BOOST_GEOMETRY_DEBUG_INTERSECTION) \
|
||||
|| defined(BOOST_GEOMETRY_OVERLAY_REPORT_WKT) \
|
||||
|| defined(BOOST_GEOMETRY_DEBUG_TRAVERSE)
|
||||
# include <string>
|
||||
# include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
|
||||
# include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace overlay
|
||||
{
|
||||
|
||||
template <typename Turn, typename Operation>
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_TRAVERSE
|
||||
inline void debug_traverse(Turn const& turn, Operation op,
|
||||
std::string const& header, bool condition = true)
|
||||
{
|
||||
if (! condition)
|
||||
{
|
||||
return;
|
||||
}
|
||||
std::cout << " " << header
|
||||
<< " at " << op.seg_id
|
||||
<< " meth: " << method_char(turn.method)
|
||||
<< " op: " << operation_char(op.operation)
|
||||
<< " of: " << operation_char(turn.operations[0].operation)
|
||||
<< operation_char(turn.operations[1].operation)
|
||||
<< " " << geometry::wkt(turn.point)
|
||||
<< std::endl;
|
||||
|
||||
if (boost::contains(header, "Finished"))
|
||||
{
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
#else
|
||||
inline void debug_traverse(Turn const& , Operation, const char*, bool = true)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
}} // namespace detail::overlay
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TRAVERSE_HPP
|
@ -104,8 +104,7 @@ inline void enrich_sort(Operations& operations,
|
||||
|
||||
// Assign travel-to-vertex/ip index for each turn.
|
||||
template <typename Operations, typename Turns>
|
||||
inline void enrich_assign(Operations& operations, Turns& turns,
|
||||
bool check_consecutive_turns)
|
||||
inline void enrich_assign(Operations& operations, Turns& turns)
|
||||
{
|
||||
for (auto const& item : util::enumerate(operations))
|
||||
{
|
||||
@ -131,34 +130,6 @@ inline void enrich_assign(Operations& operations, Turns& turns,
|
||||
return next_turn.operations[operations[next_index].operation_index];
|
||||
};
|
||||
|
||||
if (check_consecutive_turns
|
||||
&& indexed.turn_index == operations[next_index].turn_index
|
||||
&& op.seg_id == next_operation().seg_id)
|
||||
{
|
||||
// If the two operations on the same turn are ordered consecutively,
|
||||
// and they are on the same segment, then the turn where to travel to should
|
||||
// be considered one further. Therefore next is increased.
|
||||
//
|
||||
// It often happens in buffer, in these configurations:
|
||||
// +---->--+
|
||||
// | |
|
||||
// | +->-*---->
|
||||
// | | |
|
||||
// ^ +-<-+
|
||||
// If the next index is not corrected, the small rectangle
|
||||
// will be kept in the output.
|
||||
|
||||
// This is a normal situation and occurs, for example, in every concave bend.
|
||||
// In general it should always travel from turn to next turn.
|
||||
// Only in some circumstances traveling to the same turn is necessary, for example
|
||||
// if there is only one turn in the outer ring.
|
||||
//
|
||||
// (For dissolve this is not done, turn_index is often
|
||||
// the same for two consecutive operations - but the conditions are changed
|
||||
// and this should be verified again)
|
||||
next_index = advance(next_index);
|
||||
}
|
||||
|
||||
// Cluster behaviour: next should point after cluster, unless
|
||||
// their seg_ids are not the same
|
||||
// (For dissolve, this is still to be examined - TODO)
|
||||
@ -167,6 +138,7 @@ inline void enrich_assign(Operations& operations, Turns& turns,
|
||||
&& op.seg_id == next_operation().seg_id
|
||||
&& indexed.turn_index != operations[next_index].turn_index)
|
||||
{
|
||||
// In same cluster, on same segment, but not same turn
|
||||
next_index = advance(next_index);
|
||||
}
|
||||
|
||||
@ -285,45 +257,52 @@ struct enriched_map_default_include_policy
|
||||
// Add all (non discarded) operations on this ring
|
||||
// Blocked operations or uu on clusters (for intersection)
|
||||
// should be included, to block potential paths in clusters
|
||||
template <typename Turns, typename MappedVector, typename IncludePolicy>
|
||||
inline void create_map(Turns const& turns, MappedVector& mapped_vector,
|
||||
IncludePolicy const& include_policy)
|
||||
template <typename Turns, typename IncludePolicy>
|
||||
inline auto create_map(Turns const& turns, IncludePolicy const& include_policy)
|
||||
{
|
||||
using turn_type = typename boost::range_value<Turns>::type;
|
||||
using indexed_turn_operation = detail::overlay::indexed_turn_operation
|
||||
<
|
||||
typename turn_type::turn_operation_type
|
||||
>;
|
||||
|
||||
std::map
|
||||
<
|
||||
ring_identifier,
|
||||
std::vector<indexed_turn_operation>
|
||||
> mapped_vector;
|
||||
|
||||
for (auto const& turn_item : util::enumerate(turns))
|
||||
{
|
||||
auto const& index = turn_item.index;
|
||||
auto const& turn = turn_item.value;
|
||||
if (! turn.discarded)
|
||||
if (turn.discarded)
|
||||
{
|
||||
for (auto const& op_item : util::enumerate(turn.operations))
|
||||
continue;
|
||||
}
|
||||
|
||||
for (auto const& op_item : util::enumerate(turn.operations))
|
||||
{
|
||||
auto const& op_index = op_item.index;
|
||||
auto const& op = op_item.value;
|
||||
if (include_policy.include(op.operation))
|
||||
{
|
||||
auto const& op_index = op_item.index;
|
||||
auto const& op = op_item.value;
|
||||
if (include_policy.include(op.operation))
|
||||
{
|
||||
ring_identifier const ring_id
|
||||
(
|
||||
op.seg_id.source_index,
|
||||
op.seg_id.multi_index,
|
||||
op.seg_id.ring_index
|
||||
);
|
||||
mapped_vector[ring_id].emplace_back
|
||||
(
|
||||
index, op_index, op, turn.operations[1 - op_index].seg_id
|
||||
);
|
||||
}
|
||||
mapped_vector[ring_id_by_seg_id(op.seg_id)].emplace_back
|
||||
(
|
||||
index, op_index, op, turn.operations[1 - op_index].seg_id
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mapped_vector;
|
||||
}
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
inline typename geometry::coordinate_type<Point1>::type
|
||||
distance_measure(Point1 const& a, Point2 const& b)
|
||||
inline geometry::coordinate_type_t<Point1> distance_measure(Point1 const& a, Point2 const& b)
|
||||
{
|
||||
// TODO: use comparable distance for point-point instead - but that
|
||||
// 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 dy = get<1>(a) - get<1>(b);
|
||||
return dx * dx + dy * dy;
|
||||
@ -357,7 +336,6 @@ inline void calculate_remaining_distance(Turns& turns)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}} // namespace detail::overlay
|
||||
#endif //DOXYGEN_NO_DETAIL
|
||||
|
||||
@ -399,51 +377,14 @@ inline void enrich_intersection_points(Turns& turns,
|
||||
? detail::overlay::operation_intersection
|
||||
: detail::overlay::operation_union;
|
||||
constexpr bool is_dissolve = OverlayType == overlay_dissolve;
|
||||
constexpr bool is_buffer = OverlayType == overlay_buffer;
|
||||
|
||||
using turn_type = typename boost::range_value<Turns>::type;
|
||||
using indexed_turn_operation = detail::overlay::indexed_turn_operation
|
||||
<
|
||||
typename turn_type::turn_operation_type
|
||||
> ;
|
||||
|
||||
using mapped_vector_type = std::map
|
||||
<
|
||||
ring_identifier,
|
||||
std::vector<indexed_turn_operation>
|
||||
>;
|
||||
|
||||
// Turns are often used by index (in clusters, next_index, etc)
|
||||
// and turns may therefore NOT be DELETED - they may only be flagged as discarded
|
||||
|
||||
bool has_cc = false;
|
||||
bool has_colocations = false;
|
||||
|
||||
if BOOST_GEOMETRY_CONSTEXPR (! is_buffer)
|
||||
{
|
||||
// Handle colocations, gathering clusters and (below) their properties.
|
||||
has_colocations = detail::overlay::handle_colocations
|
||||
<
|
||||
Reverse1, Reverse2, OverlayType, Geometry1, Geometry2
|
||||
>(turns, clusters);
|
||||
// Gather cluster properties (using even clusters with
|
||||
// discarded turns - for open turns)
|
||||
detail::overlay::gather_cluster_properties
|
||||
<
|
||||
Reverse1,
|
||||
Reverse2,
|
||||
OverlayType
|
||||
>(clusters, turns, target_operation,
|
||||
geometry1, geometry2, strategy);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For buffer, this was already done before calling enrich_intersection_points.
|
||||
has_colocations = ! clusters.empty();
|
||||
}
|
||||
|
||||
discard_duplicate_turns(turns, geometry1, geometry2);
|
||||
|
||||
bool has_cc = false;
|
||||
|
||||
// Discard turns not part of target overlay
|
||||
for (auto& turn : turns)
|
||||
{
|
||||
@ -457,8 +398,6 @@ inline void enrich_intersection_points(Turns& turns,
|
||||
// For all operations, discard xx and none/none
|
||||
// For intersections, remove uu to avoid the need to travel
|
||||
// a union (during intersection) in uu/cc clusters (e.g. #31,#32,#33)
|
||||
// The ux is necessary to indicate impossible paths
|
||||
// (especially if rescaling is removed)
|
||||
|
||||
// Similarly, for union, discard ii and ix
|
||||
|
||||
@ -492,11 +431,15 @@ inline void enrich_intersection_points(Turns& turns,
|
||||
strategy);
|
||||
}
|
||||
|
||||
if (! clusters.empty())
|
||||
{
|
||||
detail::overlay::cleanup_clusters(turns, clusters);
|
||||
detail::overlay::colocate_clusters(clusters, turns);
|
||||
}
|
||||
|
||||
// Create a map of vectors of indexed operation-types to be able
|
||||
// to sort intersection points PER RING
|
||||
mapped_vector_type mapped_vector;
|
||||
|
||||
detail::overlay::create_map(turns, mapped_vector,
|
||||
auto mapped_vector = detail::overlay::create_map(turns,
|
||||
detail::overlay::enriched_map_default_include_policy());
|
||||
|
||||
for (auto& pair : mapped_vector)
|
||||
@ -507,12 +450,6 @@ inline void enrich_intersection_points(Turns& turns,
|
||||
strategy);
|
||||
}
|
||||
|
||||
if (has_colocations)
|
||||
{
|
||||
detail::overlay::cleanup_clusters(turns, clusters);
|
||||
detail::overlay::colocate_clusters(clusters, turns);
|
||||
}
|
||||
|
||||
// After cleaning up clusters assign the next turns
|
||||
|
||||
for (auto& pair : mapped_vector)
|
||||
@ -525,7 +462,7 @@ inline void enrich_intersection_points(Turns& turns,
|
||||
detail::overlay::enrich_adapt(pair.second, turns);
|
||||
}
|
||||
|
||||
detail::overlay::enrich_assign(pair.second, turns, ! is_dissolve);
|
||||
detail::overlay::enrich_assign(pair.second, turns);
|
||||
}
|
||||
|
||||
if (has_cc)
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <boost/geometry/algorithms/detail/covered_by/implementation.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/append_no_duplicates.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/debug_traverse.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/point_on_border.hpp>
|
||||
#include <boost/geometry/algorithms/detail/relate/turns.hpp>
|
||||
@ -164,7 +165,7 @@ inline bool is_touching(Turn const& turn, Operation const& op,
|
||||
template
|
||||
<
|
||||
typename GeometryOut,
|
||||
typename Tag = typename geometry::tag<GeometryOut>::type
|
||||
typename Tag = geometry::tag_t<GeometryOut>
|
||||
>
|
||||
struct add_isolated_point
|
||||
{};
|
||||
@ -297,7 +298,7 @@ struct action_selector<overlay_intersection, RemoveSpikes>
|
||||
template <bool RemoveSpikes>
|
||||
struct action_selector<overlay_difference, RemoveSpikes>
|
||||
{
|
||||
typedef action_selector<overlay_intersection, RemoveSpikes> normal_action;
|
||||
using normal_action = action_selector<overlay_intersection, RemoveSpikes>;
|
||||
|
||||
template
|
||||
<
|
||||
@ -382,14 +383,14 @@ template
|
||||
>
|
||||
class follow
|
||||
{
|
||||
typedef geometry::detail::output_geometry_access
|
||||
using linear = geometry::detail::output_geometry_access
|
||||
<
|
||||
GeometryOut, linestring_tag, linestring_tag
|
||||
> linear;
|
||||
typedef geometry::detail::output_geometry_access
|
||||
>;
|
||||
using pointlike = geometry::detail::output_geometry_access
|
||||
<
|
||||
GeometryOut, point_tag, linestring_tag
|
||||
> pointlike;
|
||||
>;
|
||||
|
||||
public :
|
||||
|
||||
@ -413,17 +414,17 @@ public :
|
||||
OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef following::action_selector<OverlayType, RemoveSpikes> action;
|
||||
using action = following::action_selector<OverlayType, RemoveSpikes>;
|
||||
|
||||
// Sort intersection points on segments-along-linestring, and distance
|
||||
// (like in enrich is done for poly/poly)
|
||||
// sort turns by Linear seg_id, then by fraction, then
|
||||
// for same ring id: x, u, i, c
|
||||
// for different ring id: c, i, u, x
|
||||
typedef relate::turns::less
|
||||
using turn_less = relate::turns::less
|
||||
<
|
||||
0, relate::turns::less_op_linear_areal_single<0>, Strategy
|
||||
> turn_less;
|
||||
>;
|
||||
std::sort(boost::begin(turns), boost::end(turns), turn_less());
|
||||
|
||||
typename linear::type current_piece;
|
||||
|
@ -181,16 +181,16 @@ class follow_linestring_linear
|
||||
{
|
||||
protected:
|
||||
// allow spikes (false indicates: do not remove spikes)
|
||||
typedef following::action_selector<OverlayType, false> action;
|
||||
using action = following::action_selector<OverlayType, false>;
|
||||
|
||||
typedef geometry::detail::output_geometry_access
|
||||
using linear = geometry::detail::output_geometry_access
|
||||
<
|
||||
GeometryOut, linestring_tag, linestring_tag
|
||||
> linear;
|
||||
typedef geometry::detail::output_geometry_access
|
||||
>;
|
||||
using pointlike = geometry::detail::output_geometry_access
|
||||
<
|
||||
GeometryOut, point_tag, linestring_tag
|
||||
> pointlike;
|
||||
>;
|
||||
|
||||
template
|
||||
<
|
||||
@ -363,20 +363,20 @@ class follow_multilinestring_linear
|
||||
>
|
||||
{
|
||||
protected:
|
||||
typedef typename boost::range_value<MultiLinestring>::type Linestring;
|
||||
using linestring_t = typename boost::range_value<MultiLinestring>::type;
|
||||
|
||||
typedef follow_linestring_linear
|
||||
using base_t = follow_linestring_linear
|
||||
<
|
||||
LinestringOut, Linestring, Linear,
|
||||
LinestringOut, linestring_t, Linear,
|
||||
OverlayType, FollowIsolatedPoints, FollowContinueTurns
|
||||
> Base;
|
||||
>;
|
||||
|
||||
typedef following::action_selector<OverlayType> action;
|
||||
using action = following::action_selector<OverlayType>;
|
||||
|
||||
typedef typename boost::range_iterator
|
||||
using linestring_iterator = typename boost::range_iterator
|
||||
<
|
||||
MultiLinestring const
|
||||
>::type linestring_iterator;
|
||||
>::type;
|
||||
|
||||
|
||||
template <typename OutputIt, overlay_type OT>
|
||||
@ -439,10 +439,10 @@ public:
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT( first != beyond );
|
||||
|
||||
typedef copy_linestrings_in_range
|
||||
using copy_linestrings = copy_linestrings_in_range
|
||||
<
|
||||
OutputIterator, OverlayType
|
||||
> copy_linestrings;
|
||||
>;
|
||||
|
||||
linestring_iterator ls_first = boost::begin(multilinestring);
|
||||
linestring_iterator ls_beyond = boost::end(multilinestring);
|
||||
@ -464,7 +464,7 @@ public:
|
||||
per_ls_next = std::find_if(per_ls_current, beyond,
|
||||
has_other_multi_id(current_multi_id));
|
||||
|
||||
oit = Base::apply(*(ls_first + current_multi_id),
|
||||
oit = base_t::apply(*(ls_first + current_multi_id),
|
||||
linear, per_ls_current, per_ls_next, oit, strategy);
|
||||
|
||||
signed_size_type next_multi_id = -1;
|
||||
@ -499,7 +499,7 @@ template
|
||||
overlay_type OverlayType,
|
||||
bool FollowIsolatedPoints,
|
||||
bool FollowContinueTurns,
|
||||
typename TagIn1 = typename tag<Geometry1>::type
|
||||
typename TagIn1 = tag_t<Geometry1>
|
||||
>
|
||||
struct follow
|
||||
: not_implemented<Geometry1>
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
template <typename P>
|
||||
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
|
||||
= common_approximately_equals_epsilon_multiplier<coor_t>::value();
|
||||
return approximately_equals(p1, p2, tolerance);
|
||||
@ -101,7 +101,7 @@ inline void get_clusters(Turns& turns, Clusters& clusters)
|
||||
|
||||
sweep_equal_policy
|
||||
<
|
||||
std::is_integral<typename coordinate_type<point_type>::type>::value
|
||||
std::is_integral<coordinate_type_t<point_type>>::value
|
||||
> equal_policy;
|
||||
|
||||
std::vector<turn_with_point<point_type>> points;
|
||||
|
@ -55,12 +55,12 @@ struct get_turn_without_info
|
||||
Strategy const& strategy,
|
||||
OutputIterator out)
|
||||
{
|
||||
typedef typename TurnInfo::point_type turn_point_type;
|
||||
using turn_point_type = typename TurnInfo::point_type;
|
||||
|
||||
typedef policies::relate::segments_intersection_points
|
||||
using policy_type = policies::relate::segments_intersection_points
|
||||
<
|
||||
segment_intersection_points<turn_point_type>
|
||||
> policy_type;
|
||||
>;
|
||||
|
||||
typename policy_type::return_type const result
|
||||
= strategy.relate().apply(range_p, range_q, policy_type());
|
||||
@ -96,12 +96,12 @@ inline void get_intersection_points(Geometry1 const& geometry1,
|
||||
{
|
||||
concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
|
||||
|
||||
typedef detail::get_intersection_points::get_turn_without_info
|
||||
<
|
||||
point_type_t<Geometry1>,
|
||||
point_type_t<Geometry2>,
|
||||
typename boost::range_value<Turns>::type
|
||||
> TurnPolicy;
|
||||
using turn_policy_t = detail::get_intersection_points::get_turn_without_info
|
||||
<
|
||||
point_type_t<Geometry1>,
|
||||
point_type_t<Geometry2>,
|
||||
typename boost::range_value<Turns>::type
|
||||
>;
|
||||
|
||||
detail::get_turns::no_interrupt_policy interrupt_policy;
|
||||
|
||||
@ -110,19 +110,19 @@ inline void get_intersection_points(Geometry1 const& geometry1,
|
||||
reverse_dispatch<Geometry1, Geometry2>::type::value,
|
||||
dispatch::get_turns_reversed
|
||||
<
|
||||
typename tag<Geometry1>::type,
|
||||
typename tag<Geometry2>::type,
|
||||
tag_t<Geometry1>,
|
||||
tag_t<Geometry2>,
|
||||
Geometry1, Geometry2,
|
||||
false, false,
|
||||
TurnPolicy
|
||||
turn_policy_t
|
||||
>,
|
||||
dispatch::get_turns
|
||||
<
|
||||
typename tag<Geometry1>::type,
|
||||
typename tag<Geometry2>::type,
|
||||
tag_t<Geometry1>,
|
||||
tag_t<Geometry2>,
|
||||
Geometry1, Geometry2,
|
||||
false, false,
|
||||
TurnPolicy
|
||||
turn_policy_t
|
||||
>
|
||||
>::apply(0, geometry1,
|
||||
1, geometry2,
|
||||
|
@ -83,7 +83,7 @@ template<>
|
||||
struct get_ring<polygon_tag>
|
||||
{
|
||||
template<typename Polygon>
|
||||
static inline typename ring_return_type<Polygon const>::type const apply(
|
||||
static inline ring_return_type_t<Polygon const> const apply(
|
||||
ring_identifier const& id,
|
||||
Polygon const& polygon)
|
||||
{
|
||||
@ -103,7 +103,7 @@ template<>
|
||||
struct get_ring<multi_polygon_tag>
|
||||
{
|
||||
template<typename MultiPolygon>
|
||||
static inline typename ring_type<MultiPolygon>::type const& apply(
|
||||
static inline ring_type_t<MultiPolygon> const& apply(
|
||||
ring_identifier const& id,
|
||||
MultiPolygon const& multi_polygon)
|
||||
{
|
||||
@ -122,7 +122,7 @@ template <typename Geometry>
|
||||
inline signed_size_type segment_count_on_ring(Geometry const& geometry,
|
||||
ring_identifier const& ring_id)
|
||||
{
|
||||
using tag = typename geometry::tag<Geometry>::type;
|
||||
using tag = geometry::tag_t<Geometry>;
|
||||
|
||||
// A closed polygon, a triangle of 4 points, including starting point,
|
||||
// contains 3 segments. So handle as if it is closed, and subtract one.
|
||||
|
@ -216,7 +216,7 @@ struct turn_info_verification_functions
|
||||
BOOST_GEOMETRY_ASSERT(index_p > 0 && index_p <= 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 q_in_range = index_q < range_q.size();
|
||||
@ -1424,12 +1424,12 @@ struct get_turn_info
|
||||
UmbrellaStrategy const& umbrella_strategy,
|
||||
OutputIterator out)
|
||||
{
|
||||
typedef intersection_info
|
||||
using inters_info = intersection_info
|
||||
<
|
||||
UniqueSubRange1, UniqueSubRange2,
|
||||
typename TurnInfo::point_type,
|
||||
UmbrellaStrategy
|
||||
> inters_info;
|
||||
>;
|
||||
|
||||
inters_info inters(range_p, range_q, umbrella_strategy);
|
||||
|
||||
|
@ -231,7 +231,7 @@ private:
|
||||
template <bool EnableFirst, bool EnableLast>
|
||||
struct get_turn_info_for_endpoint
|
||||
{
|
||||
typedef std::pair<operation_type, operation_type> operations_pair;
|
||||
using operations_pair = std::pair<operation_type, operation_type>;
|
||||
|
||||
BOOST_STATIC_ASSERT(EnableFirst || EnableLast);
|
||||
|
||||
|
@ -48,7 +48,7 @@ template
|
||||
>
|
||||
struct side_calculator
|
||||
{
|
||||
typedef decltype(std::declval<Strategy>().side()) side_strategy_type;
|
||||
using side_strategy_type = decltype(std::declval<Strategy>().side());
|
||||
|
||||
inline side_calculator(UniqueSubRange1 const& range_p,
|
||||
UniqueSubRange2 const& range_q,
|
||||
@ -98,23 +98,23 @@ class intersection_info_base
|
||||
{
|
||||
public:
|
||||
|
||||
typedef segment_intersection_points<TurnPoint> intersection_point_type;
|
||||
typedef policies::relate::segments_intersection_policy
|
||||
using intersection_point_type = segment_intersection_points<TurnPoint>;
|
||||
using intersection_policy_type = policies::relate::segments_intersection_policy
|
||||
<
|
||||
intersection_point_type
|
||||
> intersection_policy_type;
|
||||
>;
|
||||
|
||||
typedef typename intersection_policy_type::return_type result_type;
|
||||
using result_type = typename intersection_policy_type::return_type;
|
||||
|
||||
typedef side_calculator
|
||||
using side_calculator_type = side_calculator
|
||||
<
|
||||
UniqueSubRange1, UniqueSubRange2, UmbrellaStrategy
|
||||
> side_calculator_type;
|
||||
>;
|
||||
|
||||
typedef side_calculator
|
||||
using swapped_side_calculator_type = side_calculator
|
||||
<
|
||||
UniqueSubRange2, UniqueSubRange1, UmbrellaStrategy
|
||||
> swapped_side_calculator_type;
|
||||
>;
|
||||
|
||||
intersection_info_base(UniqueSubRange1 const& range_p,
|
||||
UniqueSubRange2 const& range_q,
|
||||
@ -168,18 +168,18 @@ class intersection_info
|
||||
: public intersection_info_base<UniqueSubRange1, UniqueSubRange2,
|
||||
TurnPoint, UmbrellaStrategy>
|
||||
{
|
||||
typedef intersection_info_base<UniqueSubRange1, UniqueSubRange2,
|
||||
TurnPoint, UmbrellaStrategy> base;
|
||||
using base = intersection_info_base<UniqueSubRange1, UniqueSubRange2,
|
||||
TurnPoint, UmbrellaStrategy>;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename UmbrellaStrategy::cs_tag cs_tag;
|
||||
using cs_tag = typename UmbrellaStrategy::cs_tag;
|
||||
|
||||
typedef typename base::side_calculator_type side_calculator_type;
|
||||
typedef typename base::result_type result_type;
|
||||
using side_calculator_type = typename base::side_calculator_type;
|
||||
using result_type = typename base::result_type;
|
||||
|
||||
typedef typename result_type::intersection_points_type i_info_type;
|
||||
typedef typename result_type::direction_type d_info_type;
|
||||
using i_info_type = typename result_type::intersection_points_type;
|
||||
using d_info_type = typename result_type::direction_type;
|
||||
|
||||
intersection_info(UniqueSubRange1 const& range_p,
|
||||
UniqueSubRange2 const& range_q,
|
||||
|
@ -54,12 +54,12 @@ struct get_turn_info_linear_areal
|
||||
UmbrellaStrategy const& umbrella_strategy,
|
||||
OutputIterator out)
|
||||
{
|
||||
typedef intersection_info
|
||||
using inters_info = intersection_info
|
||||
<
|
||||
UniqueSubRange1, UniqueSubRange2,
|
||||
typename TurnInfo::point_type,
|
||||
UmbrellaStrategy
|
||||
> inters_info;
|
||||
>;
|
||||
|
||||
inters_info inters(range_p, range_q, umbrella_strategy);
|
||||
|
||||
@ -702,7 +702,7 @@ struct get_turn_info_linear_areal
|
||||
Strategy const& strategy)
|
||||
{
|
||||
namespace ov = overlay;
|
||||
typedef ov::get_turn_info_for_endpoint<EnableFirst, EnableLast> get_info_e;
|
||||
using get_info_e = ov::get_turn_info_for_endpoint<EnableFirst, EnableLast>;
|
||||
|
||||
std::size_t const ip_count = inters.i_info().count;
|
||||
// no intersection points
|
||||
|
@ -49,12 +49,12 @@ struct get_turn_info_linear_linear
|
||||
UmbrellaStrategy const& umbrella_strategy,
|
||||
OutputIterator out)
|
||||
{
|
||||
typedef intersection_info
|
||||
using inters_info = intersection_info
|
||||
<
|
||||
UniqueSubRange1, UniqueSubRange2,
|
||||
typename TurnInfo::point_type,
|
||||
UmbrellaStrategy
|
||||
> inters_info;
|
||||
>;
|
||||
|
||||
inters_info inters(range_p, range_q, umbrella_strategy);
|
||||
|
||||
|
@ -200,13 +200,13 @@ class get_turns_in_sections
|
||||
{
|
||||
using range1_view = detail::closed_clockwise_view
|
||||
<
|
||||
typename ring_type<Geometry1>::type const,
|
||||
ring_type_t<Geometry1> const,
|
||||
geometry::closure<Geometry1>::value,
|
||||
Reverse1 ? counterclockwise : clockwise
|
||||
>;
|
||||
using range2_view = detail::closed_clockwise_view
|
||||
<
|
||||
typename ring_type<Geometry2>::type const,
|
||||
ring_type_t<Geometry2> const,
|
||||
geometry::closure<Geometry2>::value,
|
||||
Reverse2 ? counterclockwise : clockwise
|
||||
>;
|
||||
@ -357,7 +357,7 @@ public :
|
||||
*prev2, *it2,
|
||||
strategy);
|
||||
|
||||
typedef typename boost::range_value<Turns>::type turn_info;
|
||||
using turn_info = typename boost::range_value<Turns>::type;
|
||||
|
||||
turn_info ti;
|
||||
ti.operations[0].seg_id
|
||||
@ -390,8 +390,8 @@ public :
|
||||
|
||||
|
||||
private :
|
||||
typedef typename geometry::point_type<Geometry1>::type point1_type;
|
||||
typedef typename geometry::point_type<Geometry2>::type point2_type;
|
||||
using point1_type = geometry::point_type_t<Geometry1>;
|
||||
using point2_type = geometry::point_type_t<Geometry2>;
|
||||
|
||||
// It is NOT possible to have section-iterators here
|
||||
// because of the logistics of "index" (the section-iterator automatically
|
||||
@ -496,14 +496,14 @@ public:
|
||||
InterruptPolicy& interrupt_policy)
|
||||
{
|
||||
// First create monotonic sections...
|
||||
typedef typename boost::range_value<Turns>::type ip_type;
|
||||
typedef typename ip_type::point_type point_type;
|
||||
using ip_type = typename boost::range_value<Turns>::type;
|
||||
using point_type = typename ip_type::point_type;
|
||||
|
||||
typedef model::box<point_type> box_type;
|
||||
typedef geometry::sections<box_type, 2> sections_type;
|
||||
using box_type = model::box<point_type>;
|
||||
using sections_type = geometry::sections<box_type, 2>;
|
||||
|
||||
sections_type sec1, sec2;
|
||||
typedef std::integer_sequence<std::size_t, 0, 1> dimensions;
|
||||
using dimensions = std::integer_sequence<std::size_t, 0, 1>;
|
||||
|
||||
geometry::sectionalize<Reverse1, dimensions>(geometry1,
|
||||
sec1, strategy, 0);
|
||||
@ -540,9 +540,9 @@ template
|
||||
>
|
||||
struct get_turns_cs
|
||||
{
|
||||
typedef typename geometry::point_type<Range>::type range_point_type;
|
||||
typedef typename geometry::point_type<Box>::type box_point_type;
|
||||
typedef std::array<box_point_type, 4> box_array;
|
||||
using range_point_type = geometry::point_type_t<Range>;
|
||||
using box_point_type = geometry::point_type_t<Box>;
|
||||
using box_array = std::array<box_point_type, 4>;
|
||||
|
||||
using view_type = detail::closed_clockwise_view
|
||||
<
|
||||
@ -555,7 +555,7 @@ struct get_turns_cs
|
||||
|
||||
struct unique_sub_range_from_box_policy
|
||||
{
|
||||
typedef box_point_type point_type;
|
||||
using point_type = box_point_type;
|
||||
|
||||
unique_sub_range_from_box_policy(box_array const& box)
|
||||
: m_box(box)
|
||||
@ -584,7 +584,7 @@ struct get_turns_cs
|
||||
|
||||
struct unique_sub_range_from_view_policy
|
||||
{
|
||||
typedef range_point_type point_type;
|
||||
using point_type = range_point_type;
|
||||
|
||||
unique_sub_range_from_view_policy(view_type const& view, point_type const& pi, point_type const& pj, iterator_type it)
|
||||
: m_view(view)
|
||||
@ -684,7 +684,7 @@ private:
|
||||
|
||||
// Depending on code some relations can be left out
|
||||
|
||||
typedef typename boost::range_value<Turns>::type turn_info;
|
||||
using turn_info = typename boost::range_value<Turns>::type;
|
||||
|
||||
turn_info ti;
|
||||
ti.operations[0].seg_id = seg_id;
|
||||
@ -740,14 +740,12 @@ struct get_turns_polygon_cs
|
||||
InterruptPolicy& interrupt_policy,
|
||||
signed_size_type multi_index = -1)
|
||||
{
|
||||
typedef typename geometry::ring_type<Polygon>::type ring_type;
|
||||
|
||||
typedef detail::get_turns::get_turns_cs
|
||||
using intersector_type = detail::get_turns::get_turns_cs
|
||||
<
|
||||
ring_type, Box,
|
||||
geometry::ring_type_t<Polygon>, Box,
|
||||
Reverse, ReverseBox,
|
||||
TurnPolicy
|
||||
> intersector_type;
|
||||
>;
|
||||
|
||||
intersector_type::apply(
|
||||
source_id1, geometry::exterior_ring(polygon),
|
||||
@ -815,9 +813,15 @@ struct topological_tag_base
|
||||
using type = tag_cast_t<tag_t<Geometry>, pointlike_tag, linear_tag, areal_tag>;
|
||||
};
|
||||
|
||||
template <typename Geometry1, typename Geometry2, typename AssignPolicy,
|
||||
typename Tag1 = typename tag<Geometry1>::type, typename Tag2 = typename tag<Geometry2>::type,
|
||||
typename TagBase1 = typename topological_tag_base<Geometry1>::type, typename TagBase2 = typename topological_tag_base<Geometry2>::type>
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename AssignPolicy,
|
||||
typename Tag1 = tag_t<Geometry1>,
|
||||
typename Tag2 = tag_t<Geometry2>,
|
||||
typename TagBase1 = typename topological_tag_base<Geometry1>::type,
|
||||
typename TagBase2 = typename topological_tag_base<Geometry2>::type
|
||||
>
|
||||
struct get_turn_info_type
|
||||
: overlay::get_turn_info<AssignPolicy>
|
||||
{};
|
||||
@ -833,8 +837,9 @@ struct get_turn_info_type<Geometry1, Geometry2, AssignPolicy, Tag1, Tag2, linear
|
||||
{};
|
||||
|
||||
template <typename Geometry1, typename Geometry2, typename Point, typename SegmentRatio,
|
||||
typename Tag1 = typename tag<Geometry1>::type, typename Tag2 = typename tag<Geometry2>::type,
|
||||
typename TagBase1 = typename topological_tag_base<Geometry1>::type, typename TagBase2 = typename topological_tag_base<Geometry2>::type>
|
||||
typename Tag1 = tag_t<Geometry1>, typename Tag2 = tag_t<Geometry2>,
|
||||
typename TagBase1 = typename topological_tag_base<Geometry1>::type,
|
||||
typename TagBase2 = typename topological_tag_base<Geometry2>::type>
|
||||
struct turn_operation_type
|
||||
{
|
||||
using type = overlay::turn_operation<Point, SegmentRatio>;
|
||||
@ -1009,27 +1014,29 @@ inline void get_turns(Geometry1 const& geometry1,
|
||||
{
|
||||
concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
|
||||
|
||||
typedef detail::overlay::get_turn_info<AssignPolicy> TurnPolicy;
|
||||
//typedef detail::get_turns::get_turn_info_type<Geometry1, Geometry2, AssignPolicy> TurnPolicy;
|
||||
using turn_policy_t = detail::overlay::get_turn_info<AssignPolicy>;
|
||||
// Using get_turn_info_type would be more generic. But that is currently not compiling,
|
||||
// because it misses the is_collinear field as used later in the algorithm.
|
||||
// using turn_policy_t = detail::get_turns::get_turn_info_type<Geometry1, Geometry2, AssignPolicy>;
|
||||
|
||||
std::conditional_t
|
||||
<
|
||||
reverse_dispatch<Geometry1, Geometry2>::type::value,
|
||||
dispatch::get_turns_reversed
|
||||
<
|
||||
typename tag<Geometry1>::type,
|
||||
typename tag<Geometry2>::type,
|
||||
tag_t<Geometry1>,
|
||||
tag_t<Geometry2>,
|
||||
Geometry1, Geometry2,
|
||||
Reverse1, Reverse2,
|
||||
TurnPolicy
|
||||
turn_policy_t
|
||||
>,
|
||||
dispatch::get_turns
|
||||
<
|
||||
typename tag<Geometry1>::type,
|
||||
typename tag<Geometry2>::type,
|
||||
tag_t<Geometry1>,
|
||||
tag_t<Geometry2>,
|
||||
Geometry1, Geometry2,
|
||||
Reverse1, Reverse2,
|
||||
TurnPolicy
|
||||
turn_policy_t
|
||||
>
|
||||
>::apply(0, geometry1,
|
||||
1, geometry2,
|
||||
|
@ -260,7 +260,7 @@ template
|
||||
inline void check_colocation(bool& has_blocked,
|
||||
signed_size_type cluster_id, Turns const& turns, Clusters const& clusters)
|
||||
{
|
||||
typedef typename boost::range_value<Turns>::type turn_type;
|
||||
using turn_type = typename boost::range_value<Turns>::type;
|
||||
|
||||
has_blocked = false;
|
||||
|
||||
@ -364,23 +364,6 @@ inline bool handle_colocations(Turns& turns, Clusters& clusters)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
struct is_turn_index
|
||||
{
|
||||
is_turn_index(signed_size_type index)
|
||||
: m_index(index)
|
||||
{}
|
||||
|
||||
template <typename Indexed>
|
||||
inline bool operator()(Indexed const& indexed) const
|
||||
{
|
||||
// Indexed is a indexed_turn_operation<Operation>
|
||||
return indexed.turn_index == m_index;
|
||||
}
|
||||
|
||||
signed_size_type m_index;
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Sbs,
|
||||
@ -431,16 +414,15 @@ inline void gather_cluster_properties(Clusters& clusters, Turns& turns,
|
||||
Geometry1 const& geometry1, Geometry2 const& geometry2,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename boost::range_value<Turns>::type turn_type;
|
||||
typedef typename turn_type::point_type point_type;
|
||||
typedef typename turn_type::turn_operation_type turn_operation_type;
|
||||
using turn_type = typename boost::range_value<Turns>::type;
|
||||
using point_type = typename turn_type::point_type;
|
||||
using turn_operation_type = typename turn_type::turn_operation_type;
|
||||
|
||||
// Define sorter, sorting counter-clockwise such that polygons are on the
|
||||
// right side
|
||||
typedef sort_by_side::side_sorter
|
||||
// Define sorter, sorting counter-clockwise such that polygons are on the right side
|
||||
using sbs_type = sort_by_side::side_sorter
|
||||
<
|
||||
Reverse1, Reverse2, OverlayType, point_type, Strategy, std::less<int>
|
||||
> sbs_type;
|
||||
>;
|
||||
|
||||
for (auto& pair : clusters)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ struct intersection_linestring_linestring_point
|
||||
OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef detail::overlay::turn_info<PointOut> turn_info;
|
||||
using turn_info = detail::overlay::turn_info<PointOut>;
|
||||
std::deque<turn_info> turns;
|
||||
|
||||
geometry::get_intersection_points(linestring1, linestring2,
|
||||
@ -269,7 +269,7 @@ struct intersection_of_linestring_with_areal
|
||||
return out;
|
||||
}
|
||||
|
||||
typedef detail::overlay::follow
|
||||
using follower = detail::overlay::follow
|
||||
<
|
||||
GeometryOut,
|
||||
LineString,
|
||||
@ -277,21 +277,21 @@ struct intersection_of_linestring_with_areal
|
||||
OverlayType,
|
||||
false, // do not remove spikes for linear geometries
|
||||
FollowIsolatedPoints
|
||||
> follower;
|
||||
>;
|
||||
|
||||
typedef typename geometry::detail::output_geometry_access
|
||||
using linear = typename geometry::detail::output_geometry_access
|
||||
<
|
||||
GeometryOut, linestring_tag, linestring_tag
|
||||
> linear;
|
||||
>;
|
||||
|
||||
using point_type = point_type_t<typename linear::type>;
|
||||
|
||||
typedef geometry::segment_ratio
|
||||
using ratio_type = geometry::segment_ratio
|
||||
<
|
||||
typename coordinate_type<point_type>::type
|
||||
> ratio_type;
|
||||
coordinate_type_t<point_type>
|
||||
>;
|
||||
|
||||
typedef detail::overlay::turn_info
|
||||
using turn_info = detail::overlay::turn_info
|
||||
<
|
||||
point_type,
|
||||
ratio_type,
|
||||
@ -300,21 +300,21 @@ struct intersection_of_linestring_with_areal
|
||||
point_type,
|
||||
ratio_type
|
||||
>
|
||||
> turn_info;
|
||||
>;
|
||||
|
||||
std::deque<turn_info> turns;
|
||||
|
||||
detail::get_turns::no_interrupt_policy policy;
|
||||
|
||||
typedef detail::overlay::get_turn_info_linear_areal
|
||||
using turn_policy = detail::overlay::get_turn_info_linear_areal
|
||||
<
|
||||
detail::overlay::assign_null_policy
|
||||
> turn_policy;
|
||||
>;
|
||||
|
||||
dispatch::get_turns
|
||||
<
|
||||
typename geometry::tag<LineString>::type,
|
||||
typename geometry::tag<Areal>::type,
|
||||
geometry::tag_t<LineString>,
|
||||
geometry::tag_t<Areal>,
|
||||
LineString,
|
||||
Areal,
|
||||
false,
|
||||
@ -387,11 +387,11 @@ struct intersection_areal_areal_point
|
||||
OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef detail::overlay::turn_info
|
||||
using turn_info = detail::overlay::turn_info
|
||||
<
|
||||
PointOut,
|
||||
typename segment_ratio_type<PointOut>::type
|
||||
> turn_info;
|
||||
>;
|
||||
std::vector<turn_info> turns;
|
||||
|
||||
detail::get_turns::no_interrupt_policy policy;
|
||||
@ -419,9 +419,9 @@ struct intersection_linear_areal_point
|
||||
OutputIterator out,
|
||||
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,
|
||||
ratio_type,
|
||||
@ -430,12 +430,12 @@ struct intersection_linear_areal_point
|
||||
PointOut,
|
||||
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
|
||||
> turn_policy;
|
||||
>;
|
||||
|
||||
std::vector<turn_info> turns;
|
||||
|
||||
@ -443,8 +443,8 @@ struct intersection_linear_areal_point
|
||||
|
||||
dispatch::get_turns
|
||||
<
|
||||
typename geometry::tag<Geometry1>::type,
|
||||
typename geometry::tag<Geometry2>::type,
|
||||
geometry::tag_t<Geometry1>,
|
||||
geometry::tag_t<Geometry2>,
|
||||
Geometry1,
|
||||
Geometry2,
|
||||
false,
|
||||
@ -1463,10 +1463,10 @@ inline OutputIterator intersection_insert(Geometry1 const& geometry1,
|
||||
concepts::check<Geometry1 const>();
|
||||
concepts::check<Geometry2 const>();
|
||||
|
||||
typedef typename strategies::relate::services::default_strategy
|
||||
using strategy_type = typename strategies::relate::services::default_strategy
|
||||
<
|
||||
Geometry1, Geometry2
|
||||
>::type strategy_type;
|
||||
>::type;
|
||||
|
||||
return intersection_insert<GeometryOut>(geometry1, geometry2, out,
|
||||
strategy_type());
|
||||
|
@ -39,11 +39,10 @@ namespace detail { namespace overlay
|
||||
template <typename TurnOperation>
|
||||
struct indexed_turn_operation
|
||||
{
|
||||
typedef TurnOperation type;
|
||||
using type = TurnOperation;
|
||||
|
||||
std::size_t turn_index;
|
||||
std::size_t operation_index;
|
||||
bool skip;
|
||||
// use pointers to avoid copies, const& is not possible because of usage in vector
|
||||
segment_identifier const* other_seg_id; // segment id of other segment of intersection of two segments
|
||||
TurnOperation const* subject;
|
||||
@ -53,7 +52,6 @@ struct indexed_turn_operation
|
||||
segment_identifier const& oid)
|
||||
: turn_index(ti)
|
||||
, operation_index(oi)
|
||||
, skip(false)
|
||||
, other_seg_id(&oid)
|
||||
, subject(boost::addressof(sub))
|
||||
{}
|
||||
@ -88,7 +86,7 @@ private :
|
||||
Geometry2 const& m_geometry2;
|
||||
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
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public:
|
||||
OutputIterator oit,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename detail::relate::turns::get_turns
|
||||
using turn_info = typename detail::relate::turns::get_turns
|
||||
<
|
||||
Linear1,
|
||||
Linear2,
|
||||
@ -237,9 +237,9 @@ public:
|
||||
Linear2,
|
||||
assign_policy
|
||||
>
|
||||
>::template turn_info_type<Strategy>::type turn_info;
|
||||
>::template turn_info_type<Strategy>::type;
|
||||
|
||||
typedef std::vector<turn_info> turns_container;
|
||||
using turns_container = std::vector<turn_info>;
|
||||
|
||||
turns_container turns;
|
||||
compute_turns(turns, linear1, linear2, strategy);
|
||||
@ -252,7 +252,7 @@ public:
|
||||
LinestringOut,
|
||||
OverlayType,
|
||||
Linear1,
|
||||
typename tag<Linear1>::type
|
||||
tag_t<Linear1>
|
||||
>::apply(linear1, oit);
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ struct linear_linear_linestring
|
||||
LinestringOut,
|
||||
overlay_difference,
|
||||
Linear1,
|
||||
typename tag<Linear1>::type
|
||||
tag_t<Linear1>
|
||||
>::apply(linear1, oit);
|
||||
|
||||
return linear_linear_linestring
|
||||
|
@ -31,7 +31,7 @@ namespace detail { namespace overlay
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
typename Tag = tag_t<Geometry>
|
||||
>
|
||||
struct needs_self_turns
|
||||
{
|
||||
@ -69,7 +69,7 @@ struct needs_self_turns<Geometry, multi_polygon_tag>
|
||||
{
|
||||
static inline bool apply(Geometry const& multi)
|
||||
{
|
||||
typedef typename boost::range_value<Geometry>::type polygon_type;
|
||||
using polygon_type = typename boost::range_value<Geometry>::type;
|
||||
std::size_t const n = boost::size(multi);
|
||||
return n > 1 || (n == 1
|
||||
&& needs_self_turns<polygon_type>
|
||||
|
@ -60,14 +60,6 @@ namespace detail { namespace overlay
|
||||
//! Default visitor for overlay, doing nothing
|
||||
struct overlay_null_visitor
|
||||
{
|
||||
void print(char const* ) {}
|
||||
|
||||
template <typename Turns>
|
||||
void print(char const* , Turns const& , int) {}
|
||||
|
||||
template <typename Turns>
|
||||
void print(char const* , Turns const& , int , int ) {}
|
||||
|
||||
template <typename Turns>
|
||||
void visit_turns(int , Turns const& ) {}
|
||||
|
||||
@ -182,14 +174,14 @@ inline OutputIterator return_if_one_input_is_empty(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
OutputIterator out, Strategy const& strategy)
|
||||
{
|
||||
typedef typename geometry::ring_type<GeometryOut>::type ring_type;
|
||||
typedef std::deque<ring_type> ring_container_type;
|
||||
using ring_type = geometry::ring_type_t<GeometryOut>;
|
||||
using ring_container_type = std::deque<ring_type>;
|
||||
|
||||
typedef ring_properties
|
||||
using properties = ring_properties
|
||||
<
|
||||
typename geometry::point_type<ring_type>::type,
|
||||
geometry::point_type_t<ring_type>,
|
||||
typename geometry::area_result<ring_type, Strategy>::type
|
||||
> properties;
|
||||
>;
|
||||
|
||||
// Silence warning C4127: conditional expression is constant
|
||||
#if defined(_MSC_VER)
|
||||
@ -253,23 +245,25 @@ struct overlay
|
||||
>(geometry1, geometry2, out, strategy);
|
||||
}
|
||||
|
||||
typedef typename geometry::point_type<GeometryOut>::type point_type;
|
||||
typedef detail::overlay::traversal_turn_info
|
||||
using point_type = geometry::point_type_t<GeometryOut>;
|
||||
using turn_info = detail::overlay::traversal_turn_info
|
||||
<
|
||||
point_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;
|
||||
typedef std::deque<ring_type> ring_container_type;
|
||||
using ring_type = geometry::ring_type_t<GeometryOut>;
|
||||
using ring_container_type = std::deque<ring_type>;
|
||||
|
||||
// Define the clusters, mapping cluster_id -> turns
|
||||
typedef std::map
|
||||
using cluster_type = std::map
|
||||
<
|
||||
signed_size_type,
|
||||
cluster_info
|
||||
> cluster_type;
|
||||
>;
|
||||
|
||||
constexpr operation_type target_operation = operation_from_overlay<OverlayType>::value;
|
||||
|
||||
turn_container_type turns;
|
||||
|
||||
@ -303,6 +297,21 @@ struct overlay
|
||||
cluster_type clusters;
|
||||
std::map<ring_identifier, ring_turn_info> turn_info_per_ring;
|
||||
|
||||
// Handle colocations, gathering clusters and (below) their properties.
|
||||
detail::overlay::handle_colocations
|
||||
<
|
||||
Reverse1, Reverse2, OverlayType, Geometry1, Geometry2
|
||||
>(turns, clusters);
|
||||
|
||||
// Gather cluster properties (using even clusters with
|
||||
// discarded turns - for open turns)
|
||||
detail::overlay::gather_cluster_properties
|
||||
<
|
||||
Reverse1,
|
||||
Reverse2,
|
||||
OverlayType
|
||||
>(clusters, turns, target_operation, geometry1, geometry2, strategy);
|
||||
|
||||
geometry::enrich_intersection_points<Reverse1, Reverse2, OverlayType>(
|
||||
turns, clusters, geometry1, geometry2, strategy);
|
||||
|
||||
@ -327,11 +336,11 @@ struct overlay
|
||||
|
||||
get_ring_turn_info<OverlayType>(turn_info_per_ring, turns, clusters);
|
||||
|
||||
typedef ring_properties
|
||||
using properties = ring_properties
|
||||
<
|
||||
point_type,
|
||||
typename geometry::area_result<ring_type, Strategy>::type
|
||||
> properties;
|
||||
>;
|
||||
|
||||
// Select all rings which are NOT touched by any intersection point
|
||||
std::map<ring_identifier, properties> selected_ring_properties;
|
||||
|
@ -183,14 +183,14 @@ private:
|
||||
{
|
||||
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,
|
||||
typename geometry::coordinate_system<MultiPoint>::type
|
||||
> point_type;
|
||||
typedef geometry::model::box<point_type> box_type;
|
||||
typedef std::pair<box_type, std::size_t> box_pair;
|
||||
geometry::coordinate_system_t<MultiPoint>
|
||||
>;
|
||||
using box_type = geometry::model::box<point_type>;
|
||||
using box_pair = std::pair<box_type, std::size_t>;
|
||||
std::vector<box_pair> box_pairs;
|
||||
box_pairs.reserve(boost::size(multipolygon));
|
||||
|
||||
@ -217,10 +217,10 @@ public:
|
||||
OutputIterator oit,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef std::vector
|
||||
using point_vector_type = std::vector
|
||||
<
|
||||
typename boost::range_value<MultiPoint>::type
|
||||
> point_vector_type;
|
||||
>;
|
||||
|
||||
point_vector_type common_points;
|
||||
|
||||
|
@ -217,8 +217,8 @@ private:
|
||||
class segment_range
|
||||
{
|
||||
public:
|
||||
typedef geometry::segment_iterator<Linear const> const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
using const_iterator = geometry::segment_iterator<Linear const>;
|
||||
using iterator = const_iterator;
|
||||
|
||||
explicit segment_range(Linear const& linear)
|
||||
: m_linear(linear)
|
||||
@ -273,10 +273,10 @@ public:
|
||||
OutputIterator oit,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef std::vector
|
||||
using point_vector_type = std::vector
|
||||
<
|
||||
typename boost::range_value<MultiPoint>::type
|
||||
> point_vector_type;
|
||||
>;
|
||||
|
||||
point_vector_type common_points;
|
||||
|
||||
|
@ -53,7 +53,7 @@ template
|
||||
<
|
||||
typename PointOut,
|
||||
typename GeometryIn,
|
||||
typename TagIn = typename tag<GeometryIn>::type
|
||||
typename TagIn = tag_t<GeometryIn>
|
||||
>
|
||||
struct copy_points
|
||||
: not_implemented<PointOut, GeometryIn>
|
||||
@ -221,7 +221,7 @@ struct point_multipoint_point
|
||||
OutputIterator oit,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef action_selector_pl<PointOut, OverlayType> action;
|
||||
using action = action_selector_pl<PointOut, OverlayType>;
|
||||
|
||||
for (auto it = boost::begin(multipoint); it != boost::end(multipoint); ++it)
|
||||
{
|
||||
@ -255,7 +255,7 @@ struct multipoint_multipoint_point
|
||||
OutputIterator oit,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef geometry::less<void, -1, Strategy> less_type;
|
||||
using less_type = geometry::less<void, -1, Strategy>;
|
||||
|
||||
if BOOST_GEOMETRY_CONSTEXPR (OverlayType != overlay_difference)
|
||||
{
|
||||
@ -268,7 +268,7 @@ struct multipoint_multipoint_point
|
||||
}
|
||||
}
|
||||
|
||||
typedef typename boost::range_value<MultiPoint2>::type point2_type;
|
||||
using point2_type = typename boost::range_value<MultiPoint2>::type;
|
||||
|
||||
std::vector<point2_type> points2(boost::begin(multipoint2),
|
||||
boost::end(multipoint2));
|
||||
@ -421,8 +421,8 @@ struct union_pointlike_pointlike_point
|
||||
return detail_dispatch::overlay::pointlike_pointlike_point
|
||||
<
|
||||
PointLike2, PointLike1, PointOut, overlay_difference,
|
||||
typename tag<PointLike2>::type,
|
||||
typename tag<PointLike1>::type
|
||||
tag_t<PointLike2>,
|
||||
tag_t<PointLike1>
|
||||
>::apply(pointlike2, pointlike1, oit, strategy);
|
||||
}
|
||||
|
||||
|
@ -29,11 +29,11 @@ namespace detail { namespace overlay
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename geometry::tag<Geometry>::type
|
||||
typename Tag = geometry::tag_t<Geometry>
|
||||
>
|
||||
struct points_range
|
||||
{
|
||||
typedef geometry::point_iterator<Geometry const> iterator_type;
|
||||
using iterator_type = geometry::point_iterator<Geometry const>;
|
||||
|
||||
explicit points_range(Geometry const& geometry)
|
||||
: m_geometry(geometry)
|
||||
@ -55,8 +55,8 @@ struct points_range
|
||||
template <typename Box>
|
||||
struct points_range<Box, box_tag>
|
||||
{
|
||||
typedef typename geometry::point_type<Box>::type point_type;
|
||||
typedef const point_type * iterator_type;
|
||||
using point_type = geometry::point_type_t<Box>;
|
||||
using iterator_type = const point_type *;
|
||||
|
||||
explicit points_range(Box const& box)
|
||||
{
|
||||
@ -80,7 +80,7 @@ struct points_range<Box, box_tag>
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename geometry::tag<Geometry>::type
|
||||
typename Tag = geometry::tag_t<Geometry>
|
||||
>
|
||||
struct point_in_geometry_helper
|
||||
{
|
||||
@ -113,7 +113,7 @@ static inline int range_in_geometry(Geometry1 const& geometry1,
|
||||
{
|
||||
int result = 0;
|
||||
points_range<Geometry1> points(geometry1);
|
||||
typedef typename points_range<Geometry1>::iterator_type iterator_type;
|
||||
using iterator_type = typename points_range<Geometry1>::iterator_type;
|
||||
iterator_type const end = points.end();
|
||||
iterator_type it = points.begin();
|
||||
if (it == end)
|
||||
|
@ -30,8 +30,8 @@ namespace detail { namespace overlay
|
||||
template <typename Point, typename AreaType>
|
||||
struct ring_properties
|
||||
{
|
||||
typedef Point point_type;
|
||||
typedef AreaType area_type;
|
||||
using point_type = Point;
|
||||
using area_type = AreaType;
|
||||
|
||||
bool valid;
|
||||
|
||||
|
@ -34,7 +34,7 @@ struct segment_as_subrange
|
||||
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
|
||||
{
|
||||
|
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