mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-30 20:02:11 +00:00
Merge branch 'develop' into feature/buffer_point_geographic
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
[/============================================================================
|
||||
Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
Copyright (c) 2009-2018 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
Copyright (c) 2009-2018 Mateusz Loskot, London, UK.
|
||||
Copyright (c) 2009-2018 Bruno Lalande, Paris, France.
|
||||
Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
|
||||
Copyright (c) 2009-2019 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
Copyright (c) 2009-2019 Mateusz Loskot, London, UK.
|
||||
Copyright (c) 2009-2019 Bruno Lalande, Paris, France.
|
||||
Copyright (c) 2011-2019 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software License,
|
||||
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -14,7 +14,7 @@
|
||||
[library Geometry
|
||||
[quickbook 1.5]
|
||||
[authors [Gehrels, Barend], [Lalande, Bruno], [Loskot, Mateusz], [Wulkiewicz, Adam], [Karavelas, Menelaos], [Fisikopoulos, Vissarion]]
|
||||
[copyright 2009-2018 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates]
|
||||
[copyright 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates]
|
||||
[purpose Documentation of Boost.Geometry library]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
This file was modified by Oracle on 2015, 2017, 2018.
|
||||
Modifications copyright (c) 2015-2018, Oracle and/or its affiliates.
|
||||
Modifications copyright (c) 2015-2019, Oracle and/or its affiliates.
|
||||
Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@@ -19,6 +19,14 @@
|
||||
|
||||
[section:release_notes Release Notes]
|
||||
|
||||
[/=================]
|
||||
[heading Boost 1.70]
|
||||
[/=================]
|
||||
|
||||
[*Bugfixes]
|
||||
|
||||
* [@https://github.com/boostorg/geometry/pull/553 553] Pass spheroid correctly in geographic comparable strategies
|
||||
|
||||
[/=================]
|
||||
[heading Boost 1.69]
|
||||
[/=================]
|
||||
@@ -51,7 +59,7 @@
|
||||
* [@https://github.com/boostorg/geometry/pull/469 469] Horizontal grid shift (nadgrids) in SRS transformations (undocumented for now due to potential interface changes).
|
||||
* [@https://github.com/boostorg/geometry/pull/478 478] Box-Segment distance for spherical and geographic coordinate systems.
|
||||
* [@https://github.com/boostorg/geometry/pull/487 487] Missing combinations of geometries in distance for spherical and geographic cs
|
||||
* [@https://github.com/boostorg/geometry/pull/489 489] Additional direct geodesic problem formulas for internal use
|
||||
* [@https://github.com/boostorg/geometry/pull/489 489] Additional direct geodesic problem formulas for internal use
|
||||
|
||||
[*Solved issues]
|
||||
|
||||
@@ -355,7 +363,7 @@
|
||||
[*Bugfixes]
|
||||
|
||||
* Bug in multipoint/polygon multipoint/multipolygon distance computation (wrong detection of points inside the areal geometry)
|
||||
* Bug in flatten_iterator's assignment operator causing an access violation
|
||||
* Bug in flatten_iterator's assignment operator causing an access violation
|
||||
* Bug in Cartesian segment-segment intersection strategy when one segment degenerates to a point and is collinear to the other non-degenerate segment
|
||||
* Bug in centroid(), non-deterministic result if calculated for e.g. a Polygon with zero-area.
|
||||
* Bug in buffers for joins with a limited number of points
|
||||
@@ -676,9 +684,9 @@
|
||||
[*Additional coordinate types]
|
||||
|
||||
* Basic (limited) support for Boost.Rational
|
||||
|
||||
|
||||
[heading Boost 1.47]
|
||||
|
||||
Original release
|
||||
Original release
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/exception.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/geometry/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/buffer.hpp>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/buffer/buffer_policies.hpp>
|
||||
#include <boost/geometry/algorithms/expand.hpp>
|
||||
#include <boost/geometry/strategies/agnostic/point_in_poly_winding.hpp>
|
||||
#include <boost/geometry/strategies/buffer.hpp>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2017.
|
||||
// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013, 2014, 2017, 2019.
|
||||
// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -36,7 +36,7 @@ struct use_point_in_geometry
|
||||
template <typename Geometry1, typename Geometry2, typename Strategy>
|
||||
static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& strategy)
|
||||
{
|
||||
return detail::within::point_in_geometry(geometry1, geometry2, strategy) >= 0;
|
||||
return detail::within::covered_by_point_geometry(geometry1, geometry2, strategy);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2013-2017.
|
||||
// Modifications copyright (c) 2013-2017, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2018.
|
||||
// Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@@ -41,8 +41,9 @@
|
||||
#include <boost/geometry/algorithms/detail/check_iterator_range.hpp>
|
||||
#include <boost/geometry/algorithms/detail/point_on_border.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/disjoint/multirange_geometry.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/linear_linear.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/multirange_geometry.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/point_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/segment_box.hpp>
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014.
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2019.
|
||||
// Modifications copyright (c) 2014-2019, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -39,13 +40,12 @@
|
||||
#include <boost/geometry/strategies/tags.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/assign.hpp>
|
||||
#include <boost/geometry/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp>
|
||||
#include <boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/is_comparable.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/iterator_selector.hpp>
|
||||
#include <boost/geometry/algorithms/detail/within/point_in_geometry.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/dispatch/distance.hpp>
|
||||
|
||||
@@ -160,7 +160,8 @@ struct point_to_ring
|
||||
Ring const& ring,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
if (geometry::within(point, ring))
|
||||
// TODO: pass strategy
|
||||
if (within::within_point_geometry(point, ring))
|
||||
{
|
||||
return return_type(0);
|
||||
}
|
||||
@@ -204,7 +205,8 @@ private:
|
||||
{
|
||||
for (InteriorRingIterator it = first; it != last; ++it)
|
||||
{
|
||||
if (geometry::within(point, *it))
|
||||
// TODO: pass strategy
|
||||
if (within::within_point_geometry(point, *it))
|
||||
{
|
||||
// the point is inside a polygon hole, so its distance
|
||||
// to the polygon its distance to the polygon's
|
||||
@@ -233,7 +235,8 @@ public:
|
||||
Polygon const& polygon,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
if (!geometry::covered_by(point, exterior_ring(polygon)))
|
||||
// TODO: pass strategy
|
||||
if (! within::covered_by_point_geometry(point, exterior_ring(polygon)))
|
||||
{
|
||||
// the point is outside the exterior ring, so its distance
|
||||
// to the polygon is its distance to the polygon's exterior ring
|
||||
@@ -330,7 +333,8 @@ struct point_to_multigeometry<Point, MultiPolygon, Strategy, true>
|
||||
MultiPolygon const& multipolygon,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
if (geometry::covered_by(point, multipolygon))
|
||||
// TODO: pass strategy
|
||||
if (within::covered_by_point_geometry(point, multipolygon))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2018 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2019 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_SEGMENT_TO_BOX_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_SEGMENT_TO_BOX_HPP
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <functional>
|
||||
@@ -27,25 +29,26 @@
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/calculation_type.hpp>
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
#include <boost/geometry/strategies/tags.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/segment_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/default_strategies.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/is_comparable.hpp>
|
||||
#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
|
||||
#include <boost/geometry/algorithms/dispatch/distance.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/policies/compare.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/equals.hpp>
|
||||
#include <boost/geometry/algorithms/intersects.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/util/calculation_type.hpp>
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/has_nan_coordinate.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/default_strategies.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/is_comparable.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/dispatch/distance.hpp>
|
||||
#include <boost/geometry/strategies/disjoint.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
#include <boost/geometry/strategies/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -57,6 +60,20 @@ namespace detail { namespace distance
|
||||
{
|
||||
|
||||
|
||||
// TODO: Take strategy
|
||||
template <typename Segment, typename Box>
|
||||
inline bool intersects_segment_box(Segment const& segment, Box const& box)
|
||||
{
|
||||
typedef typename strategy::disjoint::services::default_strategy
|
||||
<
|
||||
Segment, Box
|
||||
>::type strategy_type;
|
||||
|
||||
return ! detail::disjoint::disjoint_segment_box::apply(segment, box,
|
||||
strategy_type());
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Segment,
|
||||
@@ -99,7 +116,7 @@ public:
|
||||
Strategy const& strategy,
|
||||
bool check_intersection = true)
|
||||
{
|
||||
if (check_intersection && geometry::intersects(segment, box))
|
||||
if (check_intersection && intersects_segment_box(segment, box))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -214,7 +231,7 @@ public:
|
||||
Strategy const& strategy,
|
||||
bool check_intersection = true)
|
||||
{
|
||||
if (check_intersection && geometry::intersects(segment, box))
|
||||
if (check_intersection && intersects_segment_box(segment, box))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -753,7 +770,8 @@ public:
|
||||
detail::assign_point_from_index<0>(segment, p[0]);
|
||||
detail::assign_point_from_index<1>(segment, p[1]);
|
||||
|
||||
if (geometry::equals(p[0], p[1]))
|
||||
if (detail::equals::equals_point_point(p[0], p[1],
|
||||
sb_strategy.get_equals_point_point_strategy()))
|
||||
{
|
||||
typedef typename boost::mpl::if_
|
||||
<
|
||||
|
||||
@@ -20,17 +20,20 @@
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/max_interval_gap.hpp>
|
||||
#include <boost/geometry/algorithms/detail/expand/indexed.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/normalize_spheroidal_coordinates.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/max_interval_gap.hpp>
|
||||
#include <boost/geometry/algorithms/detail/expand/indexed.hpp>
|
||||
#include <boost/geometry/views/detail/indexed_point_view.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -14,11 +14,14 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_GET_LEFT_TURNS_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_GET_LEFT_TURNS_HPP
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/segment_identifier.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/iterators/closing_iterator.hpp>
|
||||
#include <boost/geometry/iterators/ever_circling_iterator.hpp>
|
||||
#include <boost/geometry/strategies/side.hpp>
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
// Copyright (c) 2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -12,10 +17,10 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_GET_MAX_SIZE_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_GET_MAX_SIZE_HPP
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014, 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -19,6 +20,7 @@
|
||||
|
||||
#include <boost/core/addressof.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/policies/compare.hpp>
|
||||
|
||||
@@ -221,9 +223,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_DEBUG
|
||||
template <typename OStream, typename TP>
|
||||
friend inline
|
||||
void debug_print_complement_graph(OStream&, complement_graph<TP> const&);
|
||||
#endif // BOOST_GEOMETRY_TEST_DEBUG
|
||||
|
||||
private:
|
||||
std::size_t m_num_rings, m_num_turns;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014, 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -14,6 +15,8 @@
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#include <boost/geometry/algorithms/detail/is_valid/complement_graph.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014, 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -12,11 +13,10 @@
|
||||
|
||||
#ifdef GEOMETRY_TEST_DEBUG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@@ -15,15 +15,17 @@
|
||||
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/check_iterator_range.hpp>
|
||||
#include <boost/geometry/algorithms/validity_failure_type.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
#include <boost/geometry/util/has_non_finite_coordinate.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/point_iterator.hpp>
|
||||
#include <boost/geometry/views/detail/indexed_point_view.hpp>
|
||||
#include <boost/geometry/algorithms/detail/check_iterator_range.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/indexed_point_view.hpp>
|
||||
|
||||
#include <boost/geometry/util/has_non_finite_coordinate.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2017, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@@ -16,6 +16,12 @@
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
|
||||
#include <boost/geometry/algorithms/validity_failure_type.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
@@ -23,12 +29,6 @@
|
||||
#include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
|
||||
#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// Copyright (c) 2014-2017, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/order_as_direction.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
@@ -36,6 +37,7 @@
|
||||
#include <boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp>
|
||||
#include <boost/geometry/algorithms/detail/is_valid/has_spikes.hpp>
|
||||
#include <boost/geometry/algorithms/detail/is_valid/has_valid_self_turns.hpp>
|
||||
#include <boost/geometry/algorithms/dispatch/is_valid.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/area.hpp>
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp>
|
||||
#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
|
||||
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -9,11 +14,18 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CHECK_ENRICH_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CHECK_ENRICH_HPP
|
||||
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
|
||||
#include <iostream>
|
||||
#endif // BOOST_GEOMETRY_DEBUG_ENRICH
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
|
||||
#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
|
||||
|
||||
|
||||
@@ -42,7 +54,7 @@ struct meta_turn
|
||||
|
||||
|
||||
template <typename MetaTurn>
|
||||
inline void display(MetaTurn const& meta_turn, std::string const& reason = "")
|
||||
inline void display(MetaTurn const& meta_turn, const char* reason = "")
|
||||
{
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
|
||||
std::cout << meta_turn.index
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -9,18 +14,16 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CONVERT_RING_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CONVERT_RING_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/range/algorithm/reverse.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/core/exterior_ring.hpp>
|
||||
#include <boost/geometry/core/interior_rings.hpp>
|
||||
#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -23,23 +23,27 @@
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
|
||||
#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/append_no_duplicates.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/exterior_ring.hpp>
|
||||
#include <boost/geometry/core/interior_rings.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/iterators/ever_circling_iterator.hpp>
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/append_no_duplicates.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp>
|
||||
#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/ever_circling_iterator.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -441,18 +441,21 @@ inline void enrich_intersection_points(Turns& turns,
|
||||
|
||||
if (turn.both(detail::overlay::operation_none)
|
||||
|| turn.both(opposite_operation)
|
||||
|| turn.both(detail::overlay::operation_blocked)
|
||||
|| (detail::overlay::is_self_turn<OverlayType>(turn)
|
||||
&& ! turn.is_clustered()
|
||||
&& ! turn.both(target_operation)))
|
||||
{
|
||||
// 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
|
||||
// Similarly, for union, discard ii and ix
|
||||
|
||||
// Only keep self-uu-turns or self-ii-turns
|
||||
// For self-turns, only keep uu / ii
|
||||
|
||||
// Blocked (or combination with blocked is still needed for difference)
|
||||
turn.discarded = true;
|
||||
turn.cluster_id = -1;
|
||||
continue;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2015, 2017.
|
||||
// Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2015, 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2015-2019 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/exception.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
@@ -84,7 +85,7 @@ struct base_turn_handler
|
||||
return side1 * side2 == 1;
|
||||
}
|
||||
|
||||
// Both continue
|
||||
// Both get the same operation
|
||||
template <typename TurnInfo>
|
||||
static inline void both(TurnInfo& ti, operation_type const op)
|
||||
{
|
||||
@@ -130,6 +131,17 @@ struct base_turn_handler
|
||||
? 1 : 0;
|
||||
}
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
static inline typename geometry::coordinate_type<Point1>::type
|
||||
distance_measure(Point1 const& a, Point2 const& b)
|
||||
{
|
||||
// TODO: use comparable distance for point-point instead - but that
|
||||
// causes currently cycling include problems
|
||||
typedef typename geometry::coordinate_type<Point1>::type ctype;
|
||||
ctype const dx = get<0>(a) - get<0>(b);
|
||||
ctype const dy = get<1>(a) - get<1>(b);
|
||||
return dx * dx + dy * dy;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -168,9 +180,10 @@ struct touch_interior : public base_turn_handler
|
||||
static unsigned int const index_p = Index;
|
||||
static unsigned int const index_q = 1 - Index;
|
||||
|
||||
bool const has_k = ! range_q.is_last_segment();
|
||||
bool const has_pk = ! range_p.is_last_segment();
|
||||
bool const has_qk = ! range_q.is_last_segment();
|
||||
int const side_qi_p = dir_info.sides.template get<index_q, 0>();
|
||||
int const side_qk_p = has_k ? side.qk_wrt_p1() : 0;
|
||||
int const side_qk_p = has_qk ? side.qk_wrt_p1() : 0;
|
||||
|
||||
if (side_qi_p == -side_qk_p)
|
||||
{
|
||||
@@ -183,7 +196,10 @@ struct touch_interior : public base_turn_handler
|
||||
return;
|
||||
}
|
||||
|
||||
int const side_qk_q = has_k ? side.qk_wrt_q1() : 0;
|
||||
int const side_qk_q = has_qk ? side.qk_wrt_q1() : 0;
|
||||
|
||||
// Only necessary if rescaling is turned off:
|
||||
int const side_pj_q2 = has_qk ? side.pj_wrt_q2() : 0;
|
||||
|
||||
if (side_qi_p == -1 && side_qk_p == -1 && side_qk_q == 1)
|
||||
{
|
||||
@@ -194,10 +210,21 @@ struct touch_interior : public base_turn_handler
|
||||
}
|
||||
else if (side_qi_p == 1 && side_qk_p == 1 && side_qk_q == -1)
|
||||
{
|
||||
// Q turns right on the left side of P (test "ML3")
|
||||
// Union: take both operation
|
||||
// Intersection: skip
|
||||
both(ti, operation_union);
|
||||
if (has_qk && side_pj_q2 == -1)
|
||||
{
|
||||
// Q turns right on the left side of P (test "ML3")
|
||||
// Union: take both operations
|
||||
// Intersection: skip
|
||||
both(ti, operation_union);
|
||||
}
|
||||
else
|
||||
{
|
||||
// q2 is collinear with p1, so it does not turn back. This
|
||||
// can happen in floating point precision. In this case,
|
||||
// block one of the operations to avoid taking that path.
|
||||
ti.operations[index_p].operation = operation_union;
|
||||
ti.operations[index_q].operation = operation_blocked;
|
||||
}
|
||||
ti.touch_only = true;
|
||||
}
|
||||
else if (side_qi_p == side_qk_p && side_qi_p == side_qk_q)
|
||||
@@ -207,6 +234,29 @@ struct touch_interior : public base_turn_handler
|
||||
// Union: take left turn (Q if Q turns left, P if Q turns right)
|
||||
// Intersection: other turn
|
||||
unsigned int index = side_qk_q == 1 ? index_q : index_p;
|
||||
if (has_qk && side_pj_q2 == 0)
|
||||
{
|
||||
// Even though sides xk w.r.t. 1 are distinct, pj is collinear
|
||||
// with q. Therefore swap the path
|
||||
index = 1 - index;
|
||||
}
|
||||
|
||||
if (has_pk && has_qk && opposite(side_pj_q2, side_qi_p))
|
||||
{
|
||||
// Without rescaling, floating point requires extra measures
|
||||
int const side_qj_p1 = side.qj_wrt_p1();
|
||||
int const side_qj_p2 = side.qj_wrt_p2();
|
||||
|
||||
if (same(side_qj_p1, side_qj_p2))
|
||||
{
|
||||
int const side_pj_q1 = side.pj_wrt_q1();
|
||||
if (opposite(side_pj_q1, side_pj_q2))
|
||||
{
|
||||
index = 1 - index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ti.operations[index].operation = operation_union;
|
||||
ti.operations[1 - index].operation = operation_intersection;
|
||||
ti.touch_only = true;
|
||||
@@ -219,10 +269,16 @@ struct touch_interior : public base_turn_handler
|
||||
// Collinearly in the same direction
|
||||
// (Q comes from left of P and turns left,
|
||||
// OR Q comes from right of P and turns right)
|
||||
// Omit intersection point.
|
||||
// Omit second intersection point.
|
||||
// Union: just continue
|
||||
// Intersection: just continue
|
||||
both(ti, operation_continue);
|
||||
|
||||
// Calculate remaining distance.
|
||||
// Q arrives at p, at point qj, so use qk for q
|
||||
// and use pj for p
|
||||
ti.operations[index_p].remaining_distance = distance_measure(ti.point, range_p.at(1));
|
||||
ti.operations[index_q].remaining_distance = distance_measure(ti.point, range_q.at(2));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -519,8 +575,8 @@ struct equal_opposite : public base_turn_handler
|
||||
typename IntersectionInfo
|
||||
>
|
||||
static inline void apply(
|
||||
UniqueSubRange1 const& range_p,
|
||||
UniqueSubRange2 const& range_q,
|
||||
UniqueSubRange1 const& /*range_p*/,
|
||||
UniqueSubRange2 const& /*range_q*/,
|
||||
/* by value: */ TurnInfo tp,
|
||||
OutputIterator& out,
|
||||
IntersectionInfo const& intersection_info)
|
||||
@@ -641,18 +697,6 @@ struct collinear : public base_turn_handler
|
||||
? distance_measure(ti.point, range_q.at(2))
|
||||
: distance_measure(ti.point, range_q.at(1));
|
||||
}
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
static inline typename geometry::coordinate_type<Point1>::type
|
||||
distance_measure(Point1 const& a, Point2 const& b)
|
||||
{
|
||||
// TODO: use comparable distance for point-point instead - but that
|
||||
// causes currently cycling include problems
|
||||
typedef typename geometry::coordinate_type<Point1>::type ctype;
|
||||
ctype const dx = get<0>(a) - get<0>(b);
|
||||
ctype const dy = get<1>(a) - get<1>(b);
|
||||
return dx * dx + dy * dy;
|
||||
}
|
||||
};
|
||||
|
||||
template
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_FOR_ENDPOINT_HPP
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017.
|
||||
// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018.
|
||||
// Modifications copyright (c) 2013-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -14,9 +14,16 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_HELPERS_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_HELPERS_HPP
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
|
||||
#include <boost/geometry/algorithms/detail/direction_code.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/recalculate.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/geometries/segment.hpp> // referring_segment
|
||||
#include <boost/geometry/policies/relate/direction.hpp>
|
||||
#include <boost/geometry/policies/relate/intersection_points.hpp>
|
||||
#include <boost/geometry/policies/relate/tupled.hpp>
|
||||
#include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
|
||||
#include <boost/geometry/strategies/intersection_result.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
@@ -66,6 +73,12 @@ struct side_calculator
|
||||
inline int pk_wrt_q2() const { return m_side_strategy.apply(get_qj(), get_qk(), get_pk()); }
|
||||
inline int qk_wrt_p2() const { return m_side_strategy.apply(get_pj(), get_pk(), get_qk()); }
|
||||
|
||||
// Necessary when rescaling turns off:
|
||||
inline int qj_wrt_p1() const { return m_side_strategy.apply(get_pi(), get_pj(), get_qj()); }
|
||||
inline int qj_wrt_p2() const { return m_side_strategy.apply(get_pj(), get_pk(), get_qj()); }
|
||||
inline int pj_wrt_q1() const { return m_side_strategy.apply(get_qi(), get_qj(), get_pj()); }
|
||||
inline int pj_wrt_q2() const { return m_side_strategy.apply(get_qj(), get_qk(), get_pj()); }
|
||||
|
||||
inline point1_type const& get_pi() const { return m_range_p.at(0); }
|
||||
inline point1_type const& get_pj() const { return m_range_p.at(1); }
|
||||
inline point1_type const& get_pk() const { return m_range_p.at(2); }
|
||||
|
||||
@@ -125,6 +125,12 @@ inline void get_ring_turn_info(TurnInfoMap& turn_info_map, Turns const& turns, C
|
||||
bool cluster_checked = false;
|
||||
bool has_blocked = false;
|
||||
|
||||
if (is_self_turn<OverlayType>(turn) && turn.discarded)
|
||||
{
|
||||
// Discarded self-turns don't count as traversed
|
||||
continue;
|
||||
}
|
||||
|
||||
for (typename boost::range_iterator<container_type const>::type
|
||||
op_it = boost::begin(turn.operations);
|
||||
op_it != boost::end(turn.operations);
|
||||
|
||||
@@ -336,6 +336,8 @@ inline void self_turns(Geometry const& geometry,
|
||||
\param turns container which will contain intersection points
|
||||
\param interrupt_policy policy determining if process is stopped
|
||||
when intersection is found
|
||||
\param source_index source index for generated turns
|
||||
\param skip_adjacent indicates if adjacent turns should be skipped
|
||||
*/
|
||||
template
|
||||
<
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -12,7 +17,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -32,8 +37,8 @@ namespace detail { namespace overlay
|
||||
return h == 0 ? "-" : (h == 1 ? "A" : "D");
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
std::ostream& operator<<(std::ostream &os, turn_info<P> const& info)
|
||||
template <typename P, typename SR, typename O, typename C>
|
||||
std::ostream& operator<<(std::ostream &os, turn_info<P, SR, O, C> const& info)
|
||||
{
|
||||
os << "\t"
|
||||
<< " src " << info.seg_id.source_index
|
||||
@@ -46,10 +51,10 @@ namespace detail { namespace overlay
|
||||
<< (info.opposite ? " o" : "")
|
||||
<< "]"
|
||||
<< " sd "
|
||||
<< dir(info.sides.get<0,0>())
|
||||
<< dir(info.sides.get<0,1>())
|
||||
<< dir(info.sides.get<1,0>())
|
||||
<< dir(info.sides.get<1,1>())
|
||||
<< dir(info.sides.template get<0,0>())
|
||||
<< dir(info.sides.template get<0,1>())
|
||||
<< dir(info.sides.template get<1,0>())
|
||||
<< dir(info.sides.template get<1,1>())
|
||||
<< " nxt seg " << info.travels_to_vertex_index
|
||||
<< " , ip " << info.travels_to_ip_index
|
||||
<< " , or " << info.next_ip_index
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <set>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/cluster_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/is_self_turn.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
@@ -103,6 +105,23 @@ template
|
||||
>
|
||||
struct traversal
|
||||
{
|
||||
private :
|
||||
struct linked_turn_op_info
|
||||
{
|
||||
explicit linked_turn_op_info(signed_size_type ti = -1, int oi = -1,
|
||||
signed_size_type nti = -1)
|
||||
: turn_index(ti)
|
||||
, op_index(oi)
|
||||
, next_turn_index(nti)
|
||||
, rank_index(-1)
|
||||
{}
|
||||
|
||||
signed_size_type turn_index;
|
||||
int op_index;
|
||||
signed_size_type next_turn_index;
|
||||
signed_size_type rank_index;
|
||||
};
|
||||
|
||||
static const operation_type target_operation = operation_from_overlay<OverlayType>::value;
|
||||
|
||||
typedef typename side_compare<target_operation>::type side_compare_type;
|
||||
@@ -116,6 +135,7 @@ struct traversal
|
||||
point_type, SideStrategy, side_compare_type
|
||||
> sbs_type;
|
||||
|
||||
public :
|
||||
inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2,
|
||||
Turns& turns, Clusters const& clusters,
|
||||
RobustPolicy const& robust_policy, SideStrategy const& strategy,
|
||||
@@ -352,35 +372,72 @@ struct traversal
|
||||
// If both are valid candidates, take the one with minimal remaining
|
||||
// distance (important for #mysql_23023665 in buffer).
|
||||
|
||||
// Initialize with 0, automatically assigned on first result
|
||||
signed_size_type next[2] = {0};
|
||||
bool possible[2] = {0};
|
||||
bool close[2] = {0};
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
next[i] = turn.operations[i].enriched.get_next_turn_index();
|
||||
possible[i] = traverse_possible(next[i]);
|
||||
close[i] = possible[i] && next[i] == start_turn_index;
|
||||
}
|
||||
|
||||
if (close[0] != close[1])
|
||||
{
|
||||
// One of the operations will finish the ring. Take that one.
|
||||
selected_op_index = close[0] ? 0 : 1;
|
||||
debug_traverse(turn, turn.operations[selected_op_index], "Candidate cc closing");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (OverlayType == overlay_buffer && possible[0] && possible[1])
|
||||
{
|
||||
// Buffers sometimes have multiple overlapping pieces, where remaining
|
||||
// distance could lead to the wrong choice. Take the matching operation.
|
||||
|
||||
bool is_target[2] = {0};
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
turn_operation_type const& next_op = m_turns[next[i]].operations[i];
|
||||
is_target[i] = next_op.operation == target_operation;
|
||||
}
|
||||
|
||||
if (is_target[0] != is_target[1])
|
||||
{
|
||||
// Take the matching operation
|
||||
selected_op_index = is_target[0] ? 0 : 1;
|
||||
debug_traverse(turn, turn.operations[selected_op_index], "Candidate cc target");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static bool const is_union = target_operation == operation_union;
|
||||
|
||||
typename turn_operation_type::comparable_distance_type
|
||||
min_remaining_distance = 0;
|
||||
best_remaining_distance = 0;
|
||||
|
||||
bool result = false;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
turn_operation_type const& op = turn.operations[i];
|
||||
|
||||
signed_size_type const next_turn_index = op.enriched.get_next_turn_index();
|
||||
|
||||
if (! traverse_possible(next_turn_index))
|
||||
if (!possible[i])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
turn_operation_type const& op = turn.operations[i];
|
||||
|
||||
if (! result
|
||||
|| next_turn_index == start_turn_index
|
||||
|| op.remaining_distance < min_remaining_distance)
|
||||
|| (is_union && op.remaining_distance > best_remaining_distance)
|
||||
|| (!is_union && op.remaining_distance < best_remaining_distance))
|
||||
{
|
||||
debug_traverse(turn, op, "First candidate cc", ! result);
|
||||
debug_traverse(turn, op, "Candidate cc override (start)",
|
||||
result && next_turn_index == start_turn_index);
|
||||
debug_traverse(turn, op, "Candidate cc override (remaining)",
|
||||
result && op.remaining_distance < min_remaining_distance);
|
||||
result && op.remaining_distance < best_remaining_distance);
|
||||
|
||||
selected_op_index = i;
|
||||
min_remaining_distance = op.remaining_distance;
|
||||
best_remaining_distance = op.remaining_distance;
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
@@ -710,24 +767,163 @@ struct traversal
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool select_turn_from_cluster(signed_size_type& turn_index,
|
||||
inline signed_size_type get_rank(sbs_type const& sbs,
|
||||
linked_turn_op_info const& info) const
|
||||
{
|
||||
for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
|
||||
{
|
||||
typename sbs_type::rp const& rp = sbs.m_ranked_points[i];
|
||||
if (rp.turn_index == info.turn_index
|
||||
&& rp.operation_index == info.op_index
|
||||
&& rp.direction == sort_by_side::dir_to)
|
||||
{
|
||||
return rp.rank;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Function checks simple cases, such as a cluster with two turns,
|
||||
// arriving at the first turn, first turn points to second turn,
|
||||
// second turn points further.
|
||||
inline bool select_turn_from_cluster_linked(signed_size_type& turn_index,
|
||||
int& op_index,
|
||||
signed_size_type start_turn_index, int start_op_index,
|
||||
std::set<signed_size_type> const& ids,
|
||||
segment_identifier const& previous_seg_id) const
|
||||
{
|
||||
bool const is_union = target_operation == operation_union;
|
||||
typedef typename std::set<signed_size_type>::const_iterator sit_type;
|
||||
|
||||
turn_type const& turn = m_turns[turn_index];
|
||||
BOOST_ASSERT(turn.is_clustered());
|
||||
std::vector<linked_turn_op_info> possibilities;
|
||||
std::vector<linked_turn_op_info> blocked;
|
||||
for (sit_type it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
signed_size_type cluster_turn_index = *it;
|
||||
turn_type const& cluster_turn = m_turns[cluster_turn_index];
|
||||
if (cluster_turn.discarded)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (is_self_turn<OverlayType>(cluster_turn)
|
||||
|| cluster_turn.both(target_operation))
|
||||
{
|
||||
// Not (yet) supported, can be cluster of u/u turns
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
turn_operation_type const& op = cluster_turn.operations[i];
|
||||
turn_operation_type const& other_op = cluster_turn.operations[1 - i];
|
||||
signed_size_type const ni = op.enriched.get_next_turn_index();
|
||||
if (op.operation == target_operation
|
||||
|| op.operation == operation_continue)
|
||||
{
|
||||
if (ni == cluster_turn_index)
|
||||
{
|
||||
// Not (yet) supported, traveling to itself, can be
|
||||
// hole
|
||||
return false;
|
||||
}
|
||||
possibilities.push_back(
|
||||
linked_turn_op_info(cluster_turn_index, i, ni));
|
||||
}
|
||||
else if (op.operation == operation_blocked
|
||||
&& ! (ni == other_op.enriched.get_next_turn_index())
|
||||
&& ids.count(ni) == 0)
|
||||
{
|
||||
// Points to turn, not part of this cluster,
|
||||
// and that way is blocked. But if the other operation
|
||||
// points at the same turn, it is still fine.
|
||||
blocked.push_back(
|
||||
linked_turn_op_info(cluster_turn_index, i, ni));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typename Clusters::const_iterator mit = m_clusters.find(turn.cluster_id);
|
||||
BOOST_ASSERT(mit != m_clusters.end());
|
||||
typedef typename std::vector<linked_turn_op_info>::const_iterator const_it_type;
|
||||
|
||||
cluster_info const& cinfo = mit->second;
|
||||
std::set<signed_size_type> const& ids = cinfo.turn_indices;
|
||||
if (! blocked.empty())
|
||||
{
|
||||
sbs_type sbs(m_strategy);
|
||||
|
||||
sbs_type sbs(m_strategy);
|
||||
if (! fill_sbs(sbs, turn_index, ids, previous_seg_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (typename std::vector<linked_turn_op_info>::iterator it = possibilities.begin();
|
||||
it != possibilities.end(); ++it)
|
||||
{
|
||||
linked_turn_op_info& info = *it;
|
||||
info.rank_index = get_rank(sbs, info);
|
||||
}
|
||||
for (typename std::vector<linked_turn_op_info>::iterator it = blocked.begin();
|
||||
it != blocked.end(); ++it)
|
||||
{
|
||||
linked_turn_op_info& info = *it;
|
||||
info.rank_index = get_rank(sbs, info);
|
||||
}
|
||||
|
||||
|
||||
for (const_it_type it = possibilities.begin();
|
||||
it != possibilities.end(); ++it)
|
||||
{
|
||||
linked_turn_op_info const& lti = *it;
|
||||
for (const_it_type bit = blocked.begin();
|
||||
bit != blocked.end(); ++bit)
|
||||
{
|
||||
linked_turn_op_info const& blti = *bit;
|
||||
if (blti.next_turn_index == lti.next_turn_index
|
||||
&& blti.rank_index == lti.rank_index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Traversal can either enter the cluster in the first turn,
|
||||
// or it can start halfway.
|
||||
// If there is one (and only one) possibility pointing outside
|
||||
// the cluster, take that one.
|
||||
linked_turn_op_info target;
|
||||
for (const_it_type it = possibilities.begin();
|
||||
it != possibilities.end(); ++it)
|
||||
{
|
||||
linked_turn_op_info const& lti = *it;
|
||||
if (ids.count(lti.next_turn_index) == 0)
|
||||
{
|
||||
if (target.turn_index >= 0
|
||||
&& target.next_turn_index != lti.next_turn_index)
|
||||
{
|
||||
// Points to different target
|
||||
return false;
|
||||
}
|
||||
if (OverlayType == overlay_buffer && target.turn_index > 0)
|
||||
{
|
||||
// Target already assigned, so there are more targets
|
||||
// or more ways to the same target
|
||||
return false;
|
||||
}
|
||||
|
||||
target = lti;
|
||||
}
|
||||
}
|
||||
if (target.turn_index < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
turn_index = target.turn_index;
|
||||
op_index = target.op_index;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool fill_sbs(sbs_type& sbs,
|
||||
signed_size_type turn_index,
|
||||
std::set<signed_size_type> const& ids,
|
||||
segment_identifier const& previous_seg_id) const
|
||||
{
|
||||
for (typename std::set<signed_size_type>::const_iterator sit = ids.begin();
|
||||
sit != ids.end(); ++sit)
|
||||
{
|
||||
@@ -753,7 +949,39 @@ struct traversal
|
||||
{
|
||||
return false;
|
||||
}
|
||||
turn_type const& turn = m_turns[turn_index];
|
||||
sbs.apply(turn.point);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
inline bool select_turn_from_cluster(signed_size_type& turn_index,
|
||||
int& op_index,
|
||||
signed_size_type start_turn_index, int start_op_index,
|
||||
segment_identifier const& previous_seg_id) const
|
||||
{
|
||||
bool const is_union = target_operation == operation_union;
|
||||
|
||||
turn_type const& turn = m_turns[turn_index];
|
||||
BOOST_ASSERT(turn.is_clustered());
|
||||
|
||||
typename Clusters::const_iterator mit = m_clusters.find(turn.cluster_id);
|
||||
BOOST_ASSERT(mit != m_clusters.end());
|
||||
|
||||
cluster_info const& cinfo = mit->second;
|
||||
std::set<signed_size_type> const& ids = cinfo.turn_indices;
|
||||
|
||||
if (select_turn_from_cluster_linked(turn_index, op_index, ids, previous_seg_id))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
sbs_type sbs(m_strategy);
|
||||
|
||||
if (! fill_sbs(sbs, turn_index, ids, previous_seg_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/traversal.hpp>
|
||||
@@ -208,10 +209,11 @@ struct traversal_ring_creator
|
||||
|
||||
if (start_turn.is_clustered())
|
||||
{
|
||||
turn_type const& turn = m_turns[current_turn_index];
|
||||
if (turn.cluster_id == start_turn.cluster_id)
|
||||
turn_type& turn = m_turns[current_turn_index];
|
||||
turn_operation_type& op = turn.operations[current_op_index];
|
||||
if (turn.cluster_id == start_turn.cluster_id
|
||||
&& op.enriched.get_next_turn_index() == start_turn_index)
|
||||
{
|
||||
turn_operation_type& op = m_turns[start_turn_index].operations[current_op_index];
|
||||
op.visited.set_finished();
|
||||
m_visitor.visit_traverse(m_turns, m_turns[current_turn_index], start_op, "Early finish (cluster)");
|
||||
return traverse_error_none;
|
||||
@@ -306,6 +308,23 @@ struct traversal_ring_creator
|
||||
}
|
||||
}
|
||||
|
||||
int get_operation_index(turn_type const& turn) const
|
||||
{
|
||||
// When starting with a continue operation, the one
|
||||
// with the smallest (for intersection) or largest (for union)
|
||||
// remaining distance (#8310b)
|
||||
// Also to avoid skipping a turn in between, which can happen
|
||||
// in rare cases (e.g. #130)
|
||||
static const bool is_union
|
||||
= operation_from_overlay<OverlayType>::value == operation_union;
|
||||
|
||||
turn_operation_type const& op0 = turn.operations[0];
|
||||
turn_operation_type const& op1 = turn.operations[1];
|
||||
return op0.remaining_distance <= op1.remaining_distance
|
||||
? (is_union ? 1 : 0)
|
||||
: (is_union ? 0 : 1);
|
||||
}
|
||||
|
||||
template <typename Rings>
|
||||
void iterate(Rings& rings, std::size_t& finalized_ring_size,
|
||||
typename Backtrack::state_type& state)
|
||||
@@ -322,15 +341,8 @@ struct traversal_ring_creator
|
||||
|
||||
if (turn.both(operation_continue))
|
||||
{
|
||||
// Traverse only one turn, the one with the SMALLEST remaining distance
|
||||
// to avoid skipping a turn in between, which can happen in rare cases
|
||||
// (e.g. #130)
|
||||
turn_operation_type const& op0 = turn.operations[0];
|
||||
turn_operation_type const& op1 = turn.operations[1];
|
||||
int const op_index
|
||||
= op0.remaining_distance <= op1.remaining_distance ? 0 : 1;
|
||||
|
||||
traverse_with_operation(turn, turn_index, op_index,
|
||||
traverse_with_operation(turn, turn_index,
|
||||
get_operation_index(turn),
|
||||
rings, finalized_ring_size, state);
|
||||
}
|
||||
else
|
||||
@@ -373,13 +385,8 @@ struct traversal_ring_creator
|
||||
|
||||
if (turn.both(operation_continue))
|
||||
{
|
||||
// Traverse only one turn, the one with the SMALLEST remaining distance
|
||||
// to avoid skipping a turn in between, which can happen in rare cases
|
||||
// (e.g. #130)
|
||||
int const op_index
|
||||
= op0.remaining_distance <= op1.remaining_distance ? 0 : 1;
|
||||
|
||||
traverse_with_operation(turn, turn_index, op_index,
|
||||
traverse_with_operation(turn, turn_index,
|
||||
get_operation_index(turn),
|
||||
rings, finalized_ring_size, state);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
// Copyright (c) 2015-2016 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -10,6 +15,7 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_SWITCH_DETECTOR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sub_range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sub_range.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/policies/compare.hpp>
|
||||
|
||||
#include <boost/geometry/util/has_nan_coordinate.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -5,22 +5,30 @@
|
||||
// This file was modified by Oracle on 2013, 2014, 2018.
|
||||
// Modifications copyright (c) 2013-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_FOLLOW_HELPERS_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_FOLLOW_HELPERS_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/segment_identifier.hpp>
|
||||
#include <boost/geometry/algorithms/detail/relate/boundary_checker.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
//#include <boost/geometry/algorithms/detail/sub_range.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/point_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/expand_by_epsilon.hpp>
|
||||
#include <boost/geometry/algorithms/detail/partition.hpp>
|
||||
#include <boost/geometry/algorithms/detail/relate/result.hpp>
|
||||
#include <boost/geometry/algorithms/detail/relate/topology_check.hpp>
|
||||
#include <boost/geometry/algorithms/detail/within/point_in_geometry.hpp>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2013-2016.
|
||||
// Modifications copyright (c) 2013-2016 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2018.
|
||||
// Modifications copyright (c) 2013-2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <boost/mpl/end.hpp>
|
||||
#include <boost/mpl/is_sequence.hpp>
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
|
||||
#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/policies/compare.hpp>
|
||||
|
||||
|
||||
@@ -48,7 +48,11 @@ template
|
||||
<
|
||||
Geometry1, Geometry2, assign_policy<>
|
||||
>,
|
||||
typename RobustPolicy = detail::no_rescale_policy
|
||||
typename RobustPolicy = typename geometry::rescale_overlay_policy_type
|
||||
<
|
||||
Geometry1,
|
||||
Geometry2
|
||||
>::type
|
||||
>
|
||||
struct get_turns
|
||||
{
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
// For spherical/geographic longitudes covered_by point/box
|
||||
#include <boost/geometry/strategies/cartesian/point_in_box.hpp>
|
||||
|
||||
#include <boost/geometry/util/select_coordinate_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -928,6 +928,8 @@ struct sectionalize<multi_linestring_tag, MultiLinestring, Reverse, DimensionVec
|
||||
\param geometry geometry to create sections from
|
||||
\param robust_policy policy to handle robustness issues
|
||||
\param sections structure with sections
|
||||
\param envelope_strategy strategy for envelope calculation
|
||||
\param expand_strategy strategy for partitions
|
||||
\param source_index index to assign to the ring_identifiers
|
||||
\param max_count maximal number of points per section
|
||||
(defaults to 10, this seems to give the fastest results)
|
||||
|
||||
@@ -2,21 +2,29 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014.
|
||||
// Modifications copyright (c) 2013-2014, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013, 2014, 2018.
|
||||
// Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SUB_RANGE_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SUB_RANGE_HPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/exterior_ring.hpp>
|
||||
#include <boost/geometry/core/interior_rings.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2017.
|
||||
// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013, 2014, 2017, 2019.
|
||||
// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -61,7 +61,7 @@ struct use_point_in_geometry
|
||||
template <typename Geometry1, typename Geometry2, typename Strategy>
|
||||
static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& strategy)
|
||||
{
|
||||
return detail::within::point_in_geometry(geometry1, geometry2, strategy) == 1;
|
||||
return detail::within::within_point_geometry(geometry1, geometry2, strategy);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018.
|
||||
// Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2013-2019, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -382,6 +382,30 @@ inline int point_in_geometry(Point const& point, Geometry const& geometry)
|
||||
return point_in_geometry(point, geometry, strategy_type());
|
||||
}
|
||||
|
||||
template <typename Point, typename Geometry, typename Strategy>
|
||||
inline bool within_point_geometry(Point const& point, Geometry const& geometry, Strategy const& strategy)
|
||||
{
|
||||
return point_in_geometry(point, geometry, strategy) > 0;
|
||||
}
|
||||
|
||||
template <typename Point, typename Geometry>
|
||||
inline bool within_point_geometry(Point const& point, Geometry const& geometry)
|
||||
{
|
||||
return point_in_geometry(point, geometry) > 0;
|
||||
}
|
||||
|
||||
template <typename Point, typename Geometry, typename Strategy>
|
||||
inline bool covered_by_point_geometry(Point const& point, Geometry const& geometry, Strategy const& strategy)
|
||||
{
|
||||
return point_in_geometry(point, geometry, strategy) >= 0;
|
||||
}
|
||||
|
||||
template <typename Point, typename Geometry>
|
||||
inline bool covered_by_point_geometry(Point const& point, Geometry const& geometry)
|
||||
{
|
||||
return point_in_geometry(point, geometry) >= 0;
|
||||
}
|
||||
|
||||
}} // namespace detail::within
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2018 Yaghyavardhan Singh Khangarot, Hyderabad, India.
|
||||
// Contributed and/or modified by Yaghyavardhan Singh Khangarot,
|
||||
// as part of Google Summer of Code 2018 program.
|
||||
|
||||
// Contributed and/or modified by Yaghyavardhan Singh Khangarot, as part of Google Summer of Code 2018 program.
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -22,13 +26,15 @@
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
#include <boost/geometry/strategies/distance_result.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -48,7 +54,7 @@ public:
|
||||
|
||||
result_type & operator()(size_type1 i, size_type2 j)
|
||||
{
|
||||
BOOST_ASSERT(i < m_width && j < m_height);
|
||||
BOOST_GEOMETRY_ASSERT(i < m_width && j < m_height);
|
||||
return m_data[j * m_width + i];
|
||||
}
|
||||
|
||||
@@ -86,28 +92,31 @@ struct linestring_linestring
|
||||
|
||||
|
||||
//Coupling Matrix CoupMat(a,b,-1);
|
||||
coup_mat<size_type1,size_type2,result_type> coup_matrix(a,b);
|
||||
coup_mat<size_type1,size_type2,result_type> coup_matrix(a,b);
|
||||
|
||||
result_type const not_feasible = -100;
|
||||
//findin the Coupling Measure
|
||||
for(size_type1 i=0;i<a;i++)
|
||||
for (size_type1 i = 0 ; i < a ; i++ )
|
||||
{
|
||||
for(size_type2 j=0;j<b;j++)
|
||||
{
|
||||
result_type dis = geometry::distance(range::at(ls1,i),range::at(ls2,j),strategy);
|
||||
result_type dis = strategy.apply(range::at(ls1,i), range::at(ls2,j));
|
||||
if(i==0 && j==0)
|
||||
coup_matrix(i,j)= dis;
|
||||
coup_matrix(i,j) = dis;
|
||||
else if(i==0 && j>0)
|
||||
coup_matrix(i,j)=
|
||||
(std::max)(coup_matrix(i,j-1),dis);
|
||||
coup_matrix(i,j) =
|
||||
(std::max)(coup_matrix(i,j-1), dis);
|
||||
else if(i>0 && j==0)
|
||||
coup_matrix(i,j)=
|
||||
(std::max)(coup_matrix(i-1,j),dis);
|
||||
coup_matrix(i,j) =
|
||||
(std::max)(coup_matrix(i-1,j), dis);
|
||||
else if(i>0 && j>0)
|
||||
coup_matrix(i,j)=
|
||||
(std::max)((std::min)(coup_matrix(i,j-1),(std::min)(coup_matrix(i-1,j),coup_matrix(i-1,j-1))),dis);
|
||||
coup_matrix(i,j) =
|
||||
(std::max)((std::min)(coup_matrix(i,j-1),
|
||||
(std::min)(coup_matrix(i-1,j),
|
||||
coup_matrix(i-1,j-1))),
|
||||
dis);
|
||||
else
|
||||
coup_matrix(i,j)=not_feasible;
|
||||
coup_matrix(i,j) = not_feasible;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,8 +149,15 @@ template
|
||||
>
|
||||
struct discrete_frechet_distance : not_implemented<Tag1, Tag2>
|
||||
{};
|
||||
|
||||
template <typename Linestring1, typename Linestring2>
|
||||
struct discrete_frechet_distance<Linestring1,Linestring2,linestring_tag,linestring_tag>
|
||||
struct discrete_frechet_distance
|
||||
<
|
||||
Linestring1,
|
||||
Linestring2,
|
||||
linestring_tag,
|
||||
linestring_tag
|
||||
>
|
||||
: detail::discrete_frechet_distance::linestring_linestring
|
||||
{};
|
||||
|
||||
@@ -151,7 +167,7 @@ struct discrete_frechet_distance<Linestring1,Linestring2,linestring_tag,linestri
|
||||
|
||||
/*!
|
||||
\brief Calculate discrete Frechet distance between two geometries (currently
|
||||
works for LineString-LineString) using specified strategy.
|
||||
works for LineString-LineString) using specified strategy.
|
||||
\ingroup discrete_frechet_distance
|
||||
\tparam Geometry1 \tparam_geometry
|
||||
\tparam Geometry2 \tparam_geometry
|
||||
@@ -181,16 +197,21 @@ inline typename distance_result
|
||||
typename point_type<Geometry2>::type,
|
||||
Strategy
|
||||
>::type
|
||||
discrete_frechet_distance(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& strategy)
|
||||
discrete_frechet_distance(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
return dispatch::discrete_frechet_distance<Geometry1, Geometry2>::apply(geometry1, geometry2, strategy);
|
||||
return dispatch::discrete_frechet_distance
|
||||
<
|
||||
Geometry1, Geometry2
|
||||
>::apply(geometry1, geometry2, strategy);
|
||||
}
|
||||
|
||||
// Algorithm overload using default Pt-Pt distance strategy
|
||||
|
||||
/*!
|
||||
\brief Calculate discrete Frechet distance between two geometries (currently
|
||||
work for LineString-LineString).
|
||||
work for LineString-LineString).
|
||||
\ingroup discrete_frechet_distance
|
||||
\tparam Geometry1 \tparam_geometry
|
||||
\tparam Geometry2 \tparam_geometry
|
||||
|
||||
@@ -26,16 +26,18 @@
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/index/rtree.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
#include <boost/geometry/strategies/distance_result.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
namespace bgi = boost::geometry::index;
|
||||
#ifdef BOOST_GEOMETRY_ENABLE_SIMILARITY_RTREE
|
||||
#include <boost/geometry/index/rtree.hpp>
|
||||
#endif // BOOST_GEOMETRY_ENABLE_SIMILARITY_RTREE
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@@ -70,7 +72,7 @@ struct point_range
|
||||
|
||||
for (size_type i = 0 ; i < n ; i++)
|
||||
{
|
||||
result_type dis_temp = geometry::distance(pnt, range::at(rng, i), strategy);
|
||||
result_type dis_temp = strategy.apply(pnt, range::at(rng, i));
|
||||
if (! is_dis_min_set || dis_temp < dis_min)
|
||||
{
|
||||
dis_min = dis_temp;
|
||||
@@ -110,6 +112,7 @@ struct range_range
|
||||
result_type dis_max = 0;
|
||||
|
||||
#ifdef BOOST_GEOMETRY_ENABLE_SIMILARITY_RTREE
|
||||
namespace bgi = boost::geometry::index;
|
||||
typedef typename point_type<Range1>::type point_t;
|
||||
typedef bgi::rtree<point_t, bgi::linear<4> > rtree_type;
|
||||
rtree_type rtree(boost::begin(r2), boost::end(r2));
|
||||
@@ -120,7 +123,7 @@ struct range_range
|
||||
{
|
||||
#ifdef BOOST_GEOMETRY_ENABLE_SIMILARITY_RTREE
|
||||
size_type found = rtree.query(bgi::nearest(range::at(r1, i), 1), &res);
|
||||
result_type dis_min = geometry::distance(range::at(r1,i), res);
|
||||
result_type dis_min = strategy.apply(range::at(r1,i), res);
|
||||
#else
|
||||
result_type dis_min = point_range::apply(range::at(r1, i), r2, strategy);
|
||||
#endif
|
||||
@@ -246,15 +249,15 @@ struct discrete_hausdorff_distance<MultiPoint1, MultiPoint2, multi_point_tag, mu
|
||||
: detail::discrete_hausdorff_distance::range_range
|
||||
{};
|
||||
|
||||
// Specialization for linestring and multi_linestring
|
||||
template <typename linestring, typename multi_linestring>
|
||||
struct discrete_hausdorff_distance<linestring, multi_linestring, linestring_tag, multi_linestring_tag>
|
||||
// Specialization for Linestring and MultiLinestring
|
||||
template <typename Linestring, typename MultiLinestring>
|
||||
struct discrete_hausdorff_distance<Linestring, MultiLinestring, linestring_tag, multi_linestring_tag>
|
||||
: detail::discrete_hausdorff_distance::range_multi_range
|
||||
{};
|
||||
|
||||
// Specialization for multi_linestring and multi_linestring
|
||||
template <typename multi_linestring1, typename multi_linestring2>
|
||||
struct discrete_hausdorff_distance<multi_linestring1, multi_linestring2, multi_linestring_tag, multi_linestring_tag>
|
||||
// Specialization for MultiLinestring and MultiLinestring
|
||||
template <typename MultiLinestring1, typename MultiLinestring2>
|
||||
struct discrete_hausdorff_distance<MultiLinestring1, MultiLinestring2, multi_linestring_tag, multi_linestring_tag>
|
||||
: detail::discrete_hausdorff_distance::multi_range_multi_range
|
||||
{};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2013-2017.
|
||||
// Modifications copyright (c) 2013-2017, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2018.
|
||||
// Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tag_cast.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014.
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2018.
|
||||
// Modifications copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -25,8 +26,9 @@
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tag_cast.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
#include <boost/geometry/algorithms/detail/distance/default_strategies.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_SIMPLIFY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <set>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -12,7 +16,14 @@
|
||||
// TODO - for multiplication of coordinates
|
||||
// if coordinate_type is_integral - use double as the result type
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/select_most_precise.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@@ -37,8 +48,8 @@ struct dot_impl
|
||||
BOOST_STATIC_ASSERT(0 < N);
|
||||
|
||||
typedef typename geometry::select_most_precise<
|
||||
typename traits::coordinate_type<S1>::type,
|
||||
typename traits::coordinate_type<S2>::type
|
||||
typename geometry::coordinate_type<S1>::type,
|
||||
typename geometry::coordinate_type<S2>::type
|
||||
>::type coordinate_type;
|
||||
|
||||
static inline coordinate_type apply(S1 const& s1, S2 const& s2)
|
||||
@@ -51,8 +62,8 @@ template <typename S1, typename S2, std::size_t IS1, std::size_t IS2>
|
||||
struct dot_impl<S1, S2, IS1, IS2, 1>
|
||||
{
|
||||
typedef typename geometry::select_most_precise<
|
||||
typename traits::coordinate_type<S1>::type,
|
||||
typename traits::coordinate_type<S2>::type
|
||||
typename geometry::coordinate_type<S1>::type,
|
||||
typename geometry::coordinate_type<S2>::type
|
||||
>::type coordinate_type;
|
||||
|
||||
static inline coordinate_type apply(S1 const& s1, S2 const& s2)
|
||||
@@ -64,8 +75,8 @@ struct dot_impl<S1, S2, IS1, IS2, 1>
|
||||
template <std::size_t IS1, std::size_t IS2, std::size_t N, typename S1, typename S2>
|
||||
inline static
|
||||
typename geometry::select_most_precise<
|
||||
typename traits::coordinate_type<S1>::type,
|
||||
typename traits::coordinate_type<S2>::type
|
||||
typename geometry::coordinate_type<S1>::type,
|
||||
typename geometry::coordinate_type<S2>::type
|
||||
>::type
|
||||
dot(S1 const& s1, S2 const& s2)
|
||||
{
|
||||
@@ -143,7 +154,7 @@ struct matrix_mul_row_impl
|
||||
{
|
||||
BOOST_STATIC_ASSERT(0 < N);
|
||||
|
||||
static const std::size_t dimension = traits::dimension<M>::value;
|
||||
static const std::size_t dimension = geometry::dimension<M>::value;
|
||||
|
||||
static inline
|
||||
typename traits::coordinate_type<VD>::type
|
||||
@@ -156,7 +167,7 @@ struct matrix_mul_row_impl
|
||||
template <typename M, typename V, typename VD, std::size_t I>
|
||||
struct matrix_mul_row_impl<M, V, VD, I, 1>
|
||||
{
|
||||
static const std::size_t dimension = traits::dimension<M>::value;
|
||||
static const std::size_t dimension = geometry::dimension<M>::value;
|
||||
|
||||
static inline
|
||||
typename traits::coordinate_type<VD>::type
|
||||
@@ -187,7 +198,7 @@ struct matrix_mul_impl<M, V, VD, N, N>
|
||||
template <typename M, typename V, typename VD>
|
||||
inline static void matrix_rotate(M const& m, V const& v, VD & vd)
|
||||
{
|
||||
static const std::size_t dimension = traits::dimension<M>::value;
|
||||
static const std::size_t dimension = geometry::dimension<M>::value;
|
||||
|
||||
matrix_mul_impl<M, V, VD, 0, dimension>::apply(m, v, vd);
|
||||
}
|
||||
@@ -200,8 +211,8 @@ inline static void quaternion_rotate(V & v, Q const& r)
|
||||
// TODO - choose more precise type?
|
||||
|
||||
typedef typename geometry::select_most_precise<
|
||||
typename traits::coordinate_type<V>::type,
|
||||
typename traits::coordinate_type<Q>::type
|
||||
typename geometry::coordinate_type<V>::type,
|
||||
typename geometry::coordinate_type<Q>::type
|
||||
>::type T;
|
||||
|
||||
// Hamilton product T=Q*V
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -14,6 +18,7 @@
|
||||
#include <boost/geometry/extensions/algebra/algorithms/detail.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/vector.hpp>
|
||||
|
||||
// TODO - for multiplication of coordinates
|
||||
// if coordinate_type is_integral - use double as the result type
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -9,10 +13,13 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_TRANSFORM_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_TRANSFORM_HPP
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/extensions/algebra/algorithms/detail.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp>
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -9,11 +13,11 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_TRANSLATION_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_TRANSLATION_HPP
|
||||
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
//#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
//#include <boost/geometry/util/for_each_coordinate.hpp>
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -15,12 +19,28 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_CORE_COORDINATE_DIMENSION_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_CORE_COORDINATE_DIMENSION_HPP
|
||||
|
||||
#include <boost/geometry/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
namespace traits {
|
||||
|
||||
template <typename Geometry, std::size_t Index>
|
||||
struct indexed_dimension
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(false,
|
||||
NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_OR_INDEX,
|
||||
(Geometry, boost::integral_constant<std::size_t, Index>));
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch {
|
||||
|
||||
@@ -34,6 +54,14 @@ struct dimension<quaternion_tag, G>
|
||||
: traits::dimension<typename geometry::util::bare_type<G>::type>
|
||||
{};
|
||||
|
||||
template <typename T, typename G, std::size_t Index>
|
||||
struct indexed_dimension
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(false,
|
||||
NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_OR_INDEX,
|
||||
(G, boost::integral_constant<std::size_t, Index>));
|
||||
};
|
||||
|
||||
template <typename G, std::size_t Index>
|
||||
struct indexed_dimension<matrix_tag, G, Index>
|
||||
: traits::indexed_dimension<typename geometry::util::bare_type<G>::type, Index>
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,6 +21,13 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_CHECK_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/quaternion_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,8 +21,12 @@
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_type.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace concepts {
|
||||
|
||||
@@ -54,7 +62,7 @@ class Matrix
|
||||
{
|
||||
static void apply()
|
||||
{
|
||||
dimension_checker_row<G, I, 0, N>;
|
||||
dimension_checker_row<G, I, 0, N>::apply();
|
||||
dimension_checker<G, I+1, N>::apply();
|
||||
}
|
||||
};
|
||||
@@ -95,7 +103,7 @@ class ConstMatrix
|
||||
static void apply()
|
||||
{
|
||||
const G* g = 0;
|
||||
ctype coord(geometry::get<I, J>(*g));
|
||||
typename coordinate_type<G>::type coord(geometry::get<I, J>(*g));
|
||||
boost::ignore_unused(coord);
|
||||
dimension_checker_row<G, I, J+1, N>::apply();
|
||||
}
|
||||
@@ -112,7 +120,7 @@ class ConstMatrix
|
||||
{
|
||||
static void apply()
|
||||
{
|
||||
dimension_checker_row<G, I, 0, N>;
|
||||
dimension_checker_row<G, I, 0, N>::apply();
|
||||
dimension_checker<G, I+1, N>::apply();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -78,7 +82,7 @@ class ConstQuaternion
|
||||
static void apply()
|
||||
{
|
||||
const G* g = 0;
|
||||
ctype coord(geometry::get<I>(*g));
|
||||
typename coordinate_type<Geometry>::type coord(geometry::get<I>(*g));
|
||||
boost::ignore_unused(coord);
|
||||
dimension_checker<G, I+1, N>::apply();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,8 +21,12 @@
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_type.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace concepts {
|
||||
|
||||
@@ -54,7 +62,7 @@ class RotationMatrix
|
||||
{
|
||||
static void apply()
|
||||
{
|
||||
dimension_checker_row<G, I, 0, N>;
|
||||
dimension_checker_row<G, I, 0, N>::apply();
|
||||
dimension_checker<G, I+1, N>::apply();
|
||||
}
|
||||
};
|
||||
@@ -112,7 +120,7 @@ class ConstRotationMatrix
|
||||
{
|
||||
static void apply()
|
||||
{
|
||||
dimension_checker_row<G, I, 0, N>;
|
||||
dimension_checker_row<G, I, 0, N>::apply();
|
||||
dimension_checker<G, I+1, N>::apply();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,8 +21,12 @@
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_type.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace concepts {
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,8 +21,11 @@
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_system.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace concepts {
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,6 +21,8 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp>
|
||||
|
||||
@@ -88,15 +94,6 @@ struct coordinate_type<model::matrix<CoordinateType, Rows, Cols> >
|
||||
// typedef cs::cartesian type;
|
||||
//};
|
||||
|
||||
// TODO - move this class to traits.hpp
|
||||
template <typename Geometry, std::size_t Index>
|
||||
struct indexed_dimension
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(false,
|
||||
NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_OR_INDEX,
|
||||
(Geometry, boost::integral_constant<std::size_t, Index>));
|
||||
};
|
||||
|
||||
template <typename CoordinateType, std::size_t Rows, std::size_t Cols>
|
||||
struct indexed_dimension<model::matrix<CoordinateType, Rows, Cols>, 0>
|
||||
: boost::integral_constant<std::size_t, Rows>
|
||||
@@ -108,7 +105,7 @@ struct indexed_dimension<model::matrix<CoordinateType, Rows, Cols>, 1>
|
||||
{};
|
||||
|
||||
template <typename CoordinateType, std::size_t Rows, std::size_t Cols, std::size_t I, std::size_t J>
|
||||
struct indexed_access<model::matrix<CoordinateType, Dimension>, I, J>
|
||||
struct indexed_access<model::matrix<CoordinateType, Rows, Cols>, I, J>
|
||||
{
|
||||
typedef CoordinateType coordinate_type;
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,6 +21,9 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp>
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -17,6 +21,9 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp>
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -11,6 +15,9 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_CONNECT
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
@@ -144,7 +151,9 @@ struct map_policy
|
||||
// Alternatively, we might look for the closest points
|
||||
if (boost::size(range) == 0)
|
||||
{
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_CONNECT
|
||||
std::cout << "nothing found" << std::endl;
|
||||
#endif
|
||||
return closest;
|
||||
}
|
||||
|
||||
@@ -318,7 +327,9 @@ struct fuzzy_policy
|
||||
// Alternatively, we might look for the closest points
|
||||
if (boost::size(range) == 0)
|
||||
{
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_CONNECT
|
||||
std::cout << "nothing found" << std::endl;
|
||||
#endif
|
||||
return closest;
|
||||
}
|
||||
|
||||
@@ -339,7 +350,9 @@ struct fuzzy_policy
|
||||
closest = *it;
|
||||
min_dist = d;
|
||||
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_CONNECT
|
||||
//std::cout << "TO " << geometry::wkt(p2) << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -347,9 +360,12 @@ struct fuzzy_policy
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <typename Policy>
|
||||
inline void debug(Policy const& policy)
|
||||
{
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_CONNECT
|
||||
|
||||
std::cout << "MAP" << std::endl;
|
||||
typedef typename Policy::map_type::const_iterator iterator;
|
||||
typedef typename Policy::point_type point_type;
|
||||
@@ -369,8 +385,9 @@ inline void debug(Policy const& policy)
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_GEOMETRY_DEBUG_CONNECT
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -16,13 +20,13 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp>
|
||||
#include <boost/geometry/extensions/strategies/parse.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/dms_parser.hpp>
|
||||
//#include <boost/geometry/extensions/strategies/parse.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -51,30 +55,39 @@ struct parsing<point_tag, Point>
|
||||
static inline void parse(Point& point, std::string const& c1, std::string const& c2, S const& strategy)
|
||||
{
|
||||
assert_dimension<Point, 2>();
|
||||
dms_result r1 = strategy(c1.c_str());
|
||||
dms_result r2 = strategy(c2.c_str());
|
||||
|
||||
typedef typename coordinate_type<Point>::type coord_t;
|
||||
typedef boost::geometry::projections::detail::dms_result<coord_t> dms_result_t;
|
||||
dms_result_t r1 = strategy(c1.c_str());
|
||||
dms_result_t r2 = strategy(c2.c_str());
|
||||
|
||||
if (0 == r1.axis())
|
||||
set<0>(point, r1);
|
||||
set<0>(point, r1.angle());
|
||||
else
|
||||
set<1>(point, r1);
|
||||
set<1>(point, r1.angle());
|
||||
|
||||
if (0 == r2.axis())
|
||||
set<0>(point, r2);
|
||||
set<0>(point, r2.angle());
|
||||
else
|
||||
set<1>(point, r2);
|
||||
set<1>(point, r2.angle());
|
||||
}
|
||||
|
||||
static inline void parse(Point& point, std::string const& c1, std::string const& c2)
|
||||
{
|
||||
typedef typename coordinate_type<Point>::type coord_t;
|
||||
// strategy-parser corresponding to degree/radian
|
||||
typename strategy_parse
|
||||
<
|
||||
typename cs_tag<Point>::type,
|
||||
typename coordinate_system<Point>::type
|
||||
>::type strategy;
|
||||
//typename strategy_parse
|
||||
// <
|
||||
// typename cs_tag<Point>::type,
|
||||
// typename coordinate_system<Point>::type
|
||||
// >::type strategy;
|
||||
typedef boost::geometry::projections::detail::dms_parser
|
||||
<
|
||||
coord_t/*,
|
||||
as_radian*/
|
||||
> dms_parser_t;
|
||||
|
||||
parse(point, c1, c2, strategy);
|
||||
parse(point, c1, c2, dms_parser_t());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -16,6 +20,7 @@
|
||||
// as mark_spikes is now replaced by remove_spikes
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -22,6 +26,8 @@
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/arithmetic/dot_product.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/tags.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
#include <boost/geometry/strategies/default_distance_result.hpp>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#ifndef BOOST_GEOMETRY_FORMULAS_AREA_FORMULAS_HPP
|
||||
#define BOOST_GEOMETRY_FORMULAS_AREA_FORMULAS_HPP
|
||||
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/formulas/flattening.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2016 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2016, 2018 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
#ifndef BOOST_GEOMETRY_FORMULAS_ECCENCRICITY_SQR_HPP
|
||||
#define BOOST_GEOMETRY_FORMULAS_ECCENCRICITY_SQR_HPP
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan.
|
||||
|
||||
// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program.
|
||||
// Contributed and/or modified by Adeel Ahmad,
|
||||
// as part of Google Summer of Code 2018 program.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -30,13 +35,14 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/series_expansion.hpp>
|
||||
#include <boost/geometry/util/normalize_spheroidal_coordinates.hpp>
|
||||
|
||||
#include <boost/geometry/formulas/flattening.hpp>
|
||||
#include <boost/geometry/formulas/result_direct.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/normalize_spheroidal_coordinates.hpp>
|
||||
#include <boost/geometry/util/series_expansion.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace formula
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// Copyright (c) 2018 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
|
||||
@@ -15,14 +16,15 @@
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/formulas/meridian_inverse.hpp>
|
||||
#include <boost/geometry/formulas/differential_quantities.hpp>
|
||||
#include <boost/geometry/formulas/flattening.hpp>
|
||||
#include <boost/geometry/formulas/meridian_inverse.hpp>
|
||||
#include <boost/geometry/formulas/quarter_meridian.hpp>
|
||||
#include <boost/geometry/formulas/result_direct.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace formula
|
||||
{
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2017-2018 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
|
||||
@@ -14,7 +15,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/srs/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// Copyright (c) 2018 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
|
||||
@@ -11,11 +12,15 @@
|
||||
#ifndef BOOST_GEOMETRY_FORMULAS_QUARTER_MERIDIAN_HPP
|
||||
#define BOOST_GEOMETRY_FORMULAS_QUARTER_MERIDIAN_HPP
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/formulas/flattening.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -14,9 +19,11 @@
|
||||
// pair{begin_points, end_points} -> ring_proxy
|
||||
|
||||
#include <boost/polygon/polygon.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
#include <boost/range/mutable_iterator.hpp>
|
||||
|
||||
#include <boost/geometry/core/mutable_range.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -19,6 +24,7 @@
|
||||
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_ARRAY_HPP
|
||||
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
|
||||
#define BOOST_GEOMETRY_ADAPTED_STD_ARRAY_TAG_DEFINED
|
||||
|
||||
|
||||
@@ -111,5 +117,14 @@ struct access<std::array<CoordinateType, DimensionCount>, Dimension>
|
||||
}}}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
#warning "This file requires compiler and library support for the ISO C++ 2011 standard."
|
||||
|
||||
|
||||
#endif // BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_ARRAY_HPP
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/core/mutable_range.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -15,8 +20,10 @@
|
||||
#define BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP
|
||||
|
||||
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry Index
|
||||
//
|
||||
// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2011-2019 Adam Wulkiewicz, Lodz, Poland.
|
||||
//
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -11,11 +11,43 @@
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/index/detail/is_indexable.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail {
|
||||
|
||||
template <typename T>
|
||||
struct remove_cr
|
||||
: boost::remove_const
|
||||
<
|
||||
typename boost::remove_reference<T>::type
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename From, typename To>
|
||||
struct is_referencable
|
||||
: boost::is_same
|
||||
<
|
||||
typename remove_cr<From>::type,
|
||||
typename remove_cr<To>::type
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename Indexable, typename V>
|
||||
inline Indexable const& indexable_prevent_any_type(V const& )
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(false),
|
||||
UNEXPECTED_TYPE,
|
||||
(V)
|
||||
);
|
||||
return Indexable();
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief The function object extracting Indexable from Value.
|
||||
|
||||
@@ -48,6 +80,15 @@ struct indexable
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Prevent reference to temporary for types convertible to Value.
|
||||
*/
|
||||
template <typename V>
|
||||
inline result_type operator()(V const& v) const
|
||||
{
|
||||
return indexable_prevent_any_type<Value>(v);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -56,11 +97,13 @@ struct indexable
|
||||
This specialization translates from std::pair<Indexable, T2>.
|
||||
|
||||
\tparam Indexable The Indexable type.
|
||||
\tparam T2 The second type.
|
||||
\tparam Second The second type.
|
||||
*/
|
||||
template <typename Indexable, typename T2>
|
||||
struct indexable<std::pair<Indexable, T2>, false>
|
||||
template <typename Indexable, typename Second>
|
||||
struct indexable<std::pair<Indexable, Second>, false>
|
||||
{
|
||||
typedef std::pair<Indexable, Second> value_type;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(detail::is_indexable<Indexable>::value),
|
||||
NOT_VALID_INDEXABLE_TYPE,
|
||||
@@ -76,24 +119,51 @@ struct indexable<std::pair<Indexable, T2>, false>
|
||||
\param v The value.
|
||||
\return The indexable.
|
||||
*/
|
||||
inline result_type operator()(std::pair<Indexable, T2> const& v) const
|
||||
inline result_type operator()(value_type const& v) const
|
||||
{
|
||||
return v.first;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Return indexable extracted from compatible type different than value_type.
|
||||
|
||||
\param v The value.
|
||||
\return The indexable.
|
||||
*/
|
||||
template <typename I, typename S>
|
||||
inline result_type operator()(std::pair<I, S> const& v) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(is_referencable<I, result_type>::value),
|
||||
UNEXPECTED_TYPE,
|
||||
(std::pair<I, S>)
|
||||
);
|
||||
return v.first;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Prevent reference to temporary for types convertible to Value.
|
||||
*/
|
||||
template <typename V>
|
||||
inline result_type operator()(V const& v) const
|
||||
{
|
||||
return indexable_prevent_any_type<Indexable>(v);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief The function object extracting Indexable from Value.
|
||||
|
||||
This specialization translates from boost::tuple<Indexable, ...>.
|
||||
This specialization translates from boost::tuple<Indexable, ...>
|
||||
or boost::tuples::cons<Indexable, ...>.
|
||||
|
||||
\tparam Value The Value type.
|
||||
\tparam Indexable The Indexable type.
|
||||
*/
|
||||
template <typename Indexable, typename T1, typename T2, typename T3, typename T4,
|
||||
typename T5, typename T6, typename T7, typename T8, typename T9>
|
||||
struct indexable<boost::tuple<Indexable, T1, T2, T3, T4, T5, T6, T7, T8, T9>, false>
|
||||
template <typename Value, typename Indexable>
|
||||
struct indexable_boost_tuple
|
||||
{
|
||||
typedef boost::tuple<Indexable, T1, T2, T3, T4, T5, T6, T7, T8, T9> value_type;
|
||||
typedef Value value_type;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(detail::is_indexable<Indexable>::value),
|
||||
@@ -114,8 +184,85 @@ struct indexable<boost::tuple<Indexable, T1, T2, T3, T4, T5, T6, T7, T8, T9>, fa
|
||||
{
|
||||
return boost::get<0>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Return indexable extracted from compatible type different than value_type.
|
||||
|
||||
\param v The value.
|
||||
\return The indexable.
|
||||
*/
|
||||
template <typename I, typename U1, typename U2, typename U3, typename U4,
|
||||
typename U5, typename U6, typename U7, typename U8, typename U9>
|
||||
inline result_type operator()(boost::tuple<I, U1, U2, U3, U4, U5, U6, U7, U8, U9> const& v) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(is_referencable<I, result_type>::value),
|
||||
UNEXPECTED_TYPE,
|
||||
(boost::tuple<I, U1, U2, U3, U4, U5, U6, U7, U8, U9>)
|
||||
);
|
||||
return boost::get<0>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Return indexable extracted from compatible type different than value_type.
|
||||
|
||||
\param v The value.
|
||||
\return The indexable.
|
||||
*/
|
||||
template <typename I, typename T>
|
||||
inline result_type operator()(boost::tuples::cons<I, T> const& v) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(is_referencable<I, result_type>::value),
|
||||
UNEXPECTED_TYPE,
|
||||
(boost::tuples::cons<I, T>)
|
||||
);
|
||||
return boost::get<0>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Prevent reference to temporary for types convertible to Value.
|
||||
*/
|
||||
template <typename V>
|
||||
inline result_type operator()(V const& v) const
|
||||
{
|
||||
return indexable_prevent_any_type<Indexable>(v);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief The function object extracting Indexable from Value.
|
||||
|
||||
This specialization translates from boost::tuple<Indexable, ...>.
|
||||
|
||||
\tparam Indexable The Indexable type.
|
||||
*/
|
||||
template <typename Indexable, typename T1, typename T2, typename T3, typename T4,
|
||||
typename T5, typename T6, typename T7, typename T8, typename T9>
|
||||
struct indexable<boost::tuple<Indexable, T1, T2, T3, T4, T5, T6, T7, T8, T9>, false>
|
||||
: indexable_boost_tuple
|
||||
<
|
||||
boost::tuple<Indexable, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
|
||||
Indexable
|
||||
>
|
||||
{};
|
||||
|
||||
/*!
|
||||
\brief The function object extracting Indexable from Value.
|
||||
|
||||
This specialization translates from boost::tuples::cons<Indexable, ...>.
|
||||
|
||||
\tparam Indexable The Indexable type.
|
||||
*/
|
||||
template <typename Indexable, typename Tail>
|
||||
struct indexable<boost::tuples::cons<Indexable, Tail>, false>
|
||||
: indexable_boost_tuple
|
||||
<
|
||||
boost::tuples::cons<Indexable, Tail>,
|
||||
Indexable
|
||||
>
|
||||
{};
|
||||
|
||||
}}}} // namespace boost::geometry::index::detail
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
@@ -156,6 +303,32 @@ struct indexable<std::tuple<Indexable, Args...>, false>
|
||||
{
|
||||
return std::get<0>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Return indexable extracted from compatible type different than value_type.
|
||||
|
||||
\param v The value.
|
||||
\return The indexable.
|
||||
*/
|
||||
template <typename I, typename ...A>
|
||||
inline result_type operator()(std::tuple<I, A...> const& v) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(is_referencable<I, result_type>::value),
|
||||
UNEXPECTED_TYPE,
|
||||
(std::tuple<I, A...>)
|
||||
);
|
||||
return std::get<0>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Prevent reference to temporary for types convertible to Value.
|
||||
*/
|
||||
template <typename V>
|
||||
inline result_type operator()(V const& v) const
|
||||
{
|
||||
return indexable_prevent_any_type<Indexable>(v);
|
||||
}
|
||||
};
|
||||
|
||||
}}}} // namespace boost::geometry::index::detail
|
||||
@@ -190,6 +363,20 @@ struct indexable
|
||||
{
|
||||
return detail::indexable<Value>::operator()(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Return indexable extracted from the value. Overload for types
|
||||
compatible with Value but different yet holding referencable
|
||||
Indexable, e.g. tuple containing a reference.
|
||||
|
||||
\param v The value.
|
||||
\return The indexable.
|
||||
*/
|
||||
template <typename V>
|
||||
inline result_type operator()(V const& v) const
|
||||
{
|
||||
return detail::indexable<Value>::operator()(v);
|
||||
}
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::index
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014, 2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -12,6 +13,7 @@
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/interior_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
// Copyright (c) 2014-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// Copyright (c) 2015, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2015, 2018.
|
||||
// Modifications copyright (c) 2015-2018, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -18,6 +19,8 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
|
||||
#include <boost/geometry/policies/robustness/segment_ratio.hpp>
|
||||
#include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
|
||||
#include <boost/geometry/policies/robustness/robust_point_type.hpp>
|
||||
|
||||
@@ -22,11 +22,16 @@
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/size.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/variant/variant.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -44,8 +44,12 @@
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/function_overloads.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridlist.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
@@ -388,7 +392,7 @@ inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy,
|
||||
/************************************************************************/
|
||||
|
||||
template <bool Inverse, typename Par, typename Range, typename ProjGrids>
|
||||
inline bool pj_apply_gridshift_2(Par const& defn, Range & range, ProjGrids const& grids)
|
||||
inline bool pj_apply_gridshift_2(Par const& /*defn*/, Range & range, ProjGrids const& grids)
|
||||
{
|
||||
/*if( defn->catalog_name != NULL )
|
||||
return pj_gc_apply_gridshift( defn, inverse, point_count, point_offset,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -57,7 +57,7 @@ namespace detail
|
||||
template <bool Inverse, typename CalcT, typename StreamPolicy, typename Range>
|
||||
inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy,
|
||||
Range & range,
|
||||
srs::shared_grids & grids,
|
||||
shared_grids & grids,
|
||||
std::vector<std::size_t> const& gridindexes)
|
||||
{
|
||||
typedef typename boost::range_size<Range>::type size_type;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2017-2019, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -135,7 +135,7 @@ template
|
||||
struct pj_datum_find_datum_static
|
||||
{
|
||||
template <typename T>
|
||||
static const pj_datums_type<T>* apply(Params const& params)
|
||||
static const pj_datums_type<T>* apply(Params const& )
|
||||
{
|
||||
const pj_datums_type<T>* pj_datums = pj_get_datums<T>().first;
|
||||
const int n = pj_get_datums<T>().second;
|
||||
@@ -225,7 +225,7 @@ struct pj_datum_find_nadgrids_static
|
||||
{
|
||||
static void apply(Params const& params, srs::detail::nadgrids & out)
|
||||
{
|
||||
out = boost::tuples::get<I>();
|
||||
out = boost::tuples::get<I>(params);
|
||||
}
|
||||
};
|
||||
template <typename Params, int N>
|
||||
@@ -322,7 +322,7 @@ struct pj_datum_find_towgs84_static
|
||||
static void apply(Params const& params, srs::detail::towgs84<T> & out)
|
||||
{
|
||||
typename boost::tuples::element<I, Params>::type const&
|
||||
towgs84 = boost::tuples::get<I>();
|
||||
towgs84 = boost::tuples::get<I>(params);
|
||||
|
||||
std::size_t n = (std::min<std::size_t>)(towgs84.size(), 7u);
|
||||
std::size_t z = n <= 3 ? 3 : 7;
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_GAUSS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/srs/projections/constants.hpp>
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
@@ -204,7 +205,7 @@ bool pj_gridinfo_load_ctable(IStream & is, pj_gi_load & gi)
|
||||
std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size;
|
||||
is.read(reinterpret_cast<char*>(&ct.cvs[0]), ch_size);
|
||||
|
||||
if (is.fail() || is.gcount() != ch_size)
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
ct.cvs.clear();
|
||||
//ctable loading failed on fread() - binary incompatible?
|
||||
@@ -235,7 +236,7 @@ bool pj_gridinfo_load_ctable2(IStream & is, pj_gi_load & gi)
|
||||
std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size;
|
||||
is.read(reinterpret_cast<char*>(&ct.cvs[0]), ch_size);
|
||||
|
||||
if (is.fail() || is.gcount() != ch_size)
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
//ctable2 loading failed on fread() - binary incompatible?
|
||||
ct.cvs.clear();
|
||||
@@ -278,7 +279,7 @@ inline bool pj_gridinfo_load_ntv1(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
is.read(reinterpret_cast<char*>(&row_buf[0]), ch_size);
|
||||
|
||||
if (is.fail() || is.gcount() != ch_size)
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
gi.ct.cvs.clear();
|
||||
return false;
|
||||
@@ -328,7 +329,7 @@ inline bool pj_gridinfo_load_ntv2(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
is.read(reinterpret_cast<char*>(&row_buf[0]), ch_size);
|
||||
|
||||
if (is.fail() || is.gcount() != ch_size)
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
gi.ct.cvs.clear();
|
||||
return false;
|
||||
@@ -375,7 +376,7 @@ inline bool pj_gridinfo_load_gtx(IStream & is, pj_gi_load & gi)
|
||||
|
||||
is.read(reinterpret_cast<char*>(&gi.ct.cvs[0]), ch_size);
|
||||
|
||||
if (is.fail() || is.gcount() != ch_size)
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
gi.ct.cvs.clear();
|
||||
return false;
|
||||
|
||||
@@ -41,8 +41,11 @@
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/grids.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridinfo.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/srs/projections/par_data.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <boost/geometry/srs/projections/shared_grids.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridinfo.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridlist.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
@@ -63,7 +64,7 @@ namespace detail
|
||||
template <typename StreamPolicy>
|
||||
inline bool pj_gridlist_merge_gridfile(std::string const& gridname,
|
||||
StreamPolicy const& stream_policy,
|
||||
srs::shared_grids & grids,
|
||||
shared_grids & grids,
|
||||
std::vector<std::size_t> & gridindexes)
|
||||
{
|
||||
// Try to find in the existing list of loaded grids. Add all
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_PHI2_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PHI2_HPP
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/geocent.hpp>
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PROJ_MDIST_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/config.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace srs
|
||||
|
||||
@@ -45,17 +45,21 @@
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/geometry/formulas/vincenty_direct.hpp>
|
||||
#include <boost/geometry/formulas/vincenty_inverse.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/aasincos.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/aasincos.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
@@ -45,12 +45,13 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AIRY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AIRY_HPP
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -47,14 +47,15 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AITOFF_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AITOFF_HPP
|
||||
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -40,13 +40,15 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_BIPC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_BIPC_HPP
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user