Remove trailing whitespaces from include and index directories

This commit is contained in:
Vissarion Fisikopoulos 2022-12-07 15:53:21 +02:00
parent 1451c6ca65
commit eb38231d36
338 changed files with 990 additions and 990 deletions

View File

@ -107,7 +107,7 @@ struct ring_area
auto const end = boost::end(view);
strategy_type const strategy = strategies.area(ring);
typename strategy_type::template state<Ring> state;
typename strategy_type::template state<Ring> state;
for (auto previous = it++; it != end; ++previous, ++it)
{

View File

@ -231,7 +231,7 @@ struct assign
concepts::check<Geometry1>();
concepts::check<Geometry2 const>();
concepts::check_concepts_and_equal_dimensions<Geometry1, Geometry2 const>();
static bool const same_point_order
= point_order<Geometry1>::value == point_order<Geometry2>::value;
BOOST_GEOMETRY_STATIC_ASSERT(
@ -244,23 +244,23 @@ struct assign
same_closure,
"Assign is not supported for different closures.",
Geometry1, Geometry2);
dispatch::convert<Geometry2, Geometry1>::apply(geometry2, geometry1);
}
};
template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Geometry2>
struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Geometry2>
{
struct visitor: static_visitor<void>
{
Geometry2 const& m_geometry2;
visitor(Geometry2 const& geometry2)
: m_geometry2(geometry2)
{}
template <typename Geometry1>
result_type operator()(Geometry1& geometry1) const
{
@ -272,7 +272,7 @@ struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Geometry2>
(geometry1, m_geometry2);
}
};
static inline void
apply(variant<BOOST_VARIANT_ENUM_PARAMS(T)>& geometry1,
Geometry2 const& geometry2)
@ -280,19 +280,19 @@ struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Geometry2>
return boost::apply_visitor(visitor(geometry2), geometry1);
}
};
template <typename Geometry1, BOOST_VARIANT_ENUM_PARAMS(typename T)>
struct assign<Geometry1, variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
{
struct visitor: static_visitor<void>
{
Geometry1& m_geometry1;
visitor(Geometry1 const& geometry1)
: m_geometry1(geometry1)
{}
template <typename Geometry2>
result_type operator()(Geometry2 const& geometry2) const
{
@ -304,7 +304,7 @@ struct assign<Geometry1, variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
(m_geometry1, geometry2);
}
};
static inline void
apply(Geometry1& geometry1,
variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& geometry2)
@ -312,8 +312,8 @@ struct assign<Geometry1, variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
return boost::apply_visitor(visitor(geometry1), geometry2);
}
};
template <BOOST_VARIANT_ENUM_PARAMS(typename T1), BOOST_VARIANT_ENUM_PARAMS(typename T2)>
struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T1)>, variant<BOOST_VARIANT_ENUM_PARAMS(T2)> >
{
@ -332,7 +332,7 @@ struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T1)>, variant<BOOST_VARIANT_ENUM
(geometry1, geometry2);
}
};
static inline void
apply(variant<BOOST_VARIANT_ENUM_PARAMS(T1)>& geometry1,
variant<BOOST_VARIANT_ENUM_PARAMS(T2)> const& geometry2)
@ -340,9 +340,9 @@ struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T1)>, variant<BOOST_VARIANT_ENUM
return boost::apply_visitor(visitor(), geometry1, geometry2);
}
};
} // namespace resolve_variant
/*!
\brief Assigns one geometry to another geometry

View File

@ -40,7 +40,7 @@ namespace boost { namespace geometry
#ifndef DOXYGEN_NO_DETAIL
namespace detail
{
} // namespace detail
#endif // DOXYGEN_NO_DETAIL
@ -183,7 +183,7 @@ inline auto azimuth(Point1 const& point1, Point2 const& point2)
{
concepts::check<Point1 const>();
concepts::check<Point2 const>();
return resolve_strategy::azimuth
<
default_strategy

View File

@ -218,7 +218,7 @@ struct centroid_range
{
// prepare translation transformer
translating_transformer<Range> transformer(*boost::begin(range));
typename Strategy::template state_type
<
typename geometry::point_type<Range>::type,
@ -226,7 +226,7 @@ struct centroid_range
>::type state;
centroid_range_state::apply(range, transformer, strategy, state);
if ( strategy.result(state, centroid) )
{
// translate the result back
@ -277,7 +277,7 @@ struct centroid_polygon
// prepare translation transformer
translating_transformer<Polygon>
transformer(*boost::begin(exterior_ring(poly)));
typename Strategy::template state_type
<
typename geometry::point_type<Polygon>::type,
@ -285,7 +285,7 @@ struct centroid_polygon
>::type state;
centroid_polygon_state::apply(poly, transformer, strategy, state);
if ( strategy.result(state, centroid) )
{
// translate the result back
@ -366,7 +366,7 @@ struct centroid_multi
transformer.apply_reverse(centroid);
return true;
}
return false;
}
};

View File

@ -152,7 +152,7 @@ struct range_to_range
geometry::detail::conversion::convert_point_to_point(point1, point2);
}
};
static inline void apply(Range1 const& source, Range2& destination)
{
apply(source, destination, default_policy());

View File

@ -231,7 +231,7 @@ struct crosses
>::apply(geometry1, geometry2, strategy);
}
};
template <typename DynamicGeometry1, typename Geometry2, typename Tag2>
struct crosses<DynamicGeometry1, Geometry2, dynamic_geometry_tag, Tag2>
@ -295,10 +295,10 @@ struct crosses<DynamicGeometry1, DynamicGeometry2, dynamic_geometry_tag, dynamic
}
};
} // namespace resolve_dynamic
/*!
\brief \brief_check2{crosses}
\ingroup crosses

View File

@ -88,7 +88,7 @@ struct densify_range
{
return;
}
auto strategy = strategies.densify(rng);
push_back_policy<MutRng> policy(rng_out);
@ -349,7 +349,7 @@ struct densify<default_strategy, false>
<
Geometry
>::type strategies_type;
dispatch::densify
<
Geometry, Geometry

View File

@ -32,7 +32,7 @@ namespace detail { namespace buffer
{
template <typename Strategy>
template <typename Strategy>
struct original_get_box
{
explicit original_get_box(Strategy const& strategy)

View File

@ -128,14 +128,14 @@ struct calculate_point_order_by_azimuth
{
// Add point
cleaned.push_back(clean_point_t(it));
while (cleaned.size() >= 3)
{
cleaned_iter_t it0 = cleaned.end() - 3;
cleaned_iter_t it1 = cleaned.end() - 2;
cleaned_iter_t it2 = cleaned.end() - 1;
calc_t diff;
calc_t diff;
if (get_or_calculate_azimuths_difference(*it0, *it1, *it2, diff, strategy)
&& ! math::equals(math::abs(diff), pi))
{
@ -148,7 +148,7 @@ struct calculate_point_order_by_azimuth
// TODO: angles have to be invalidated only if spike is detected
// for duplicates it'd be ok to leave them
it0->set_azimuth_invalid();
it0->set_azimuth_difference_invalid();
it0->set_azimuth_difference_invalid();
it2->set_azimuth_difference_invalid();
cleaned.erase(it1);
}
@ -269,7 +269,7 @@ private:
razi = p0.reverse_azimuth();
return true;
}
if (strategy.apply(p0.ref(), p1.ref(), azi, razi))
{
p0.set_azimuths(azi, razi);

View File

@ -75,7 +75,7 @@ struct translating_transformer<Geometry, areal_tag, cartesian_tag>
{
typedef typename geometry::point_type<Geometry>::type point_type;
typedef point_type result_type;
explicit translating_transformer(Geometry const& geom)
: m_origin(NULL)
{

View File

@ -92,7 +92,7 @@ public:
typename RangeIterator,
typename Strategy,
typename Distance
>
>
static inline RangeIterator apply(Geometry const& geometry,
RangeIterator first,
RangeIterator last,
@ -111,7 +111,7 @@ public:
typename Geometry,
typename RangeIterator,
typename Strategy
>
>
static inline RangeIterator apply(Geometry const& geometry,
RangeIterator first,
RangeIterator last,

View File

@ -189,7 +189,7 @@ private:
it_min1 = it_back;
it_min2 = first;
}
}
}
public:
typedef typename std::pair<iterator_type, iterator_type> return_type;

View File

@ -150,7 +150,7 @@ public:
apply(rtree_first, rtree_last, queries_first, queries_last,
strategy, rtree_min, qit_min, dist_min);
return std::make_pair(rtree_min, qit_min);
return std::make_pair(rtree_min, qit_min);
}

View File

@ -42,9 +42,9 @@ namespace dispatch
template
<
typename Geometry1,
typename Geometry2,
typename Tag1,
typename Geometry1,
typename Geometry2,
typename Tag1,
typename Tag2
>
struct closest_points
@ -62,8 +62,8 @@ struct closest_points
<
Geometry2, Geometry1, Tag2, Tag1, false
>::apply(g2, g1, shortest_seg, strategy);
detail::closest_points::swap_segment_points::apply(shortest_seg);
detail::closest_points::swap_segment_points::apply(shortest_seg);
}
};

View File

@ -44,44 +44,44 @@ struct linear_to_areal
>::type;
using linestring_type = geometry::model::linestring<point_type>;
/* TODO: currently intersection does not support some cases of tupled input
* such as linestring - multipolygon
* this could be implemented directly with dynamic geometries
using polygon_type = geometry::model::polygon<point_type>;
std::tuple
<
geometry::model::multi_point<point_type>,
geometry::model::multi_point<point_type>,
geometry::model::multi_linestring<linestring_type>,
geometry::model::multi_polygon<polygon_type>
> tp;
bool intersect_tp = geometry::intersection(linear, areal, tp, strategies);
*/
geometry::model::multi_point<point_type> mp_out;
geometry::intersection(linear, areal, mp_out, strategies);
if (! boost::empty(mp_out))
{
set_segment_from_points::apply(*boost::begin(mp_out),
*boost::begin(mp_out),
set_segment_from_points::apply(*boost::begin(mp_out),
*boost::begin(mp_out),
shortest_seg);
return;
}
// if there are no intersection points then check if the linear geometry
// if there are no intersection points then check if the linear geometry
// (or part of it) is inside the areal and return any point of this part
geometry::model::multi_linestring<linestring_type> ln_out;
geometry::intersection(linear, areal, ln_out, strategies);
geometry::intersection(linear, areal, ln_out, strategies);
if (! boost::empty(ln_out))
{
set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)),
*boost::begin(*boost::begin(ln_out)),
shortest_seg);
set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)),
*boost::begin(*boost::begin(ln_out)),
shortest_seg);
return;
}
linear_to_linear::apply(linear, areal, shortest_seg, strategies, false);
}
};
@ -104,7 +104,7 @@ struct segment_to_areal
template <typename Segment, typename Areal, typename OutSegment, typename Strategies>
static inline void apply(Segment const& segment,
Areal const& areal,
OutSegment& shortest_seg,
OutSegment& shortest_seg,
Strategies const& strategies,
bool = false)
{
@ -120,7 +120,7 @@ struct areal_to_segment
template <typename Areal, typename Segment, typename OutSegment, typename Strategies>
static inline void apply(Areal const& areal,
Segment const& segment,
OutSegment& shortest_seg,
OutSegment& shortest_seg,
Strategies const& strategies,
bool = false)
{
@ -148,47 +148,47 @@ struct areal_to_areal
using linestring_type = geometry::model::linestring<point_type>;
using polygon_type = geometry::model::polygon<point_type>;
/* TODO: currently intersection does not support tupled input
* this should be implemented directly with dynamic geometries
*/
geometry::model::multi_point<point_type> mp_out;
geometry::intersection(areal1, areal2, mp_out, strategies);
if (! boost::empty(mp_out))
{
set_segment_from_points::apply(*boost::begin(mp_out),
*boost::begin(mp_out),
set_segment_from_points::apply(*boost::begin(mp_out),
*boost::begin(mp_out),
shortest_seg);
return;
}
// if there are no intersection points then the linear geometry (or part of it)
// is inside the areal; return any point of this part
geometry::model::multi_linestring<linestring_type> ln_out;
geometry::intersection(areal1, areal2, ln_out, strategies);
geometry::intersection(areal1, areal2, ln_out, strategies);
if (! boost::empty(ln_out))
{
set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)),
*boost::begin(*boost::begin(ln_out)),
shortest_seg);
set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)),
*boost::begin(*boost::begin(ln_out)),
shortest_seg);
return;
}
geometry::model::multi_polygon<polygon_type> pl_out;
geometry::intersection(areal1, areal2, pl_out, strategies);
geometry::intersection(areal1, areal2, pl_out, strategies);
if (! boost::empty(pl_out))
{
set_segment_from_points::apply(
*boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))),
*boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))),
shortest_seg);
*boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))),
*boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))),
shortest_seg);
return;
}
linear_to_linear::apply(areal1, areal2, shortest_seg, strategies, false);
}
};
@ -205,7 +205,7 @@ namespace dispatch
template <typename Linear, typename Areal>
struct closest_points
<
Linear, Areal,
Linear, Areal,
linear_tag, areal_tag,
false
>
@ -216,7 +216,7 @@ template <typename Areal, typename Linear>
struct closest_points
<
Areal, Linear,
areal_tag, linear_tag,
areal_tag, linear_tag,
false
>
: detail::closest_points::areal_to_linear
@ -225,7 +225,7 @@ struct closest_points
template <typename Segment, typename Areal>
struct closest_points
<
Segment, Areal,
Segment, Areal,
segment_tag, areal_tag,
false
>
@ -236,7 +236,7 @@ template <typename Areal, typename Segment>
struct closest_points
<
Areal, Segment,
areal_tag, segment_tag,
areal_tag, segment_tag,
false
>
: detail::closest_points::areal_to_segment
@ -246,7 +246,7 @@ template <typename Areal1, typename Areal2>
struct closest_points
<
Areal1, Areal2,
areal_tag, areal_tag,
areal_tag, areal_tag,
false
>
: detail::closest_points::areal_to_areal

