summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/transform.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/transform.hpp')
-rw-r--r--boost/geometry/algorithms/transform.hpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/boost/geometry/algorithms/transform.hpp b/boost/geometry/algorithms/transform.hpp
index 9b63a85073..66d56d7143 100644
--- a/boost/geometry/algorithms/transform.hpp
+++ b/boost/geometry/algorithms/transform.hpp
@@ -5,8 +5,9 @@
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2020.
-// Modifications copyright (c) 2020 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2020-2023.
+// Modifications copyright (c) 2020-2023 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
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
@@ -19,8 +20,6 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_TRANSFORM_HPP
#define BOOST_GEOMETRY_ALGORITHMS_TRANSFORM_HPP
-#include <cmath>
-#include <iterator>
#include <type_traits>
#include <boost/range/begin.hpp>
@@ -28,20 +27,18 @@
#include <boost/range/size.hpp>
#include <boost/range/value_type.hpp>
-#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/variant_fwd.hpp>
-#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/clear.hpp>
-#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
+#include "boost/geometry/algorithms/detail/assign_indexed_point.hpp"
+#include "boost/geometry/algorithms/detail/assign_values.hpp"
#include <boost/geometry/algorithms/num_interior_rings.hpp>
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/mutable_range.hpp>
-#include <boost/geometry/core/ring_type.hpp>
#include <boost/geometry/core/tag_cast.hpp>
#include <boost/geometry/core/tags.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
@@ -143,10 +140,7 @@ inline bool transform_range_out(Range const& range,
OutputIterator out, Strategy const& strategy)
{
PointOut point_out;
- for(typename boost::range_iterator<Range const>::type
- it = boost::begin(range);
- it != boost::end(range);
- ++it)
+ for (auto it = boost::begin(range); it != boost::end(range); ++it)
{
if (! transform_point::apply(*it, point_out, strategy))
{
@@ -184,15 +178,11 @@ struct transform_polygon
>::apply(geometry::interior_rings(poly2),
geometry::num_interior_rings(poly1));
- typename geometry::interior_return_type<Polygon1 const>::type
- rings1 = geometry::interior_rings(poly1);
- typename geometry::interior_return_type<Polygon2>::type
- rings2 = geometry::interior_rings(poly2);
+ auto const& rings1 = geometry::interior_rings(poly1);
+ auto&& rings2 = geometry::interior_rings(poly2);
- typename detail::interior_iterator<Polygon1 const>::type
- it1 = boost::begin(rings1);
- typename detail::interior_iterator<Polygon2>::type
- it2 = boost::begin(rings2);
+ auto it1 = boost::begin(rings1);
+ auto it2 = boost::begin(rings2);
for ( ; it1 != boost::end(rings1); ++it1, ++it2)
{
if ( ! transform_range_out<point2_type>(*it1,
@@ -251,10 +241,8 @@ struct transform_multi
{
traits::resize<Multi2>::apply(multi2, boost::size(multi1));
- typename boost::range_iterator<Multi1 const>::type it1
- = boost::begin(multi1);
- typename boost::range_iterator<Multi2>::type it2
- = boost::begin(multi2);
+ auto it1 = boost::begin(multi1);
+ auto it2 = boost::begin(multi2);
for (; it1 != boost::end(multi1); ++it1, ++it2)
{