View File

@ -35,7 +35,7 @@ struct linear_to_linear
template <typename Linear1, typename Linear2, typename Segment, typename Strategies>
static inline void apply(Linear1 const& linear1,
Linear2 const& linear2,
Segment& shortest_seg,
Segment& shortest_seg,
Strategies const& strategies,
bool = false)
{
@ -86,7 +86,7 @@ struct segment_to_linear
template <typename Segment, typename Linear, typename OutSegment, typename Strategies>
static inline void apply(Segment const& segment,
Linear const& linear,
OutSegment& shortest_seg,
OutSegment& shortest_seg,
Strategies const& strategies,
bool = false)
{
@ -103,7 +103,7 @@ struct linear_to_segment
template <typename Linear, typename Segment, typename OutSegment, typename Strategies>
static inline void apply(Linear const& linear,
Segment const& segment,
OutSegment& shortest_seg,
OutSegment& shortest_seg,
Strategies const& strategies,
bool = false)
{
@ -124,7 +124,7 @@ template <typename Linear1, typename Linear2>
struct closest_points
<
Linear1, Linear2,
linear_tag, linear_tag,
linear_tag, linear_tag,
false
> : detail::closest_points::linear_to_linear
{};
@ -132,7 +132,7 @@ struct closest_points
template <typename Segment, typename Linear>
struct closest_points
<
Segment, Linear,
Segment, Linear,
segment_tag, linear_tag,
false
> : detail::closest_points::segment_to_linear
@ -141,7 +141,7 @@ struct closest_points
template <typename Linear, typename Segment>
struct closest_points
<
Linear, Segment,
Linear, Segment,
linear_tag, segment_tag,
false
> : detail::closest_points::linear_to_segment

View File

@ -33,11 +33,11 @@ namespace detail { namespace closest_points
struct multipoint_to_multipoint
{
template
template
<
typename MultiPoint1,
typename MultiPoint2,
typename Segment,
typename MultiPoint1,
typename MultiPoint2,
typename Segment,
typename Strategies
>
static inline void apply(MultiPoint1 const& multipoint1,
@ -67,11 +67,11 @@ struct multipoint_to_multipoint
struct multipoint_to_linear
{
template
template
<
typename MultiPoint,
typename Linear,
typename Segment,
typename MultiPoint,
typename Linear,
typename Segment,
typename Strategies
>
static inline void apply(MultiPoint const& multipoint,
@ -90,11 +90,11 @@ struct multipoint_to_linear
struct linear_to_multipoint
{
template
template
<
typename Linear,
typename MultiPoint,
typename Segment,
typename Linear,
typename MultiPoint,
typename Segment,
typename Strategies
>
static inline void apply(Linear const& linear,
@ -109,11 +109,11 @@ struct linear_to_multipoint
struct segment_to_multipoint
{
template
template
<
typename Segment,
typename MultiPoint,
typename OutSegment,
typename Segment,
typename MultiPoint,
typename OutSegment,
typename Strategies
>
static inline void apply(Segment const& segment,
@ -134,11 +134,11 @@ struct segment_to_multipoint
struct multipoint_to_segment
{
template
template
<
typename MultiPoint,
typename Segment,
typename OutSegment,
typename MultiPoint,
typename Segment,
typename OutSegment,
typename Strategies
>
static inline void apply(MultiPoint const& multipoint,
@ -152,7 +152,7 @@ struct multipoint_to_segment
>;
linestring_type linestring;
convert(segment, linestring);
multipoint_to_linear::apply(multipoint, linestring, shortest_seg,
multipoint_to_linear::apply(multipoint, linestring, shortest_seg,
strategies);
}
};
@ -182,11 +182,11 @@ private:
public:
template
template
<
typename MultiPoint,
typename Areal,
typename Segment,
typename MultiPoint,
typename Areal,
typename Segment,
typename Strategies
>
static inline void apply(MultiPoint const& multipoint,
@ -200,11 +200,11 @@ public:
boost::begin(multipoint),
boost::end(multipoint),
predicate);
if (it != boost::end(multipoint))
{
return set_segment_from_points::apply(*it, *it, shortest_seg);
}
point_or_segment_range_to_geometry_rtree::apply(
@ -218,11 +218,11 @@ public:
struct areal_to_multipoint
{
template
template
<
typename Areal,
typename MultiPoint,
typename Segment,
typename Areal,
typename MultiPoint,
typename Segment,
typename Strategies
>
static inline void apply(Areal const& areal,
@ -248,7 +248,7 @@ namespace dispatch
template <typename MultiPoint1, typename MultiPoint2>
struct closest_points
<
MultiPoint1, MultiPoint2,
MultiPoint1, MultiPoint2,
multi_point_tag, multi_point_tag,
false
> : detail::closest_points::multipoint_to_multipoint
@ -258,7 +258,7 @@ struct closest_points
template <typename MultiPoint, typename Linear>
struct closest_points
<
MultiPoint, Linear,
MultiPoint, Linear,
multi_point_tag, linear_tag,
false
> : detail::closest_points::multipoint_to_linear
@ -268,7 +268,7 @@ struct closest_points
template <typename Linear, typename MultiPoint>
struct closest_points
<
Linear, MultiPoint,
Linear, MultiPoint,
linear_tag, multi_point_tag,
false
> : detail::closest_points::linear_to_multipoint
@ -278,7 +278,7 @@ struct closest_points
template <typename MultiPoint, typename Segment>
struct closest_points
<
MultiPoint, Segment,
MultiPoint, Segment,
multi_point_tag, segment_tag,
false
> : detail::closest_points::multipoint_to_segment
@ -288,7 +288,7 @@ struct closest_points
template <typename Segment, typename MultiPoint>
struct closest_points
<
Segment, MultiPoint,
Segment, MultiPoint,
segment_tag, multi_point_tag,
false
> : detail::closest_points::segment_to_multipoint
@ -298,7 +298,7 @@ struct closest_points
template <typename MultiPoint, typename Areal>
struct closest_points
<
MultiPoint, Areal,
MultiPoint, Areal,
multi_point_tag, areal_tag,
false
> : detail::closest_points::multipoint_to_areal
@ -308,7 +308,7 @@ struct closest_points
template <typename Areal, typename MultiPoint>
struct closest_points
<
Areal, MultiPoint,
Areal, MultiPoint,
areal_tag, multi_point_tag,
false
> : detail::closest_points::areal_to_multipoint

View File

@ -53,7 +53,7 @@ namespace detail { namespace closest_points
struct point_to_point
{
template <typename P1, typename P2, typename Segment, typename Strategies>
static inline void apply(P1 const& p1, P2 const& p2,
static inline void apply(P1 const& p1, P2 const& p2,
Segment& shortest_seg, Strategies const&)
{
set_segment_from_points::apply(p1, p2, shortest_seg);
@ -75,7 +75,7 @@ struct point_to_segment
auto closest_point = strategies.closest_points(point, segment)
.apply(point, p[0], p[1]);
set_segment_from_points::apply(point, closest_point, shortest_seg);
set_segment_from_points::apply(point, closest_point, shortest_seg);
}
};
@ -114,22 +114,22 @@ public:
}
closest_points::creturn_t<Point, Range, Strategies> cd_min;
auto comparable_distance = strategy::distance::services::get_comparable
<
decltype(strategies.distance(point, range))
>::apply(strategies.distance(point, range));
auto closest_segment = point_to_point_range::apply(point,
auto closest_segment = point_to_point_range::apply(point,
boost::begin(range),
boost::end(range),
boost::end(range),
comparable_distance,
cd_min);
auto closest_point = strategies.closest_points(point, range)
.apply(point, *closest_segment.first, *closest_segment.second);
set_segment_from_points::apply(point, closest_point, shortest_seg);
set_segment_from_points::apply(point, closest_point, shortest_seg);
}
};
@ -145,7 +145,7 @@ struct point_to_ring
{
if (within::within_point_geometry(point, ring, strategies))
{
set_segment_from_points::apply(point, point, shortest_seg);
set_segment_from_points::apply(point, point, shortest_seg);
}
else
{
@ -154,7 +154,7 @@ struct point_to_ring
closure<Ring>::value
>::apply(point, ring, shortest_seg, strategies);
}
}
};
@ -165,11 +165,11 @@ class point_to_polygon
template <typename Polygon>
struct distance_to_interior_rings
{
template
template
<
typename Point,
typename InteriorRingIterator,
typename Segment,
typename Point,
typename InteriorRingIterator,
typename Segment,
typename Strategies
>
static inline void apply(Point const& point,
@ -191,14 +191,14 @@ class point_to_polygon
return;
}
}
set_segment_from_points::apply(point, point, shortest_seg);
set_segment_from_points::apply(point, point, shortest_seg);
}
template
template
<
typename Point,
typename InteriorRings,
typename Segment,
typename Point,
typename InteriorRings,
typename Segment,
typename Strategies
>
static inline void apply(Point const& point, InteriorRings const& interior_rings,
@ -214,11 +214,11 @@ class point_to_polygon
public:
template
template
<
typename Point,
typename Polygon,
typename Segment,
typename Point,
typename Polygon,
typename Segment,
typename Strategies
>
static inline void apply(Point const& point,
@ -261,7 +261,7 @@ private:
public:
template
template
<
typename Point,
typename Segment,
@ -287,7 +287,7 @@ public:
selector_type::end(multigeometry),
comparable_distance,
cd);
dispatch::closest_points
<
Point,
@ -305,7 +305,7 @@ public:
template <typename MultiPolygon>
struct point_to_multigeometry<MultiPolygon, true>
{
template
template
<
typename Point,
typename Segment,
@ -318,7 +318,7 @@ struct point_to_multigeometry<MultiPolygon, true>
{
if (within::covered_by_point_geometry(point, multipolygon, strategies))
{
set_segment_from_points::apply(point, point, shortest_seg);
set_segment_from_points::apply(point, point, shortest_seg);
return;
}

View File

@ -86,7 +86,7 @@ public:
cd);
dispatch::closest_points
<
point_or_segment_type,
point_or_segment_type,
typename std::iterator_traits
<
typename selector_type::iterator_type

View File

@ -44,7 +44,7 @@ namespace detail { namespace closest_points
class segment_to_segment
{
public:
template <typename Segment1, typename Segment2, typename OutputSegment, typename Strategies>
static inline void apply(Segment1 const& segment1, Segment2 const& segment2,
OutputSegment& shortest_seg,
@ -66,12 +66,12 @@ public:
intersection_policy());
if (is.count > 0)
{
set_segment_from_points::apply(is.intersections[0],
is.intersections[0],
set_segment_from_points::apply(is.intersections[0],
is.intersections[0],
shortest_seg);
return;
}
typename point_type<Segment1>::type p[2];
detail::assign_point_from_index<0>(segment1, p[0]);
detail::assign_point_from_index<1>(segment1, p[1]);
@ -86,17 +86,17 @@ public:
auto cp3 = strategies.closest_points(p[1], segment2).apply(p[1], q[0], q[1]);
closest_points::creturn_t<Segment1, Segment2, Strategies> d[4];
auto const cds = strategies::distance::detail::make_comparable(strategies)
.distance(detail::dummy_point(), detail::dummy_point());
d[0] = cds.apply(cp0, q[0]);
d[1] = cds.apply(cp1, q[1]);
d[2] = cds.apply(p[0], cp2);
d[3] = cds.apply(p[1], cp3);
std::size_t imin = std::distance(boost::addressof(d[0]), std::min_element(d, d + 4));
std::size_t imin = std::distance(boost::addressof(d[0]), std::min_element(d, d + 4));
switch (imin)
{
case 0:

View File

@ -84,7 +84,7 @@ struct comparable_distance<Strategy, false>
<
strategies_type
> comparable_strategies_type;
return dispatch::distance
<
Geometry1, Geometry2,

View File

@ -207,7 +207,7 @@ struct convex_hull
OutputGeometry& out,
Strategy const& strategy)
{
detail::convex_hull::input_geometry_proxy<Geometry> in_proxy(geometry);
detail::convex_hull::input_geometry_proxy<Geometry> in_proxy(geometry);
detail::convex_hull::graham_andrew
<
typename point_type<Geometry>::type

View File

@ -113,7 +113,7 @@ struct direction_code_impl<spherical_equatorial_tag>
coord1_t const b1 = geometry::get<1>(segment_b);
coord2_t const p0 = geometry::get<0>(p);
coord2_t const p1 = geometry::get<1>(p);
if ( (math::equals(b0, a0) && math::equals(b1, a1))
|| (math::equals(b0, p0) && math::equals(b1, p1)) )
{

View File

@ -142,7 +142,7 @@ struct disjoint_segment_areal
template <typename Segment, typename Polygon>
class disjoint_segment_areal<Segment, Polygon, polygon_tag>
{
template <typename InteriorRings, typename Strategy>
static inline
bool check_interior_rings(InteriorRings const& interior_rings,

View File

@ -286,7 +286,7 @@ public:
typedef typename point_type<MultiPoint>::type point1_type;
typedef typename point_type<SingleGeometry>::type point2_type;
typedef model::box<point2_type> box2_type;
box2_type box2;
geometry::envelope(single_geometry, box2, strategy);
geometry::detail::expand_by_epsilon(box2);
@ -431,7 +431,7 @@ public:
typedef model::box<point1_type> box1_type;
typedef model::box<point2_type> box2_type;
typedef std::pair<box2_type, std::size_t> box_pair_type;
std::size_t count2 = boost::size(multi_geometry);
std::vector<box_pair_type> boxes(count2);
for (std::size_t i = 0 ; i < count2 ; ++i)
@ -530,7 +530,7 @@ struct disjoint
{
return detail::disjoint::multipoint_multipoint
::apply(multipoint2, multipoint1, strategy);
}
}
return detail::disjoint::multipoint_multipoint
::apply(multipoint1, multipoint2, strategy);

View File

@ -54,7 +54,7 @@ template
>
struct segment_or_box_point_range_closure
: not_implemented<SegmentOrBox>
{};
{};
template <typename Segment>
struct segment_or_box_point_range_closure<Segment, segment_tag>
@ -196,7 +196,7 @@ public:
assign_segment_or_box_points
<
SegmentOrBox,
SegmentOrBox,
std::vector<segment_or_box_point>
>::apply(segment_or_box, seg_or_box_points);
@ -282,7 +282,7 @@ public:
}
static inline return_type apply(SegmentOrBox const& segment_or_box, Geometry const& geometry,
static inline return_type apply(SegmentOrBox const& segment_or_box, Geometry const& geometry,
Strategies const& strategies, bool check_intersection = true)
{
return apply(geometry, segment_or_box, strategies, check_intersection);

View File

@ -91,7 +91,7 @@ template <typename Linear, typename Areal, typename Strategy>
struct distance
<
Linear, Areal, Strategy,
linear_tag, areal_tag,
linear_tag, areal_tag,
strategy_tag_distance_point_segment, false
>
: detail::distance::linear_to_areal
@ -104,7 +104,7 @@ template <typename Areal, typename Linear, typename Strategy>
struct distance
<
Areal, Linear, Strategy,
areal_tag, linear_tag,
areal_tag, linear_tag,
strategy_tag_distance_point_segment, false
>
: detail::distance::linear_to_areal
@ -118,7 +118,7 @@ template <typename Areal1, typename Areal2, typename Strategy>
struct distance
<
Areal1, Areal2, Strategy,
areal_tag, areal_tag,
areal_tag, areal_tag,
strategy_tag_distance_point_segment, false
>
: detail::distance::areal_to_areal

View File

@ -102,7 +102,7 @@ template <typename Linear1, typename Linear2, typename Strategy, typename Strate
struct distance
<
Linear1, Linear2, Strategy,
linear_tag, linear_tag,
linear_tag, linear_tag,
StrategyTag, false
> : detail::distance::linear_to_linear
<

View File

@ -127,7 +127,7 @@ public:
{
covered_by_areal predicate(areal, strategies);
if (! boost::empty(multipoint) &&
if (! boost::empty(multipoint) &&
std::none_of(boost::begin(multipoint), boost::end(multipoint), predicate))
{
return detail::distance::point_or_segment_range_to_geometry_rtree

View File

@ -95,7 +95,7 @@ public:
:
dispatch::distance
<
point_or_segment_type,
point_or_segment_type,
typename std::iterator_traits
<
typename selector_type::iterator_type

View File

@ -91,7 +91,7 @@ private:
std::vector<box_point>,
open
> point_to_point_range;
public:
// TODO: Or should the return type be defined by sb_strategy_type?
typedef distance::return_t<box_point, Segment, Strategies> return_type;
@ -114,7 +114,7 @@ public:
// get box points
std::vector<box_point> box_points(4);
detail::assign_box_corners_oriented<true>(box, box_points);
ps_strategy_type const strategy = strategies.distance(dummy_point(), dummy_segment());
auto const cstrategy = strategy::distance::services::get_comparable
@ -192,7 +192,7 @@ private:
public:
// TODO: Or should the return type be defined by sb_strategy_type?
typedef distance::return_t<box_point, Segment, Strategies> return_type;
static inline return_type apply(Segment const& segment,
Box const& box,
Strategies const& strategies,

View File

@ -36,7 +36,7 @@ struct envelope<Collection, geometry_collection_tag>
Strategies const& strategies)
{
using strategy_t = decltype(strategies.envelope(geometry, mbr));
typename strategy_t::template state<Box> state;
detail::visit_breadth_first([&](auto const& g)
{

View File

@ -19,7 +19,7 @@
#include <boost/geometry/algorithms/detail/normalize.hpp>
namespace boost { namespace geometry
namespace boost { namespace geometry
{
namespace detail { namespace envelope
@ -38,7 +38,7 @@ struct intersects_antimeridian
<
CoordinateType, Units
> constants;
return
math::equals(math::abs(lat1), constants::max_latitude())
||

View File

@ -59,7 +59,7 @@ public:
longitude_interval(T const& left, T const& right)
{
m_end[0] = left;
m_end[1] = right;
m_end[1] = right;
}
template <std::size_t Index>
@ -287,7 +287,7 @@ struct envelope_range_of_boxes
// if the box degenerates to the south or north pole
// just ignore it
continue;
}
}
coordinate_type lon_left = geometry::get<min_corner, 0>(*it);
coordinate_type lon_right = geometry::get<max_corner, 0>(*it);

View File

@ -389,7 +389,7 @@ struct equals
<
MultiPolygon1, MultiPolygon2,
multi_polygon_tag, multi_polygon_tag,
areal_tag, areal_tag,
areal_tag, areal_tag,
2,
Reverse
>
@ -402,7 +402,7 @@ struct equals
<
Polygon, MultiPolygon,
polygon_tag, multi_polygon_tag,
areal_tag, areal_tag,
areal_tag, areal_tag,
2,
Reverse
>
@ -414,7 +414,7 @@ struct equals
<
MultiPolygon, Ring,
multi_polygon_tag, ring_tag,
areal_tag, areal_tag,
areal_tag, areal_tag,
2,
Reverse
>

View File

@ -61,7 +61,7 @@ struct indexed_loop
std::less<coordinate_type> less;
std::greater<coordinate_type> greater;
if (less(coord, get<min_corner, Dimension>(box)))
{
set<min_corner, Dimension>(box, coord);

View File

@ -100,7 +100,7 @@ struct expand<default_strategy, false>
namespace resolve_dynamic
{
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
struct expand
{
@ -112,7 +112,7 @@ struct expand
concepts::check<Box>();
concepts::check<Geometry const>();
concepts::check_concepts_and_equal_dimensions<Box, Geometry const>();
resolve_strategy::expand<Strategy>::apply(box, geometry, strategy);
}
};
@ -131,10 +131,10 @@ struct expand<Geometry, dynamic_geometry_tag>
}, geometry);
}
};
} // namespace resolve_dynamic
/*!
\brief Expands (with strategy)
\ingroup expand

View File

@ -44,7 +44,7 @@ struct corner_by_epsilon
typedef typename coordinate_type<Point>::type coord_type;
coord_type const coord = get<I>(point);
coord_type const seps = math::scaled_epsilon(coord);
set<I>(point, PlusOrMinus<coord_type>()(coord, seps));
corner_by_epsilon<Point, PlusOrMinus, I+1>::apply(point);

View File

@ -131,7 +131,7 @@ inline void gc_group_elements(GC1View const& gc1_view, GC2View const& gc2_view,
std::array<std::vector<bool>, 2> visited = {
std::vector<bool>(boost::size(gc1_view), false),
std::vector<bool>(boost::size(gc2_view), false)
};
};
for (auto const& elem : adjacent)
{
std::vector<gc_element_id> group;

View File

@ -31,7 +31,7 @@ struct interior_iterator
{
typedef typename boost::range_iterator
<
typename geometry::interior_type<Geometry>::type
typename geometry::interior_type<Geometry>::type
>::type type;
};

View File

@ -155,7 +155,7 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
pointlike::get(geometry_out),
strategy);
}
return;
}

View File

@ -175,7 +175,7 @@ private:
traits::iter_visit<Geometry2>::apply([&](auto const& g2)
{
TupleOut inters_result;
using g2_t = util::remove_cref_t<decltype(g2)>;
using g2_t = util::remove_cref_t<decltype(g2)>;
intersection<G1, g2_t, TupleOut>::apply(g1, g2, inters_result, strategy);
// TODO: If possible merge based on adjacency lists, i.e. merge
@ -218,7 +218,7 @@ private:
<
Out, Out, typename Strategy::cs_tag
>::type;
rescale_policy_type robust_policy
= geometry::get_rescale_policy<rescale_policy_type>(
g1, g2, strategy);

View File

@ -127,7 +127,7 @@ struct intersection
Geometry2,
typename Strategy::cs_tag
>::type rescale_policy_type;
rescale_policy_type robust_policy
= geometry::get_rescale_policy<rescale_policy_type>(
geometry1, geometry2, strategy);
@ -225,7 +225,7 @@ struct intersection<default_strategy, false>
namespace resolve_dynamic
{
template
<
typename Geometry1, typename Geometry2,
@ -240,7 +240,7 @@ struct intersection
{
concepts::check<Geometry1 const>();
concepts::check<Geometry2 const>();
return resolve_strategy::intersection
<
Strategy
@ -283,7 +283,7 @@ struct intersection<Geometry1, DynamicGeometry2, Tag1, dynamic_geometry_tag>
result = intersection
<
Geometry1,
util::remove_cref_t<decltype(g2)>
util::remove_cref_t<decltype(g2)>
>::apply(geometry1, g2, geometry_out, strategy);
}, geometry2);
return result;
@ -310,9 +310,9 @@ struct intersection<DynamicGeometry1, DynamicGeometry2, dynamic_geometry_tag, dy
return result;
}
};
} // namespace resolve_dynamic
/*!
\brief \brief_calc2{intersection}

View File

@ -158,7 +158,7 @@ public:
inline bool apply(Turn const& turn) const
{
typedef typename boost::range_value<MultiLinestring>::type linestring_type;
linestring_type const& ls1 =
range::at(m_multilinestring, turn.operations[0].seg_id.multi_index);
@ -291,7 +291,7 @@ public:
// return true for empty multilinestring
using not_simple = not_simple<Strategy>; // do not compute self-intersections
if (std::any_of(boost::begin(multilinestring),
boost::end(multilinestring),
not_simple(strategy)))

View File

@ -39,7 +39,7 @@ debug_print_complement_graph(OutputStream& os,
{
os << " " << it->id();
}
os << " }" << std::endl;
os << " }" << std::endl;
for (vertex_handle it = graph.m_vertices.begin();
it != graph.m_vertices.end(); ++it)
@ -54,7 +54,7 @@ debug_print_complement_graph(OutputStream& os,
{
os << " " << (*nit)->id();
}
os << "}" << std::endl;
os << "}" << std::endl;
}
}
#else

View File

@ -28,7 +28,7 @@
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace is_valid
{
@ -89,8 +89,8 @@ struct range_has_invalid_coordinate
bool const has_valid_coordinates = std::none_of
(
geometry::points_begin(geometry), points_end,
[]( auto const& point ){
return point_has_invalid_coordinate::apply(point);
[]( auto const& point ){
return point_has_invalid_coordinate::apply(point);
}
);

View File

@ -30,7 +30,7 @@
namespace boost { namespace geometry
{
namespace resolve_strategy
{

View File

@ -151,7 +151,7 @@ public:
|| turn.method == method_touch_interior)
&& turn.touch_only;
}
};
};
}} // namespace detail::is_valid

View File

@ -105,7 +105,7 @@ namespace dispatch
// A curve is simple if it does not pass through the same point twice,
// with the possible exception of its two endpoints
//
// There is an option here as to whether spikes are allowed for linestrings;
// There is an option here as to whether spikes are allowed for linestrings;
// here we pass this as an additional template parameter: allow_spikes
// If allow_spikes is set to true, spikes are allowed, false otherwise.
// By default, spikes are disallowed
@ -166,7 +166,7 @@ public:
using per_ls = per_linestring<VisitPolicy, Strategy>;
return std::all_of(boost::begin(multilinestring),
return std::all_of(boost::begin(multilinestring),
boost::end(multilinestring),
per_ls(visitor, strategy));
}

View File

@ -302,7 +302,7 @@ public:
using has_valid_turns = has_valid_self_turns
<
MultiPolygon,
MultiPolygon,
typename Strategy::cs_tag
>;

View File

@ -111,7 +111,7 @@ protected:
VisitPolicy& visitor,
Strategy const& strategy)
{
return std::none_of(boost::begin(interior_rings),
return std::none_of(boost::begin(interior_rings),
boost::end(interior_rings),
is_invalid_ring<VisitPolicy, Strategy>(visitor, strategy));
}
@ -367,7 +367,7 @@ protected:
}
struct has_holes_inside
{
{
template <typename TurnIterator, typename VisitPolicy, typename Strategy>
static inline bool apply(Polygon const& polygon,
TurnIterator first,

View File

@ -225,7 +225,7 @@ maximum_gap(RangeOfIntervals const& range_of_intervals,
std::priority_queue
<
event_type,
std::vector<event_type>,
std::vector<event_type>,
detail::max_interval_gap::event_greater<event_type>
> queue;

View File

@ -147,7 +147,7 @@ struct overlaps
>::apply(geometry1, geometry2, strategy);
}
};
template <typename DynamicGeometry1, typename Geometry2, typename Tag2>
struct overlaps<DynamicGeometry1, Geometry2, dynamic_geometry_tag, Tag2>
@ -211,7 +211,7 @@ struct overlaps<DynamicGeometry1, DynamicGeometry2, dynamic_geometry_tag, dynami
}
};
} // namespace resolve_dynamic

View File

@ -74,7 +74,7 @@ static inline bool is_entering(Turn const& turn,
template <typename Turn, typename Operation>
static inline bool is_staying_inside(Turn const& turn,
Operation const& operation,
Operation const& operation,
bool entered)
{
if ( !entered )
@ -327,7 +327,7 @@ public:
for (TurnIterator it = first; it != beyond; ++it)
{
oit = process_turn(it, boost::begin(it->operations),
entered, enter_count,
entered, enter_count,
linestring,
current_piece, current_segment_id,
oit,

View File

@ -201,7 +201,7 @@ public:
BOOST_STATIC_ASSERT(I < 2);
return ips[I];
}
private:
// only if collinear (same_dirs)
@ -287,7 +287,7 @@ struct get_turn_info_for_endpoint
if ( intersections.template get<1>().p_operation == operation_none )
return result_ignore_ip0;
bool append1_last
= analyse_segment_and_assign_ip(range_p, range_q,
intersections.template get<1>(),
@ -436,7 +436,7 @@ struct get_turn_info_for_endpoint
if ( operations_both(operations, operation_continue) )
{
if ( op1 != operation_union
if ( op1 != operation_union
|| op2 != operation_union
|| ! ( G1Index == 0 ? inters.is_spike_q() : inters.is_spike_p() ) )
{
@ -544,7 +544,7 @@ struct get_turn_info_for_endpoint
OutputIterator out)
{
TurnInfo tp = tp_model;
//geometry::convert(ip, tp.point);
//tp.method = method;
base_turn_handler::assign_point(tp, method, result.intersection_points, ip_index);

View File

@ -345,7 +345,7 @@ public:
<
UniqueSubRange2, UniqueSubRange1, UmbrellaStrategy
> swapped_side_calculator_type;
intersection_info_base(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
UmbrellaStrategy const& umbrella_strategy,
@ -409,7 +409,7 @@ public:
typedef typename base::side_calculator_type side_calculator_type;
typedef typename base::result_type result_type;
typedef typename result_type::intersection_points_type i_info_type;
typedef typename result_type::direction_type d_info_type;
@ -462,7 +462,7 @@ public:
return true;
}
}
return false;
}
@ -485,18 +485,18 @@ public:
bool const has_pk = ! base::p_is_last_segment();
int const pk_q1 = has_pk ? base::sides().pk_wrt_q1() : 0;
int const pk_q2 = has_pk ? base::sides().pk_wrt_q2() : 0;
if (pk_q1 == -pk_q2)
{
if (pk_q1 == 0)
{
return direction_code<cs_tag>(base::rqi(), base::rqj(), base::rqk()) == -1;
}
return true;
}
}
return false;
}

View File

@ -120,12 +120,12 @@ struct get_turn_info_linear_areal
replace_method_and_operations_tm(tp.method,
tp.operations[0].operation,
tp.operations[1].operation);
// this function assumes that 'u' must be set for a spike
calculate_spike_operation(tp.operations[0].operation,
inters,
umbrella_strategy);
*out++ = tp;
}
}
@ -148,7 +148,7 @@ struct get_turn_info_linear_areal
{
// do nothing
}
else
else
{
using handler = touch<TurnInfo, verify_policy_la>;
handler::apply(range_p, range_q, tp,
@ -178,7 +178,7 @@ struct get_turn_info_linear_areal
}
else
{
tp.operations[0].operation = operation_union;
tp.operations[0].operation = operation_union;
}
}
}
@ -407,7 +407,7 @@ struct get_turn_info_linear_areal
if ( is_p_spike )
{
int const pk_q1 = inters.sides().pk_wrt_q1();
bool going_in = pk_q1 < 0; // Pk on the right
bool going_out = pk_q1 > 0; // Pk on the left
@ -415,7 +415,7 @@ struct get_turn_info_linear_areal
// special cases
if ( qk_q1 < 0 ) // Q turning R
{
{
// spike on the edge point
// if it's already known that the spike is going out this musn't be checked
if ( ! going_out
@ -528,7 +528,7 @@ struct get_turn_info_linear_areal
|| tp.operations[0].operation == operation_intersection ) : // i ???
true )
&& inters.is_spike_p();
// TODO: throw an exception for spike in Areal?
/*bool is_q_spike = ( ( Version == append_touches
&& tp.operations[1].operation == operation_continue )
@ -675,7 +675,7 @@ struct get_turn_info_linear_areal
// possible to define a spike on an endpoint. Areal geometries must
// NOT have spikes at all. One thing that could be done is to throw
// an exception when spike is detected in Areal geometry.
template <bool EnableFirst,
bool EnableLast,
typename UniqueSubRange1,
@ -801,7 +801,7 @@ struct get_turn_info_linear_areal
&& ( ip_count > 1 ? (ip1.is_pj && !ip1.is_qi) : (ip0.is_pj && !ip0.is_qi) ) ) // prevents duplication
{
TurnInfo tp = tp_model;
if ( inters.i_info().count > 1 )
{
//BOOST_GEOMETRY_ASSERT( result.template get<1>().dir_a == 0 && result.template get<1>().dir_b == 0 );
@ -827,7 +827,7 @@ struct get_turn_info_linear_areal
{
side_pi_y = sides.apply(range_q.at(1), range_q.at(2), range_p.at(0)); // pi wrt q2
side_pi_x = sides.apply(range_q.at(0), range_q.at(1), range_p.at(0)); // pi wrt q1
side_qz_x = sides.apply(range_q.at(0), range_q.at(1), range_q.at(2)); // qk wrt q1
side_qz_x = sides.apply(range_q.at(0), range_q.at(1), range_q.at(2)); // qk wrt q1
}
// 2. ip0 or pj in the middle of q1
else
@ -853,7 +853,7 @@ struct get_turn_info_linear_areal
tp.operations[0].operation = operation_blocked;
tp.operations[0].position = position_back;
tp.operations[1].position = position_middle;
// equals<> or collinear<> will assign the second point,
// we'd like to assign the first one
unsigned int ip_index = ip_count > 1 ? 1 : 0;

View File

@ -110,7 +110,7 @@ struct get_turn_info_linear_linear
inters.swapped_sides(),
umbrella_strategy);
}
if ( tp.operations[0].operation == operation_blocked )
{
tp.operations[1].is_collinear = true;
@ -123,7 +123,7 @@ struct get_turn_info_linear_linear
replace_method_and_operations_tm(tp.method,
tp.operations[0].operation,
tp.operations[1].operation);
*out++ = tp;
}
}
@ -149,7 +149,7 @@ struct get_turn_info_linear_linear
{
// do nothing
}
else
else
{
handler::apply(range_p, range_q, tp,
inters.i_info(), inters.d_info(),
@ -169,7 +169,7 @@ struct get_turn_info_linear_linear
if ( inters.is_spike_p() && inters.is_spike_q() )
{
tp.operations[0].operation = operation_union;
tp.operations[1].operation = operation_union;
tp.operations[1].operation = operation_union;
}
else
{
@ -188,7 +188,7 @@ struct get_turn_info_linear_linear
}
else
{
tp.operations[0].operation = operation_union;
tp.operations[0].operation = operation_union;
}
}
else
@ -207,7 +207,7 @@ struct get_turn_info_linear_linear
}
else
{
tp.operations[1].operation = operation_union;
tp.operations[1].operation = operation_union;
}
}
else
@ -223,7 +223,7 @@ struct get_turn_info_linear_linear
&& inters.is_spike_p() )
{
tp.operations[0].operation = operation_union;
tp.operations[1].operation = operation_union;
tp.operations[1].operation = operation_union;
}
}
else if ( tp.operations[0].operation == operation_none
@ -379,7 +379,7 @@ struct get_turn_info_linear_linear
// transform turn
turn_transformer_ec transformer(method_replace);
transformer(tp);
// conditionally handle spikes
if ( ! BOOST_GEOMETRY_CONDITION(handle_spikes)
|| ! append_collinear_spikes(tp, inters,
@ -524,7 +524,7 @@ struct get_turn_info_linear_linear
return true;
}
return false;
}
@ -567,9 +567,9 @@ struct get_turn_info_linear_linear
{
tp.operations[0].is_collinear = true;
tp.operations[1].is_collinear = false;
BOOST_GEOMETRY_ASSERT(inters.i_info().count > 1);
base_turn_handler::assign_point(tp, method_touch_interior,
inters.i_info(), 1);
}
@ -598,7 +598,7 @@ struct get_turn_info_linear_linear
{
tp.operations[0].is_collinear = false;
tp.operations[1].is_collinear = true;
BOOST_GEOMETRY_ASSERT(inters.i_info().count > 0);
base_turn_handler::assign_point(tp, method_touch_interior, inters.i_info(), 0);
@ -613,7 +613,7 @@ struct get_turn_info_linear_linear
res = true;
}
return res;
}

View File

@ -63,7 +63,7 @@ struct intersection_box_box
// Set dimensions of output coordinate
set<min_corner, Dimension>(box_out, min1 < min2 ? min2 : min1);
set<max_corner, Dimension>(box_out, max1 > max2 ? max2 : max1);
return intersection_box_box<Dimension + 1, DimensionCount>
::apply(box1, box2, robust_policy, box_out, strategy);
}

View File

@ -378,7 +378,7 @@ struct intersection_of_linestring_with_areal
return out;
}
#if defined(BOOST_GEOMETRY_DEBUG_FOLLOW)
int index = 0;
for(typename std::deque<turn_info>::const_iterator
@ -1543,7 +1543,7 @@ inline OutputIterator intersection_insert(Geometry1 const& geometry1,
<
Geometry1, Geometry2
>::type strategy_type;
return intersection_insert<GeometryOut>(geometry1, geometry2, out,
strategy_type());
}

View File

@ -157,7 +157,7 @@ private:
private:
MultiPolygon const& m_multipolygon;
OutputIterator& m_oit;
OutputIterator& m_oit;
Strategy const& m_strategy;
};

View File

@ -154,7 +154,7 @@ inline int range_in_geometry(Point1 const& first_point1,
// check points of geometry1 until point inside/outside is found
// NOTE: skip first point because it should be already tested above
result = range_in_geometry(geometry1, geometry2, strategy, true);
}
}
return result;
}

View File

@ -321,7 +321,7 @@ inline void select_rings(Geometry1 const& geometry1, Geometry2 const& geometry2,
{
typedef typename geometry::tag<Geometry1>::type tag1;
typedef typename geometry::tag<Geometry2>::type tag2;
RingPropertyMap all_ring_properties;
dispatch::select_rings<tag1, Geometry1>::apply(geometry1, geometry2,
ring_identifier(0, -1, -1), all_ring_properties,

View File

@ -356,7 +356,7 @@ struct self_get_turn_points<Reverse, AssignPolicy, Strategy, false>
namespace detail { namespace self_get_turn_points
{
// Version where Reverse can be specified manually. TODO:
// Version where Reverse can be specified manually. TODO:
// can most probably be merged with self_get_turn_points::get_turn
template
<

View File

@ -26,7 +26,7 @@
namespace boost { namespace geometry
{
namespace de9im
{
@ -104,7 +104,7 @@ public:
inline explicit mask(const char* code)
: base_type(code)
{}
/*!
\brief The constructor.
\param code The mask pattern.

View File

@ -208,7 +208,7 @@ struct gc_gc
{
tuple1_t tuple1;
tuple2_t tuple2;
// Create MPts, MLss and MPos containing all gc elements from this group
// They may potentially intersect each other
for (auto const& id : inters_group)
@ -269,7 +269,7 @@ struct gc_gc
// If needed divide MLss into two parts:
// - inside Areal of other GC
// - outside of other GC Areal to check WRT Linear of other GC
// - outside of other GC Areal to check WRT Linear of other GC
mls2_t mls2_diff_mpo1, mls2_inters_mpo1;
bool is_mls2_divided = false;
mls1_t mls1_diff_mpo2, mls1_inters_mpo2;
@ -284,7 +284,7 @@ struct gc_gc
geometry::intersection(mls2, mpo1, mls2_inters_mpo1);
is_mls2_divided = true;
}
// L/LA
// L/LA
if (! geometry::is_empty(mpo2))
{
geometry::difference(mls1, mpo2, mls1_diff_mpo2);

View File

@ -214,7 +214,7 @@ struct relate<default_strategy, false>
Geometry1,
Geometry2
>::type strategy_type;
dispatch::relate
<
Geometry1,

View File

@ -275,7 +275,7 @@ inline bool calculate_from_inside(Geometry1 const& geometry1,
}
auto const& range1 = sub_range(geometry1, turn.operations[op_id].seg_id);
using range2_view = detail::closed_clockwise_view<typename ring_type<Geometry2>::type const>;
using range2_iterator = typename boost::range_iterator<range2_view const>::type;
range2_view const range2(sub_range(geometry2, turn.operations[other_op_id].seg_id));

View File

@ -515,7 +515,7 @@ struct linear_linear
bool const other_b = is_ip_on_boundary(it->point,
it->operations[other_op_id],
other_boundary_checker);
// if current IP is on boundary of the geometry
if ( this_b )
{

View File

@ -160,7 +160,7 @@ struct multi_point_geometry_eb<Geometry, multi_linestring_tag>
typedef std::vector<point_type> points_type;
typedef geometry::less<void, -1, typename Strategy::cs_tag> less_type;
points_type points(boost::begin(multi_point), boost::end(multi_point));
points_type points(boost::begin(multi_point), boost::end(multi_point));
std::sort(points.begin(), points.end(), less_type());
boundary_visitor<points_type> visitor(points);
@ -183,7 +183,7 @@ struct multi_point_single_geometry
{
typedef typename point_type<SingleGeometry>::type point2_type;
typedef model::box<point2_type> box2_type;
box2_type box2;
geometry::envelope(single_geometry, box2, strategy);
geometry::detail::expand_by_epsilon(box2);

View File

@ -169,7 +169,7 @@ struct geometry_point
// //}
// return result("F0FFFF**T");
// }
// else
// else
// {
// /*if ( box_has_interior<Box>::apply(box) )
// {
@ -195,7 +195,7 @@ struct geometry_point
// return result("0FTFFTFFT");
// else if ( geometry::covered_by(point, box) )
// return result("FF*0F*FFT");
// else
// else
// return result("FF*FFT0FT");
// }
//};

View File

@ -67,7 +67,7 @@ public:
static const std::size_t static_width = Width;
static const std::size_t static_height = Height;
static const std::size_t static_size = Width * Height;
inline matrix()
{
std::fill_n(m_array, static_size, 'F');
@ -117,7 +117,7 @@ public:
{
return static_size;
}
inline const char * data() const
{
return m_array;
@ -358,7 +358,7 @@ struct may_update_dispatch
BOOST_STATIC_ASSERT('0' <= D && D <= '9');
char const m = mask.template get<F1, F2>();
if ( m == 'F' )
{
return true;
@ -647,7 +647,7 @@ struct static_mask
BOOST_STATIC_ASSERT(
std::size_t(util::sequence_size<Seq>::value) == static_size);
template <detail::relate::field F1, detail::relate::field F2>
struct static_get
{
@ -744,7 +744,7 @@ struct static_interrupt_dispatch<StaticMask, V, F1, F2, true, IsSequence>
static const char mask_el = StaticMask::template static_get<F1, F2>::value;
static const bool value
= ( V >= '0' && V <= '9' ) ?
= ( V >= '0' && V <= '9' ) ?
( mask_el == 'F' || ( mask_el < V && mask_el >= '0' && mask_el <= '9' ) ) :
( ( V == 'T' ) ? mask_el == 'F' : false );
};
@ -930,7 +930,7 @@ struct static_check_dispatch
&& per_one<exterior, boundary>::apply(matrix)
&& per_one<exterior, exterior>::apply(matrix);
}
template <field F1, field F2>
struct per_one
{

View File

@ -200,7 +200,7 @@ private:
<
typename boost::range_value<MultiLinestring const>::type const
>::type point_reference;
point_reference front_pt = range::front(ls);
point_reference back_pt = range::back(ls);
@ -341,7 +341,7 @@ struct topology_check<MultiPolygon, Strategy, multi_polygon_tag>
: topology_check_areal
{
topology_check(MultiPolygon const&, Strategy const&) {}
template <typename Point>
static bool check_boundary_point(Point const& ) { return true; }
};

View File

@ -249,7 +249,7 @@ struct less_op_areal_areal
else if ( right_operation.operation == overlay::operation_intersection )
return false;
}
return op_to_int_iuxc(left_operation) < op_to_int_iuxc(right_operation);
}
}

View File

@ -70,7 +70,7 @@ struct preceding_check<0, Geometry, spherical_tag>
calc_t const value = get<0>(point);
calc_t const other_min = get<min_corner, 0>(other_box);
calc_t const other_max = get<max_corner, 0>(other_box);
bool const pt_covered = strategy::within::detail::covered_by_range
<
Point, 0, spherical_tag

View File

@ -87,7 +87,7 @@ struct box_box_loop
{
touch = true;
}
return box_box_loop
<
Dimension + 1,

View File

@ -389,7 +389,7 @@ struct output_geometry_access<TupledOut, Tag, DefaultTag, void>
>::value;
typedef typename geometry::tuples::element<index, TupledOut>::type type;
template <typename Tuple>
static typename geometry::tuples::element<index, Tuple>::type&
get(Tuple & tup)

View File

@ -140,7 +140,7 @@ struct multi_point_single_geometry
typedef decltype(strategy.covered_by(*it, box)) point_in_box_type;
int in_val = 0;
// exterior of box and of geometry
if (! point_in_box_type::apply(*it, box)
|| (in_val = point_in_geometry(*it, linear_or_areal, strategy)) < 0)

View File

@ -204,7 +204,7 @@ struct point_in_geometry<Polygon, polygon_tag>
{
typename interior_return_type<Polygon const>::type
rings = interior_rings(polygon);
for (typename detail::interior_iterator<Polygon const>::type
it = boost::begin(rings);
it != boost::end(rings);

View File

@ -431,7 +431,7 @@ private:
{
traits::iter_visit<Geometry2>::apply([&](auto const& g2)
{
multi_out_minus_g2(out, g2, strategy);
multi_out_minus_g2(out, g2, strategy);
}, qit->second);
if (boost::empty(out))
@ -563,7 +563,7 @@ struct difference<Strategy, false>
Strategy const& strategy)
{
using strategies::relate::services::strategy_converter;
difference
<
decltype(strategy_converter<Strategy>::get(strategy))
@ -586,7 +586,7 @@ struct difference<default_strategy, false>
Geometry1,
Geometry2
>::type strategy_type;
difference
<
strategy_type

View File

@ -187,7 +187,7 @@ struct multi_range_multi_range
boost::geometry::detail::throw_on_empty_input(mrng1);
boost::geometry::detail::throw_on_empty_input(mrng2);
size_type n = boost::size(mrng1);
result_type haus_dis = 0;

View File

@ -33,7 +33,7 @@ namespace dispatch
template
<
typename Geometry1, typename Geometry2,
typename Geometry1, typename Geometry2,
typename Tag1 = typename tag_cast
<
typename tag<Geometry1>::type,

View File

@ -288,9 +288,9 @@ struct fe_segment_range_with_closure<open>
{
return true;
}
--end;
if (begin == end)
{
// single point ranges already handled in closed case above

View File

@ -81,8 +81,8 @@ struct multi_is_empty
template <typename MultiGeometry>
static inline bool apply(MultiGeometry const& multigeometry)
{
return std::all_of(boost::begin(multigeometry),
boost::end(multigeometry),
return std::all_of(boost::begin(multigeometry),
boost::end(multigeometry),
[]( auto const& range ){ return Policy::apply(range); });
}
};

View File

@ -259,7 +259,7 @@ struct line_interpolate<Strategy, false>
Distance const& max_distance,
Pointlike & pointlike,
Strategy const& strategy)
{
{
using strategies::line_interpolate::services::strategy_converter;
dispatch::line_interpolate
@ -278,7 +278,7 @@ struct line_interpolate<default_strategy, false>
Distance const& max_distance,
Pointlike & pointlike,
default_strategy)
{
{
typedef typename strategies::line_interpolate::services::default_strategy
<
Geometry

View File

@ -892,7 +892,7 @@ struct simplify_insert<default_strategy, false>
<
Geometry
>::type strategy_type;
simplify_insert
<
strategy_type
@ -935,7 +935,7 @@ struct simplify<GeometryIn, GeometryOut, dynamic_geometry_tag, dynamic_geometry_
traits::visit<GeometryIn>::apply([&](auto const& g)
{
using geom_t = util::remove_cref_t<decltype(g)>;
using detail::simplify::static_geometry_type;
using detail::simplify::static_geometry_type;
using geom_out_t = typename static_geometry_type<geom_t, GeometryOut>::type;
geom_out_t o;
simplify<geom_t, geom_out_t>::apply(g, o, max_distance, strategy);
@ -956,7 +956,7 @@ struct simplify<GeometryIn, GeometryOut, geometry_collection_tag, geometry_colle
detail::visit_breadth_first([&](auto const& g)
{
using geom_t = util::remove_cref_t<decltype(g)>;
using detail::simplify::static_geometry_type;
using detail::simplify::static_geometry_type;
using geom_out_t = typename static_geometry_type<geom_t, GeometryOut>::type;
geom_out_t o;
simplify<geom_t, geom_out_t>::apply(g, o, max_distance, strategy);

View File

@ -706,7 +706,7 @@ struct sym_difference<default_strategy, false>
namespace resolve_dynamic
{
template
<
typename Geometry1, typename Geometry2,
@ -781,7 +781,7 @@ struct sym_difference<DynamicGeometry1, DynamicGeometry2, dynamic_geometry_tag,
}, geometry1, geometry2);
}
};
} // namespace resolve_dynamic
@ -850,7 +850,7 @@ inline void sym_difference(Geometry1 const& geometry1,
<
Geometry1,
Geometry2
>::apply(geometry1, geometry2, output_collection, default_strategy());
>::apply(geometry1, geometry2, output_collection, default_strategy());
}

View File

@ -462,7 +462,7 @@ struct union_
{
detail::random_access_view<Geometry1 const> gc1_view(geometry1);
detail::random_access_view<Geometry2 const> gc2_view(geometry2);
detail::gc_group_elements(gc1_view, gc2_view, strategy,
[&](auto const& inters_group)
{
@ -763,7 +763,7 @@ struct union_<default_strategy, false>
namespace resolve_dynamic
{
template
<
typename Geometry1, typename Geometry2,
@ -853,7 +853,7 @@ struct union_<DynamicGeometry1, DynamicGeometry2, dynamic_geometry_tag, dynamic_
}
};
} // namespace resolve_dynamic

View File

@ -68,7 +68,7 @@ struct dot_product_maker<P1, P2, DimensionCount, DimensionCount>
\param p1 first point
\param p2 second point
\return the dot product
\qbk{[heading Examples]}
\qbk{[dot_product] [dot_product_output]}

View File

@ -45,7 +45,7 @@ inline bool vec_normalize(Point & pt, typename coordinate_type<Point>::type & le
coord_t const c0 = 0;
len = vec_length(pt);
if (math::equals(len, c0))
{
return false;

View File

@ -68,13 +68,13 @@ namespace detail { namespace shapefile
template <typename IStream, typename T>
inline void read_native(IStream & is, T & v)
{
is.read(reinterpret_cast<char*>(&v), sizeof(T));
is.read(reinterpret_cast<char*>(&v), sizeof(T));
}
template <typename IStream, typename T>
inline void read_big(IStream & is, T & v)
{
is.read(reinterpret_cast<char*>(&v), sizeof(T));
is.read(reinterpret_cast<char*>(&v), sizeof(T));
boost::endian::big_to_native_inplace(v);
}
@ -104,7 +104,7 @@ inline void double_endianness_check()
c[7] = 0xc0;
boost::endian::little_to_native_inplace(*i);
if (static_cast<int>(d) != -149)
{
BOOST_THROW_EXCEPTION(read_shapefile_exception("Unexpected endianness of double, please contact developers."));
@ -140,7 +140,7 @@ inline boost::int32_t reset_and_read_header(IStream & is)
// 5 unused, length, version
is.seekg(7 * sizeof(boost::int32_t), IStream::cur);
boost::int32_t type = 0;
read_little(is, type);
@ -376,7 +376,7 @@ struct read_point_policy
read_m(is);
}
if (! is.good())
{
BOOST_THROW_EXCEPTION(read_shapefile_exception("Read error"));
@ -470,7 +470,7 @@ struct read_polyline_policy
}
read_parts(is, parts, num_parts);
for (boost::int32_t i = 0; i < num_parts; ++i)
{
boost::int32_t f = parts[i];
@ -484,9 +484,9 @@ struct read_polyline_policy
range::push_back(linestrings, ls_type());
ls_type & ls = range::back(linestrings);
std::size_t ls_size = l - f;
std::size_t ls_size = l - f;
range::resize(ls, ls_size);
read_and_set_points(is, ls, ls_size);
if (type == shape_type::polyline_z || type == shape_type::polyline_m)
@ -681,7 +681,7 @@ struct read_polygon_policy
// unexpected, file corrupted, bug or numerical error
BOOST_THROW_EXCEPTION(read_shapefile_exception("Exterior ring expected"));
}
if (! is.good())
{
BOOST_THROW_EXCEPTION(read_shapefile_exception("Read error"));
@ -784,7 +784,7 @@ struct read_shapefile<Geometry, point_tag>
static inline void apply(IStream &is, Points & points, Strategy const& strategy)
{
namespace shp = detail::shapefile;
boost::int32_t const type = shp::reset_and_read_header(is);
if (type == shp::shape_type::point
@ -809,7 +809,7 @@ struct read_shapefile<Geometry, multi_point_tag>
static inline void apply(IStream &is, MultiPoints & multi_points, Strategy const& strategy)
{
namespace shp = detail::shapefile;
boost::int32_t const type = shp::reset_and_read_header(is);
if (type == shp::shape_type::point

View File

@ -144,8 +144,8 @@ struct geometry_type_impl<Geometry, OgcType, 3>
template
<
typename Geometry,
typename CheckPolicy = ogc_policy,
typename Geometry,
typename CheckPolicy = ogc_policy,
typename Tag = typename tag<Geometry>::type
>
struct geometry_type : not_implemented<Tag>

View File

@ -129,7 +129,7 @@ template <typename Geometry>
struct geometry_type_parser
{
template <typename Iterator>
static bool parse(Iterator& it, Iterator end,
static bool parse(Iterator& it, Iterator end,
byte_order_type::enum_t order)
{
boost::uint32_t value;
@ -147,7 +147,7 @@ template <typename P,
struct parsing_assigner
{
template <typename Iterator>
static void run(Iterator& it, Iterator end, P& point,
static void run(Iterator& it, Iterator end, P& point,
byte_order_type::enum_t order)
{
typedef typename coordinate_type<P>::type coordinate_type;
@ -186,7 +186,7 @@ template <typename P>
struct point_parser
{
template <typename Iterator>
static bool parse(Iterator& it, Iterator end, P& point,
static bool parse(Iterator& it, Iterator end, P& point,
byte_order_type::enum_t order)
{
if (geometry_type_parser<P>::parse(it, end, order))
@ -205,7 +205,7 @@ template <typename C>
struct point_container_parser
{
template <typename Iterator>
static bool parse(Iterator& it, Iterator end, C& container,
static bool parse(Iterator& it, Iterator end, C& container,
byte_order_type::enum_t order)
{
typedef typename point_type<C>::type point_type;
@ -215,7 +215,7 @@ struct point_container_parser
{
return false;
}
typedef typename std::iterator_traits<Iterator>::difference_type size_type;
if(num_points > (std::numeric_limits<boost::uint32_t>::max)() )
{
@ -256,7 +256,7 @@ template <typename L>
struct linestring_parser
{
template <typename Iterator>
static bool parse(Iterator& it, Iterator end, L& linestring,
static bool parse(Iterator& it, Iterator end, L& linestring,
byte_order_type::enum_t order)
{
if (!geometry_type_parser<L>::parse(it, end, order))
@ -268,7 +268,7 @@ struct linestring_parser
{
throw boost::geometry::read_wkb_exception();
}
return point_container_parser<L>::parse(it, end, linestring, order);
}
};
@ -277,7 +277,7 @@ template <typename Polygon>
struct polygon_parser
{
template <typename Iterator>
static bool parse(Iterator& it, Iterator end, Polygon& polygon,
static bool parse(Iterator& it, Iterator end, Polygon& polygon,
byte_order_type::enum_t order)
{
if (!geometry_type_parser<Polygon>::parse(it, end, order))
@ -290,7 +290,7 @@ struct polygon_parser
{
return false;
}
typedef typename boost::geometry::ring_return_type<Polygon>::type ring_type;
std::size_t rings_parsed = 0;
@ -308,7 +308,7 @@ struct polygon_parser
{
boost::geometry::range::resize(interior_rings(polygon), rings_parsed);
ring_type ringN = boost::geometry::range::back(interior_rings(polygon));
if (!point_container_parser<ring_type>::parse(it, end, ringN, order))
{
return false;

View File

@ -218,7 +218,7 @@ namespace detail { namespace wkb
for(typename boost::range_iterator<ring_type const>::type
point_iter = boost::begin(*ring_iter);
point_iter != boost::end(*ring_iter);
point_iter != boost::end(*ring_iter);
++point_iter)
{
// write point's x, y, z

View File

@ -29,7 +29,7 @@ namespace dispatch
{
template <typename Tag, typename G>
struct write_wkb
struct write_wkb
{
};
@ -101,8 +101,8 @@ inline bool write_wkb(const G& geometry, OutputIterator iter)
}
// template <typename G, typename OutputIterator>
// inline bool write_wkb(G& geometry, OutputIterator iter,
// detail::wkb::byte_order_type::enum_t source_byte_order,
// inline bool write_wkb(G& geometry, OutputIterator iter,
// detail::wkb::byte_order_type::enum_t source_byte_order,
// detail::wkb::byte_order_type::enum_t target_byte_order)
// {
// // The WKB is written to an OutputIterator.
@ -112,7 +112,7 @@ inline bool write_wkb(const G& geometry, OutputIterator iter)
// typename std::iterator_traits<OutputIterator>::iterator_category,
// const std::output_iterator_tag&
// >::value));
//
//
// if
// (
// !dispatch::write_wkb
@ -124,7 +124,7 @@ inline bool write_wkb(const G& geometry, OutputIterator iter)
// {
// return false;
// }
//
//
// return true;
// }

View File

@ -43,40 +43,40 @@ struct multipoint_parser
{
return false;
}
boost::uint32_t num_points(0);
if (!value_parser<boost::uint32_t>::parse(it, end, num_points, order))
{
return false;
}
// Check that the number of double values in the stream is equal
// or greater than the number of expected values in the multipoint
typedef typename std::iterator_traits<Iterator>::difference_type size_type;
typedef typename point_type<MultiPoint>::type point_type;
size_type const container_byte_size = dimension<point_type>::value * num_points * sizeof(double)
+ num_points * sizeof(boost::uint8_t)
+ num_points * sizeof(boost::uint32_t);
size_type const stream_byte_size = std::distance(it,end);
if(stream_byte_size < container_byte_size)
{
throw boost::geometry::read_wkb_exception();
}
point_type point_buffer;
std::back_insert_iterator<MultiPoint> output(std::back_inserter(multipoint));
typedef typename std::iterator_traits<Iterator>::difference_type size_type;
if(num_points > (std::numeric_limits<boost::uint32_t>::max)() )
{
throw boost::geometry::read_wkb_exception();
}
size_type points_parsed = 0;
while (points_parsed < num_points && it != end)
{
@ -85,16 +85,16 @@ struct multipoint_parser
{
return false;
}
if (!geometry_type_parser<point_type>::parse(it, end, point_byte_order))
{
return false;
}
parsing_assigner<point_type, 0, dimension<point_type>::value>::run(it, end, point_buffer, point_byte_order);
output = point_buffer;
++output;
++points_parsed;
}
@ -110,49 +110,49 @@ struct multilinestring_parser
{
typedef typename MultiLinestring::value_type linestring_type;
typedef typename point_type<MultiLinestring>::type point_type;
if (!geometry_type_parser<MultiLinestring>::parse(it, end, order))
{
return false;
}
boost::uint32_t num_linestrings(0);
if (!value_parser<boost::uint32_t>::parse(it, end, num_linestrings, order))
{
return false;
}
std::back_insert_iterator<MultiLinestring> output(std::back_inserter(multilinestring));
typedef typename std::iterator_traits<Iterator>::difference_type size_type;
if(num_linestrings > (std::numeric_limits<boost::uint32_t>::max)() )
{
throw boost::geometry::read_wkb_exception();
}
size_type linestrings_parsed = 0;
while (linestrings_parsed < num_linestrings && it != end)
{
linestring_type linestring_buffer;
detail::wkb::byte_order_type::enum_t linestring_byte_order;
if (!detail::wkb::byte_order_parser::parse(it, end, linestring_byte_order))
{
return false;
}
if (!geometry_type_parser<linestring_type>::parse(it, end, order))
{
return false;
}
if(!point_container_parser<linestring_type>::parse(it, end, linestring_buffer, linestring_byte_order))
{
return false;
}
output = linestring_buffer;
++output;
++linestrings_parsed;
}
@ -167,44 +167,44 @@ struct multipolygon_parser
static bool parse(Iterator& it, Iterator end, MultiPolygon& multipolygon, byte_order_type::enum_t order)
{
typedef typename boost::range_value<MultiPolygon>::type polygon_type;
if (!geometry_type_parser<MultiPolygon>::parse(it, end, order))
{
return false;
}
boost::uint32_t num_polygons(0);
if (!value_parser<boost::uint32_t>::parse(it, end, num_polygons, order))
{
return false;
}
std::back_insert_iterator<MultiPolygon> output(std::back_inserter(multipolygon));
std::size_t polygons_parsed = 0;
while(polygons_parsed < num_polygons && it != end)
{
polygon_type polygon_buffer;
detail::wkb::byte_order_type::enum_t polygon_byte_order;
if (!detail::wkb::byte_order_parser::parse(it, end, polygon_byte_order))
{
return false;
}
if (!geometry_type_parser<polygon_type>::parse(it, end, order))
{
return false;
}
boost::uint32_t num_rings(0);
if (!value_parser<boost::uint32_t>::parse(it, end, num_rings, polygon_byte_order))
{
return false;
}
std::size_t rings_parsed = 0;
while (rings_parsed < num_rings && it != end)
{
typedef typename boost::geometry::ring_return_type<polygon_type>::type ring_type;
@ -212,7 +212,7 @@ struct multipolygon_parser
if (0 == rings_parsed)
{
ring_type ring0 = exterior_ring(polygon_buffer);
if (!point_container_parser<ring_type>::parse(it, end, ring0, polygon_byte_order))
{
return false;
@ -222,7 +222,7 @@ struct multipolygon_parser
{
boost::geometry::range::resize(interior_rings(polygon_buffer), rings_parsed);
ring_type ringN = boost::geometry::range::back(interior_rings(polygon_buffer));
if (!point_container_parser<ring_type>::parse(it, end, ringN, polygon_byte_order))
{
return false;
@ -230,11 +230,11 @@ struct multipolygon_parser
}
++rings_parsed;
}
output = polygon_buffer;
++output;
}
return true;
}
};

View File

@ -62,9 +62,9 @@ namespace detail { namespace wkb
// write num points
uint32_t num_points = boost::size(multipoint);
value_writer<uint32_t>::write(num_points, iter, byte_order);
typedef typename point_type<MultiPoint>::type point_type;
for(typename boost::range_iterator<MultiPoint const>::type
point_iter = boost::begin(multipoint);
point_iter != boost::end(multipoint);
@ -95,9 +95,9 @@ namespace detail { namespace wkb
// write num linestrings
uint32_t num_linestrings = boost::size(multilinestring);
value_writer<uint32_t>::write(num_linestrings, iter, byte_order);
typedef typename boost::range_value<MultiLinestring>::type linestring_type;
for(typename boost::range_iterator<MultiLinestring const>::type
linestring_iter = boost::begin(multilinestring);
linestring_iter != boost::end(multilinestring);
@ -128,9 +128,9 @@ namespace detail { namespace wkb
// write num polygons
uint32_t num_polygons = boost::size(multipolygon);
value_writer<uint32_t>::write(num_polygons, iter, byte_order);
typedef typename boost::range_value<MultiPolygon>::type polygon_type;
for(typename boost::range_iterator<MultiPolygon const>::type
polygon_iter = boost::begin(multipolygon);
polygon_iter != boost::end(multipolygon);

View File

@ -56,7 +56,7 @@ inline bool box_in_circle(B const& b, C const& c, S const& strategy)
// Currently only implemented for 2d geometries
assert_dimension<point_type, 2>();
assert_dimension<C, 2>();
// Box: all four points must lie within circle
point_type const p0 = geometry::make<point_type>(get<min_corner, 0>(b), get<min_corner, 1>(b));
point_type const p1 = geometry::make<point_type>(get<max_corner, 0>(b), get<max_corner, 1>(b));

View File

@ -67,7 +67,7 @@ public:
CT sin_bet1 = one_minus_f * sin_lat1;
CT sin_bet2 = one_minus_f * sin_lat2;
// equator
if (math::equals(sin_bet1, c0) && math::equals(sin_bet2, c0))
{
@ -80,7 +80,7 @@ public:
CT m12 = azi_sign * sin(sig_12) * b;
reduced_length = m12;
}
if (BOOST_GEOMETRY_CONDITION(EnableGeodesicScale))
{
CT M12 = cos(sig_12);
@ -180,11 +180,11 @@ private:
{
return cos_alp0_sqr * f * L1;
}
CT const sin_4sig1 = c2 * sin_2sig1 * (math::sqr(cos_sig1) - math::sqr(sin_sig1)); // sin(4sig1)
CT const sin_4sig2 = c2 * sin_2sig2 * (math::sqr(cos_sig2) - math::sqr(sin_sig2)); // sin(4sig2)
CT const sin_4sig_12 = sin_4sig2 - sin_4sig1;
CT const c8 = 8;
CT const c12 = 12;
CT const c16 = 16;
@ -266,11 +266,11 @@ private:
CT const c8 = 8;
CT const c64 = 64;
CT const sin_4sig1 = c2 * sin_2sig1 * (math::sqr(cos_sig1) - math::sqr(sin_sig1)); // sin(4sig1)
CT const sin_4sig2 = c2 * sin_2sig2 * (math::sqr(cos_sig2) - math::sqr(sin_sig2)); // sin(4sig2)
CT const sin_4sig_12 = sin_4sig2 - sin_4sig1;
CT const L2 = (sin_4sig_12 - c8 * sin_2sig_12 + 12 * sig_12) / c64;
if (Order == 2)

View File

@ -29,7 +29,7 @@
#include <boost/geometry/util/select_coordinate_type.hpp>
namespace boost { namespace geometry {
namespace formula {
template <typename Point3d, typename PointGeo, typename Spheroid>
@ -107,11 +107,11 @@ inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid)
calc_t const xy_l = math::sqrt(math::sqr(x) + math::sqr(y));
calc_t const lonr = atan2(y, x);
// NOTE: Alternative version
// http://www.iag-aig.org/attach/989c8e501d9c5b5e2736955baf2632f5/V60N2_5FT.pdf
// calc_t const lonr = c2 * atan2(y, x + xy_l);
calc_t const latr = atan2(z, (c1 - e_sqr) * xy_l);
// NOTE: If h is equal to 0 then there is no need to improve value of latitude
@ -141,8 +141,8 @@ inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid)
template <typename Point3d, typename Spheroid>
inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid)
{
typedef typename coordinate_type<Point3d>::type coord_t;
typedef typename coordinate_type<Point3d>::type coord_t;
// len_xy = sqrt(x^2 + y^2)
// r = len_xy - |z / tan(lat)|
// assuming h = 0
@ -151,7 +151,7 @@ inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid
// r = e^2 * len_xy
// x_res = r * cos(lon) = e^2 * len_xy * x / len_xy = e^2 * x
// y_res = r * sin(lon) = e^2 * len_xy * y / len_xy = e^2 * y
coord_t const c0 = 0;
coord_t const e_sqr = formula::eccentricity_sqr<coord_t>(spheroid);
@ -178,7 +178,7 @@ inline Point3d projected_to_surface(Point3d const& direction, Spheroid const& sp
//(x*x+y*y)/(a*a) + z*z/(b*b) = 1
// x = d.x * t
// y = d.y * t
// z = d.z * t
// z = d.z * t
coord_t const dx = get<0>(direction);
coord_t const dy = get<1>(direction);
coord_t const dz = get<2>(direction);
@ -217,7 +217,7 @@ inline bool projected_to_surface(Point3d const& origin, Point3d const& direction
//(x*x+y*y)/(a*a) + z*z/(b*b) = 1
// x = o.x + d.x * t
// y = o.y + d.y * t
// z = o.z + d.z * t
// z = o.z + d.z * t
coord_t const ox = get<0>(origin);
coord_t const oy = get<1>(origin);
coord_t const oz = get<2>(origin);

Some files were not shown because too many files have changed in this diff Show More