mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-26 06:32:16 +00:00
Merge branch 'develop' into feature/buffer
This commit is contained in:
@@ -200,13 +200,6 @@ INPUT = . .. ../../../../boost/geometry/core \
|
||||
../../../../boost/geometry/iterators \
|
||||
../../../../boost/geometry/io/wkt \
|
||||
../../../../boost/geometry/io/svg \
|
||||
../../../../boost/geometry/multi/algorithms \
|
||||
../../../../boost/geometry/multi/algorithms/detail \
|
||||
../../../../boost/geometry/multi/core \
|
||||
../../../../boost/geometry/multi/geometries \
|
||||
../../../../boost/geometry/multi/geometries/register \
|
||||
../../../../boost/geometry/multi/geometries/concepts \
|
||||
../../../../boost/geometry/multi/strategies/cartesian \
|
||||
../../../../boost/geometry/policies \
|
||||
../../../../boost/geometry/policies/relate \
|
||||
../../../../boost/geometry/strategies \
|
||||
|
||||
@@ -118,9 +118,6 @@ For users using only Cartesian points, with floating point coordinates (double),
|
||||
etc. Using this headerfile the library seems to be a non-template library, so it is convenient for users that
|
||||
are not so into the template world.
|
||||
|
||||
For users using multi-geometries:
|
||||
- \#include <boost/geometry/multi/multi.hpp>
|
||||
|
||||
\section advanced_includes Advanced includes
|
||||
|
||||
This section is for users who have their own geometries and want to use algorithms from the Boost.Geometry.
|
||||
|
||||
@@ -15,8 +15,6 @@ OBSOLETE
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/io/svg/write_svg_multi.hpp>
|
||||
|
||||
|
||||
@@ -18,6 +18,22 @@
|
||||
|
||||
[section:release_notes Release Notes]
|
||||
|
||||
[/=================]
|
||||
[heading Boost 1.59]
|
||||
[/=================]
|
||||
|
||||
[*Additional functionality]
|
||||
|
||||
* Added rtree const_iterator, begin(), end() and the support for Boost.Range.
|
||||
|
||||
[*Improvements]
|
||||
|
||||
* Upgraded rtree const_query_iterator category to ForwardIterator.
|
||||
|
||||
[*Solved tickets]
|
||||
|
||||
* [@https://svn.boost.org/trac/boost/ticket/11113 11113] Support easy enumeration of all elements with BOOST_FOREACH
|
||||
|
||||
[/=================]
|
||||
[heading Boost 1.58]
|
||||
[/=================]
|
||||
|
||||
@@ -8,6 +8,6 @@ xml=../../../../doxy/doxygen_output/xml/structboost_1_1geometry_1_1closeable__vi
|
||||
|
||||
start_include=boost/geometry/
|
||||
convenience_header_path=../../../../../../../boost/geometry/
|
||||
convenience_headers=geometry.hpp,geometries/geometries.hpp,multi/multi.hpp
|
||||
convenience_headers=geometry.hpp,geometries/geometries.hpp
|
||||
skip_namespace=boost::geometry::
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ project boost-geometry-extensions-test
|
||||
<include>../../test
|
||||
<include>../../../boost/geometry/extensions/contrib/ttmath
|
||||
<toolset>msvc:<asynch-exceptions>on
|
||||
<toolset>msvc:<cxxflags>/bigobj
|
||||
<host-os>windows,<toolset>intel:<cxxflags>/bigobj
|
||||
<library>/boost/timer//boost_timer
|
||||
;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
@@ -56,7 +56,6 @@
|
||||
#include <boost/geometry/util/select_coordinate_type.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/centroid/translating_transformer.hpp>
|
||||
|
||||
|
||||
@@ -553,9 +553,8 @@ struct buffered_piece_collection
|
||||
// reliable integer-based ring. All turns can be compared (inside) to this
|
||||
// rings to see if they are inside.
|
||||
|
||||
for (typename piece_vector_type::iterator it = boost::begin(m_pieces);
|
||||
it != boost::end(m_pieces);
|
||||
++it)
|
||||
for (typename boost::range_iterator<piece_vector_type>::type
|
||||
it = boost::begin(m_pieces); it != boost::end(m_pieces); ++it)
|
||||
{
|
||||
piece& pc = *it;
|
||||
int piece_segment_index = pc.first_seg_id.segment_index;
|
||||
@@ -567,9 +566,9 @@ struct buffered_piece_collection
|
||||
}
|
||||
// Walk through them, in reverse to insert at right index
|
||||
int index_offset = pc.robust_turns.size() - 1;
|
||||
for (typename std::vector<robust_turn>::const_reverse_iterator
|
||||
rit = pc.robust_turns.rbegin();
|
||||
rit != pc.robust_turns.rend();
|
||||
for (typename boost::range_reverse_iterator<const std::vector<robust_turn> >::type
|
||||
rit = boost::const_rbegin(pc.robust_turns);
|
||||
rit != boost::const_rend(pc.robust_turns);
|
||||
++rit, --index_offset)
|
||||
{
|
||||
int const index_in_vector = 1 + rit->seg_id.segment_index - piece_segment_index;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include <boost/geometry/strategies/buffer.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/enrichment_info.hpp>
|
||||
@@ -26,8 +28,6 @@
|
||||
#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -185,10 +185,10 @@ public:
|
||||
Geometry const
|
||||
> segment_iterator_type;
|
||||
|
||||
typedef typename std::vector
|
||||
typedef typename boost::range_const_iterator
|
||||
<
|
||||
segment_or_box_point
|
||||
>::const_iterator seg_or_box_iterator_type;
|
||||
std::vector<segment_or_box_point>
|
||||
>::type seg_or_box_const_iterator;
|
||||
|
||||
typedef assign_new_min_iterator<SegmentOrBox> assign_new_value;
|
||||
|
||||
@@ -219,8 +219,9 @@ public:
|
||||
// segment or box
|
||||
comparable_return_type cd_min1(0);
|
||||
point_iterator_type pit_min;
|
||||
seg_or_box_iterator_type it_min1 = seg_or_box_points.begin();
|
||||
seg_or_box_iterator_type it_min2 = ++seg_or_box_points.begin();
|
||||
seg_or_box_const_iterator it_min1 = boost::const_begin(seg_or_box_points);
|
||||
seg_or_box_const_iterator it_min2 = it_min1;
|
||||
++it_min2;
|
||||
bool first = true;
|
||||
|
||||
for (point_iterator_type pit = points_begin(geometry);
|
||||
@@ -229,11 +230,11 @@ public:
|
||||
comparable_return_type cd;
|
||||
std::pair
|
||||
<
|
||||
seg_or_box_iterator_type, seg_or_box_iterator_type
|
||||
seg_or_box_const_iterator, seg_or_box_const_iterator
|
||||
> it_pair
|
||||
= point_to_point_range::apply(*pit,
|
||||
seg_or_box_points.begin(),
|
||||
seg_or_box_points.end(),
|
||||
boost::const_begin(seg_or_box_points),
|
||||
boost::const_end(seg_or_box_points),
|
||||
cstrategy,
|
||||
cd);
|
||||
|
||||
@@ -250,12 +251,11 @@ public:
|
||||
// segments of the geometry
|
||||
comparable_return_type cd_min2(0);
|
||||
segment_iterator_type sit_min;
|
||||
typename std::vector<segment_or_box_point>::const_iterator it_min;
|
||||
seg_or_box_const_iterator it_min;
|
||||
|
||||
first = true;
|
||||
for (typename std::vector<segment_or_box_point>::const_iterator it
|
||||
= seg_or_box_points.begin();
|
||||
it != seg_or_box_points.end(); ++it, first = false)
|
||||
for (seg_or_box_const_iterator it = boost::const_begin(seg_or_box_points);
|
||||
it != boost::const_end(seg_or_box_points); ++it, first = false)
|
||||
{
|
||||
comparable_return_type cd;
|
||||
segment_iterator_type sit
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2014.
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include <boost/geometry/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
|
||||
// TODO: remove this after moving num_point from multi directory
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -36,7 +36,10 @@ struct has_duplicates
|
||||
static inline bool apply(Range const& range, VisitPolicy& visitor)
|
||||
{
|
||||
typedef typename closeable_view<Range const, Closure>::type view_type;
|
||||
typedef typename boost::range_iterator<view_type const>::type iterator;
|
||||
typedef typename boost::range_const_iterator
|
||||
<
|
||||
view_type const
|
||||
>::type const_iterator;
|
||||
|
||||
view_type view(range);
|
||||
|
||||
@@ -47,9 +50,10 @@ struct has_duplicates
|
||||
|
||||
geometry::equal_to<typename boost::range_value<Range>::type> equal;
|
||||
|
||||
iterator it = boost::begin(view);
|
||||
iterator next = ++boost::begin(view);
|
||||
for (; next != boost::end(view); ++it, ++next)
|
||||
const_iterator it = boost::const_begin(view);
|
||||
const_iterator next = it;
|
||||
++next;
|
||||
for (; next != boost::const_end(view); ++it, ++next)
|
||||
{
|
||||
if ( equal(*it, *next) )
|
||||
{
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2011-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2015.
|
||||
// Modifications copyright (c) 2015 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, 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
|
||||
@@ -9,10 +14,13 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_PARTITION_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_PARTITION_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/geometry/algorithms/assign.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/algorithms/assign.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@@ -20,8 +28,6 @@ namespace boost { namespace geometry
|
||||
namespace detail { namespace partition
|
||||
{
|
||||
|
||||
typedef std::vector<std::size_t> index_vector_type;
|
||||
|
||||
template <int Dimension, typename Box>
|
||||
inline void divide_box(Box const& box, Box& lower_box, Box& upper_box)
|
||||
{
|
||||
@@ -38,31 +44,26 @@ inline void divide_box(Box const& box, Box& lower_box, Box& upper_box)
|
||||
geometry::set<min_corner, Dimension>(upper_box, mid);
|
||||
}
|
||||
|
||||
// Divide collection into three subsets: lower, upper and oversized
|
||||
// Divide forward_range into three subsets: lower, upper and oversized
|
||||
// (not-fitting)
|
||||
// (lower == left or bottom, upper == right or top)
|
||||
template <typename OverlapsPolicy, typename InputCollection, typename Box>
|
||||
template <typename OverlapsPolicy, typename Box, typename IteratorVector>
|
||||
inline void divide_into_subsets(Box const& lower_box,
|
||||
Box const& upper_box,
|
||||
InputCollection const& collection,
|
||||
index_vector_type const& input,
|
||||
index_vector_type& lower,
|
||||
index_vector_type& upper,
|
||||
index_vector_type& exceeding)
|
||||
IteratorVector const& input,
|
||||
IteratorVector& lower,
|
||||
IteratorVector& upper,
|
||||
IteratorVector& exceeding)
|
||||
{
|
||||
typedef boost::range_iterator
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
index_vector_type const
|
||||
>::type index_iterator_type;
|
||||
IteratorVector const
|
||||
>::type it_type;
|
||||
|
||||
for(index_iterator_type it = boost::begin(input);
|
||||
it != boost::end(input);
|
||||
++it)
|
||||
for(it_type it = boost::begin(input); it != boost::end(input); ++it)
|
||||
{
|
||||
bool const lower_overlapping = OverlapsPolicy::apply(lower_box,
|
||||
collection[*it]);
|
||||
bool const upper_overlapping = OverlapsPolicy::apply(upper_box,
|
||||
collection[*it]);
|
||||
bool const lower_overlapping = OverlapsPolicy::apply(lower_box, **it);
|
||||
bool const upper_overlapping = OverlapsPolicy::apply(upper_box, **it);
|
||||
|
||||
if (lower_overlapping && upper_overlapping)
|
||||
{
|
||||
@@ -84,99 +85,109 @@ inline void divide_into_subsets(Box const& lower_box,
|
||||
}
|
||||
}
|
||||
|
||||
template <typename ExpandPolicy, typename Box, typename InputCollection>
|
||||
inline void expand_with_elements(Box& total,
|
||||
InputCollection const& collection,
|
||||
index_vector_type const& input)
|
||||
template
|
||||
<
|
||||
typename ExpandPolicy,
|
||||
typename Box,
|
||||
typename IteratorVector
|
||||
>
|
||||
inline void expand_with_elements(Box& total, IteratorVector const& input)
|
||||
{
|
||||
typedef boost::range_iterator<index_vector_type const>::type it_type;
|
||||
typedef typename boost::range_iterator<IteratorVector const>::type it_type;
|
||||
for(it_type it = boost::begin(input); it != boost::end(input); ++it)
|
||||
{
|
||||
ExpandPolicy::apply(total, collection[*it]);
|
||||
ExpandPolicy::apply(total, **it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Match collection with itself
|
||||
template <typename InputCollection, typename Policy>
|
||||
inline void handle_one(InputCollection const& collection,
|
||||
index_vector_type const& input,
|
||||
Policy& policy)
|
||||
// Match forward_range with itself
|
||||
template <typename Policy, typename IteratorVector>
|
||||
inline void handle_one(IteratorVector const& input, Policy& policy)
|
||||
{
|
||||
if (boost::size(input) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
typedef boost::range_iterator<index_vector_type const>::type
|
||||
index_iterator_type;
|
||||
typedef typename boost::range_iterator<IteratorVector const>::type it_type;
|
||||
|
||||
// Quadratic behaviour at lowest level (lowest quad, or all exceeding)
|
||||
for(index_iterator_type it1 = boost::begin(input);
|
||||
it1 != boost::end(input);
|
||||
++it1)
|
||||
for (it_type it1 = boost::begin(input); it1 != boost::end(input); ++it1)
|
||||
{
|
||||
index_iterator_type it2 = it1;
|
||||
for(++it2; it2 != boost::end(input); ++it2)
|
||||
it_type it2 = it1;
|
||||
for (++it2; it2 != boost::end(input); ++it2)
|
||||
{
|
||||
policy.apply(collection[*it1], collection[*it2]);
|
||||
policy.apply(**it1, **it2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Match collection 1 with collection 2
|
||||
// Match forward range 1 with forward range 2
|
||||
template
|
||||
<
|
||||
typename InputCollection1,
|
||||
typename InputCollection2,
|
||||
typename Policy
|
||||
typename Policy,
|
||||
typename IteratorVector1,
|
||||
typename IteratorVector2
|
||||
>
|
||||
inline void handle_two(
|
||||
InputCollection1 const& collection1, index_vector_type const& input1,
|
||||
InputCollection2 const& collection2, index_vector_type const& input2,
|
||||
inline void handle_two(IteratorVector1 const& input1,
|
||||
IteratorVector2 const& input2,
|
||||
Policy& policy)
|
||||
{
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
IteratorVector1 const
|
||||
>::type iterator_type1;
|
||||
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
IteratorVector2 const
|
||||
>::type iterator_type2;
|
||||
|
||||
if (boost::size(input1) == 0 || boost::size(input2) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
typedef boost::range_iterator
|
||||
<
|
||||
index_vector_type const
|
||||
>::type index_iterator_type;
|
||||
|
||||
for(index_iterator_type it1 = boost::begin(input1);
|
||||
for(iterator_type1 it1 = boost::begin(input1);
|
||||
it1 != boost::end(input1);
|
||||
++it1)
|
||||
{
|
||||
for(index_iterator_type it2 = boost::begin(input2);
|
||||
for(iterator_type2 it2 = boost::begin(input2);
|
||||
it2 != boost::end(input2);
|
||||
++it2)
|
||||
{
|
||||
policy.apply(collection1[*it1], collection2[*it2]);
|
||||
policy.apply(**it1, **it2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline bool recurse_ok(index_vector_type const& input,
|
||||
template <typename IteratorVector>
|
||||
inline bool recurse_ok(IteratorVector const& input,
|
||||
std::size_t min_elements, std::size_t level)
|
||||
{
|
||||
return boost::size(input) >= min_elements
|
||||
&& level < 100;
|
||||
}
|
||||
|
||||
inline bool recurse_ok(index_vector_type const& input1,
|
||||
index_vector_type const& input2,
|
||||
template <typename IteratorVector1, typename IteratorVector2>
|
||||
inline bool recurse_ok(IteratorVector1 const& input1,
|
||||
IteratorVector2 const& input2,
|
||||
std::size_t min_elements, std::size_t level)
|
||||
{
|
||||
return boost::size(input1) >= min_elements
|
||||
&& recurse_ok(input2, min_elements, level);
|
||||
}
|
||||
|
||||
inline bool recurse_ok(index_vector_type const& input1,
|
||||
index_vector_type const& input2,
|
||||
index_vector_type const& input3,
|
||||
template
|
||||
<
|
||||
typename IteratorVector1,
|
||||
typename IteratorVector2,
|
||||
typename IteratorVector3
|
||||
>
|
||||
inline bool recurse_ok(IteratorVector1 const& input1,
|
||||
IteratorVector2 const& input2,
|
||||
IteratorVector3 const& input3,
|
||||
std::size_t min_elements, std::size_t level)
|
||||
{
|
||||
return boost::size(input1) >= min_elements
|
||||
@@ -193,7 +204,7 @@ template
|
||||
typename ExpandPolicy2,
|
||||
typename VisitBoxPolicy
|
||||
>
|
||||
class partition_two_collections;
|
||||
class partition_two_ranges;
|
||||
|
||||
|
||||
template
|
||||
@@ -204,79 +215,71 @@ template
|
||||
typename ExpandPolicy,
|
||||
typename VisitBoxPolicy
|
||||
>
|
||||
class partition_one_collection
|
||||
class partition_one_range
|
||||
{
|
||||
typedef std::vector<std::size_t> index_vector_type;
|
||||
|
||||
template <typename InputCollection>
|
||||
static inline Box get_new_box(InputCollection const& collection,
|
||||
index_vector_type const& input)
|
||||
template <typename IteratorVector>
|
||||
static inline Box get_new_box(IteratorVector const& input)
|
||||
{
|
||||
Box box;
|
||||
geometry::assign_inverse(box);
|
||||
expand_with_elements<ExpandPolicy>(box, collection, input);
|
||||
expand_with_elements<ExpandPolicy>(box, input);
|
||||
return box;
|
||||
}
|
||||
|
||||
template <typename InputCollection, typename Policy>
|
||||
template <typename Policy, typename IteratorVector>
|
||||
static inline void next_level(Box const& box,
|
||||
InputCollection const& collection,
|
||||
index_vector_type const& input,
|
||||
IteratorVector const& input,
|
||||
std::size_t level, std::size_t min_elements,
|
||||
Policy& policy, VisitBoxPolicy& box_policy)
|
||||
{
|
||||
if (recurse_ok(input, min_elements, level))
|
||||
{
|
||||
partition_one_collection
|
||||
partition_one_range
|
||||
<
|
||||
1 - Dimension,
|
||||
Box,
|
||||
OverlapsPolicy,
|
||||
ExpandPolicy,
|
||||
VisitBoxPolicy
|
||||
>::apply(box, collection, input,
|
||||
level + 1, min_elements, policy, box_policy);
|
||||
>::apply(box, input, level + 1, min_elements, policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_one(collection, input, policy);
|
||||
handle_one(input, policy);
|
||||
}
|
||||
}
|
||||
|
||||
// Function to switch to two collections if there are geometries exceeding
|
||||
// the separation line
|
||||
template <typename InputCollection, typename Policy>
|
||||
// Function to switch to two forward ranges if there are
|
||||
// geometries exceeding the separation line
|
||||
template <typename Policy, typename IteratorVector>
|
||||
static inline void next_level2(Box const& box,
|
||||
InputCollection const& collection,
|
||||
index_vector_type const& input1,
|
||||
index_vector_type const& input2,
|
||||
IteratorVector const& input1,
|
||||
IteratorVector const& input2,
|
||||
std::size_t level, std::size_t min_elements,
|
||||
Policy& policy, VisitBoxPolicy& box_policy)
|
||||
{
|
||||
|
||||
if (recurse_ok(input1, input2, min_elements, level))
|
||||
{
|
||||
partition_two_collections
|
||||
partition_two_ranges
|
||||
<
|
||||
1 - Dimension,
|
||||
Box,
|
||||
OverlapsPolicy, OverlapsPolicy,
|
||||
ExpandPolicy, ExpandPolicy,
|
||||
VisitBoxPolicy
|
||||
>::apply(box, collection, input1, collection, input2,
|
||||
level + 1, min_elements, policy, box_policy);
|
||||
>::apply(box, input1, input2, level + 1, min_elements,
|
||||
policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_two(collection, input1, collection, input2, policy);
|
||||
handle_two(input1, input2, policy);
|
||||
}
|
||||
}
|
||||
|
||||
public :
|
||||
template <typename InputCollection, typename Policy>
|
||||
template <typename Policy, typename IteratorVector>
|
||||
static inline void apply(Box const& box,
|
||||
InputCollection const& collection,
|
||||
index_vector_type const& input,
|
||||
IteratorVector const& input,
|
||||
std::size_t level,
|
||||
std::size_t min_elements,
|
||||
Policy& policy, VisitBoxPolicy& box_policy)
|
||||
@@ -286,33 +289,31 @@ public :
|
||||
Box lower_box, upper_box;
|
||||
divide_box<Dimension>(box, lower_box, upper_box);
|
||||
|
||||
index_vector_type lower, upper, exceeding;
|
||||
divide_into_subsets<OverlapsPolicy>(lower_box, upper_box, collection,
|
||||
IteratorVector lower, upper, exceeding;
|
||||
divide_into_subsets<OverlapsPolicy>(lower_box, upper_box,
|
||||
input, lower, upper, exceeding);
|
||||
|
||||
if (boost::size(exceeding) > 0)
|
||||
{
|
||||
// Get the box of exceeding-only
|
||||
Box exceeding_box = get_new_box(collection, exceeding);
|
||||
Box exceeding_box = get_new_box(exceeding);
|
||||
|
||||
// Recursively do exceeding elements only, in next dimension they
|
||||
// will probably be less exceeding within the new box
|
||||
next_level(exceeding_box, collection, exceeding, level,
|
||||
min_elements, policy, box_policy);
|
||||
next_level(exceeding_box, exceeding, level, min_elements,
|
||||
policy, box_policy);
|
||||
|
||||
// Switch to two collections, combine exceeding with lower resp upper
|
||||
// but not lower/lower, upper/upper
|
||||
next_level2(exceeding_box, collection, exceeding, lower, level,
|
||||
min_elements, policy, box_policy);
|
||||
next_level2(exceeding_box, collection, exceeding, upper, level,
|
||||
min_elements, policy, box_policy);
|
||||
// Switch to two forward ranges, combine exceeding with
|
||||
// lower resp upper, but not lower/lower, upper/upper
|
||||
next_level2(exceeding_box, exceeding, lower, level, min_elements,
|
||||
policy, box_policy);
|
||||
next_level2(exceeding_box, exceeding, upper, level, min_elements,
|
||||
policy, box_policy);
|
||||
}
|
||||
|
||||
// Recursively call operation both parts
|
||||
next_level(lower_box, collection, lower, level, min_elements,
|
||||
policy, box_policy);
|
||||
next_level(upper_box, collection, upper, level, min_elements,
|
||||
policy, box_policy);
|
||||
next_level(lower_box, lower, level, min_elements, policy, box_policy);
|
||||
next_level(upper_box, upper, level, min_elements, policy, box_policy);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -326,25 +327,21 @@ template
|
||||
typename ExpandPolicy2,
|
||||
typename VisitBoxPolicy
|
||||
>
|
||||
class partition_two_collections
|
||||
class partition_two_ranges
|
||||
{
|
||||
typedef std::vector<std::size_t> index_vector_type;
|
||||
|
||||
template
|
||||
<
|
||||
typename InputCollection1,
|
||||
typename InputCollection2,
|
||||
typename Policy
|
||||
typename Policy,
|
||||
typename IteratorVector1,
|
||||
typename IteratorVector2
|
||||
>
|
||||
static inline void next_level(Box const& box,
|
||||
InputCollection1 const& collection1,
|
||||
index_vector_type const& input1,
|
||||
InputCollection2 const& collection2,
|
||||
index_vector_type const& input2,
|
||||
IteratorVector1 const& input1,
|
||||
IteratorVector2 const& input2,
|
||||
std::size_t level, std::size_t min_elements,
|
||||
Policy& policy, VisitBoxPolicy& box_policy)
|
||||
{
|
||||
partition_two_collections
|
||||
partition_two_ranges
|
||||
<
|
||||
1 - Dimension,
|
||||
Box,
|
||||
@@ -353,50 +350,38 @@ class partition_two_collections
|
||||
ExpandPolicy1,
|
||||
ExpandPolicy2,
|
||||
VisitBoxPolicy
|
||||
>::apply(box, collection1, input1, collection2, input2,
|
||||
level + 1, min_elements,
|
||||
policy, box_policy);
|
||||
>::apply(box, input1, input2, level + 1, min_elements,
|
||||
policy, box_policy);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename ExpandPolicy,
|
||||
typename InputCollection
|
||||
>
|
||||
static inline Box get_new_box(InputCollection const& collection,
|
||||
index_vector_type const& input)
|
||||
template <typename ExpandPolicy, typename IteratorVector>
|
||||
static inline Box get_new_box(IteratorVector const& input)
|
||||
{
|
||||
Box box;
|
||||
geometry::assign_inverse(box);
|
||||
expand_with_elements<ExpandPolicy>(box, collection, input);
|
||||
expand_with_elements<ExpandPolicy>(box, input);
|
||||
return box;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename InputCollection1,
|
||||
typename InputCollection2
|
||||
>
|
||||
static inline Box get_new_box(InputCollection1 const& collection1,
|
||||
index_vector_type const& input1,
|
||||
InputCollection2 const& collection2,
|
||||
index_vector_type const& input2)
|
||||
template <typename IteratorVector1, typename IteratorVector2>
|
||||
static inline Box get_new_box(IteratorVector1 const& input1,
|
||||
IteratorVector2 const& input2)
|
||||
{
|
||||
Box box = get_new_box<ExpandPolicy1>(collection1, input1);
|
||||
expand_with_elements<ExpandPolicy2>(box, collection2, input2);
|
||||
Box box = get_new_box<ExpandPolicy1>(input1);
|
||||
expand_with_elements<ExpandPolicy2>(box, input2);
|
||||
return box;
|
||||
}
|
||||
|
||||
public :
|
||||
template
|
||||
<
|
||||
typename InputCollection1,
|
||||
typename InputCollection2,
|
||||
typename Policy
|
||||
typename Policy,
|
||||
typename IteratorVector1,
|
||||
typename IteratorVector2
|
||||
>
|
||||
static inline void apply(Box const& box,
|
||||
InputCollection1 const& collection1, index_vector_type const& input1,
|
||||
InputCollection2 const& collection2, index_vector_type const& input2,
|
||||
IteratorVector1 const& input1,
|
||||
IteratorVector2 const& input2,
|
||||
std::size_t level,
|
||||
std::size_t min_elements,
|
||||
Policy& policy, VisitBoxPolicy& box_policy)
|
||||
@@ -406,11 +391,11 @@ public :
|
||||
Box lower_box, upper_box;
|
||||
divide_box<Dimension>(box, lower_box, upper_box);
|
||||
|
||||
index_vector_type lower1, upper1, exceeding1;
|
||||
index_vector_type lower2, upper2, exceeding2;
|
||||
divide_into_subsets<OverlapsPolicy1>(lower_box, upper_box, collection1,
|
||||
IteratorVector1 lower1, upper1, exceeding1;
|
||||
IteratorVector2 lower2, upper2, exceeding2;
|
||||
divide_into_subsets<OverlapsPolicy1>(lower_box, upper_box,
|
||||
input1, lower1, upper1, exceeding1);
|
||||
divide_into_subsets<OverlapsPolicy2>(lower_box, upper_box, collection2,
|
||||
divide_into_subsets<OverlapsPolicy2>(lower_box, upper_box,
|
||||
input2, lower2, upper2, exceeding2);
|
||||
|
||||
if (boost::size(exceeding1) > 0)
|
||||
@@ -419,35 +404,31 @@ public :
|
||||
|
||||
if (recurse_ok(exceeding1, exceeding2, min_elements, level))
|
||||
{
|
||||
Box exceeding_box = get_new_box(collection1, exceeding1,
|
||||
collection2, exceeding2);
|
||||
next_level(exceeding_box, collection1, exceeding1,
|
||||
collection2, exceeding2, level,
|
||||
min_elements, policy, box_policy);
|
||||
Box exceeding_box = get_new_box(exceeding1, exceeding2);
|
||||
next_level(exceeding_box, exceeding1, exceeding2, level,
|
||||
min_elements, policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_two(collection1, exceeding1, collection2, exceeding2,
|
||||
policy);
|
||||
handle_two(exceeding1, exceeding2, policy);
|
||||
}
|
||||
|
||||
// All exceeding from 1 with lower and upper of 2:
|
||||
|
||||
// (Check sizes of all three collections to avoid recurse into
|
||||
// (Check sizes of all three forward ranges to avoid recurse into
|
||||
// the same combinations again and again)
|
||||
if (recurse_ok(lower2, upper2, exceeding1, min_elements, level))
|
||||
{
|
||||
Box exceeding_box
|
||||
= get_new_box<ExpandPolicy1>(collection1, exceeding1);
|
||||
next_level(exceeding_box, collection1, exceeding1,
|
||||
collection2, lower2, level, min_elements, policy, box_policy);
|
||||
next_level(exceeding_box, collection1, exceeding1,
|
||||
collection2, upper2, level, min_elements, policy, box_policy);
|
||||
Box exceeding_box = get_new_box<ExpandPolicy1>(exceeding1);
|
||||
next_level(exceeding_box, exceeding1, lower2, level,
|
||||
min_elements, policy, box_policy);
|
||||
next_level(exceeding_box, exceeding1, upper2, level,
|
||||
min_elements, policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_two(collection1, exceeding1, collection2, lower2, policy);
|
||||
handle_two(collection1, exceeding1, collection2, upper2, policy);
|
||||
handle_two(exceeding1, lower2, policy);
|
||||
handle_two(exceeding1, upper2, policy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,37 +437,36 @@ public :
|
||||
// All exceeding from 2 with lower and upper of 1:
|
||||
if (recurse_ok(lower1, upper1, exceeding2, min_elements, level))
|
||||
{
|
||||
Box exceeding_box
|
||||
= get_new_box<ExpandPolicy2>(collection2, exceeding2);
|
||||
next_level(exceeding_box, collection1, lower1,
|
||||
collection2, exceeding2, level, min_elements, policy, box_policy);
|
||||
next_level(exceeding_box, collection1, upper1,
|
||||
collection2, exceeding2, level, min_elements, policy, box_policy);
|
||||
Box exceeding_box = get_new_box<ExpandPolicy2>(exceeding2);
|
||||
next_level(exceeding_box, lower1, exceeding2, level,
|
||||
min_elements, policy, box_policy);
|
||||
next_level(exceeding_box, upper1, exceeding2, level,
|
||||
min_elements, policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_two(collection1, lower1, collection2, exceeding2, policy);
|
||||
handle_two(collection1, upper1, collection2, exceeding2, policy);
|
||||
handle_two(lower1, exceeding2, policy);
|
||||
handle_two(upper1, exceeding2, policy);
|
||||
}
|
||||
}
|
||||
|
||||
if (recurse_ok(lower1, lower2, min_elements, level))
|
||||
{
|
||||
next_level(lower_box, collection1, lower1, collection2, lower2, level,
|
||||
min_elements, policy, box_policy);
|
||||
next_level(lower_box, lower1, lower2, level,
|
||||
min_elements, policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_two(collection1, lower1, collection2, lower2, policy);
|
||||
handle_two(lower1, lower2, policy);
|
||||
}
|
||||
if (recurse_ok(upper1, upper2, min_elements, level))
|
||||
{
|
||||
next_level(upper_box, collection1, upper1, collection2, upper2, level,
|
||||
min_elements, policy, box_policy);
|
||||
next_level(upper_box, upper1, upper2, level,
|
||||
min_elements, policy, box_policy);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_two(collection1, upper1, collection2, upper2, policy);
|
||||
handle_two(upper1, upper2, policy);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -523,63 +503,67 @@ template
|
||||
>
|
||||
class partition
|
||||
{
|
||||
typedef std::vector<std::size_t> index_vector_type;
|
||||
|
||||
template <typename ExpandPolicy, typename IncludePolicy, typename InputCollection>
|
||||
static inline void expand_to_collection(InputCollection const& collection,
|
||||
Box& total, index_vector_type& index_vector)
|
||||
template
|
||||
<
|
||||
typename ExpandPolicy,
|
||||
typename IncludePolicy,
|
||||
typename ForwardRange,
|
||||
typename IteratorVector
|
||||
>
|
||||
static inline void expand_to_range(ForwardRange const& forward_range,
|
||||
Box& total, IteratorVector& iterator_vector)
|
||||
{
|
||||
std::size_t index = 0;
|
||||
for(typename boost::range_iterator<InputCollection const>::type it
|
||||
= boost::begin(collection);
|
||||
it != boost::end(collection);
|
||||
++it, ++index)
|
||||
for(typename boost::range_iterator<ForwardRange const>::type it
|
||||
= boost::begin(forward_range);
|
||||
it != boost::end(forward_range);
|
||||
++it)
|
||||
{
|
||||
if (IncludePolicy::apply(*it))
|
||||
{
|
||||
ExpandPolicy::apply(total, *it);
|
||||
index_vector.push_back(index);
|
||||
iterator_vector.push_back(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public :
|
||||
template <typename InputCollection, typename VisitPolicy>
|
||||
static inline void apply(InputCollection const& collection,
|
||||
template <typename ForwardRange, typename VisitPolicy>
|
||||
static inline void apply(ForwardRange const& forward_range,
|
||||
VisitPolicy& visitor,
|
||||
std::size_t min_elements = 16,
|
||||
VisitBoxPolicy box_visitor = detail::partition::visit_no_policy()
|
||||
)
|
||||
{
|
||||
if (std::size_t(boost::size(collection)) > min_elements)
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
ForwardRange const
|
||||
>::type iterator_type;
|
||||
|
||||
if (std::size_t(boost::size(forward_range)) > min_elements)
|
||||
{
|
||||
index_vector_type index_vector;
|
||||
std::vector<iterator_type> iterator_vector;
|
||||
Box total;
|
||||
assign_inverse(total);
|
||||
expand_to_collection<ExpandPolicy1, IncludePolicy1>(collection,
|
||||
total, index_vector);
|
||||
expand_to_range<ExpandPolicy1, IncludePolicy1>(forward_range,
|
||||
total, iterator_vector);
|
||||
|
||||
detail::partition::partition_one_collection
|
||||
detail::partition::partition_one_range
|
||||
<
|
||||
0, Box,
|
||||
OverlapsPolicy1,
|
||||
ExpandPolicy1,
|
||||
VisitBoxPolicy
|
||||
>::apply(total, collection, index_vector, 0, min_elements,
|
||||
visitor, box_visitor);
|
||||
>::apply(total, iterator_vector, 0, min_elements,
|
||||
visitor, box_visitor);
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
InputCollection const
|
||||
>::type iterator_type;
|
||||
for(iterator_type it1 = boost::begin(collection);
|
||||
it1 != boost::end(collection);
|
||||
for(iterator_type it1 = boost::begin(forward_range);
|
||||
it1 != boost::end(forward_range);
|
||||
++it1)
|
||||
{
|
||||
iterator_type it2 = it1;
|
||||
for(++it2; it2 != boost::end(collection); ++it2)
|
||||
for(++it2; it2 != boost::end(forward_range); ++it2)
|
||||
{
|
||||
visitor.apply(*it1, *it2);
|
||||
}
|
||||
@@ -589,53 +573,55 @@ public :
|
||||
|
||||
template
|
||||
<
|
||||
typename InputCollection1,
|
||||
typename InputCollection2,
|
||||
typename ForwardRange1,
|
||||
typename ForwardRange2,
|
||||
typename VisitPolicy
|
||||
>
|
||||
static inline void apply(InputCollection1 const& collection1,
|
||||
InputCollection2 const& collection2,
|
||||
static inline void apply(ForwardRange1 const& forward_range1,
|
||||
ForwardRange2 const& forward_range2,
|
||||
VisitPolicy& visitor,
|
||||
std::size_t min_elements = 16,
|
||||
VisitBoxPolicy box_visitor = detail::partition::visit_no_policy()
|
||||
VisitBoxPolicy box_visitor
|
||||
= detail::partition::visit_no_policy()
|
||||
)
|
||||
{
|
||||
if (std::size_t(boost::size(collection1)) > min_elements
|
||||
&& std::size_t(boost::size(collection2)) > min_elements)
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
ForwardRange1 const
|
||||
>::type iterator_type1;
|
||||
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
ForwardRange2 const
|
||||
>::type iterator_type2;
|
||||
|
||||
if (std::size_t(boost::size(forward_range1)) > min_elements
|
||||
&& std::size_t(boost::size(forward_range2)) > min_elements)
|
||||
{
|
||||
index_vector_type index_vector1, index_vector2;
|
||||
std::vector<iterator_type1> iterator_vector1;
|
||||
std::vector<iterator_type2> iterator_vector2;
|
||||
Box total;
|
||||
assign_inverse(total);
|
||||
expand_to_collection<ExpandPolicy1, IncludePolicy1>(collection1,
|
||||
total, index_vector1);
|
||||
expand_to_collection<ExpandPolicy2, IncludePolicy2>(collection2,
|
||||
total, index_vector2);
|
||||
expand_to_range<ExpandPolicy1, IncludePolicy1>(forward_range1,
|
||||
total, iterator_vector1);
|
||||
expand_to_range<ExpandPolicy2, IncludePolicy2>(forward_range2,
|
||||
total, iterator_vector2);
|
||||
|
||||
detail::partition::partition_two_collections
|
||||
detail::partition::partition_two_ranges
|
||||
<
|
||||
0, Box, OverlapsPolicy1, OverlapsPolicy2,
|
||||
ExpandPolicy1, ExpandPolicy2, VisitBoxPolicy
|
||||
>::apply(total,
|
||||
collection1, index_vector1,
|
||||
collection2, index_vector2,
|
||||
0, min_elements, visitor, box_visitor);
|
||||
>::apply(total, iterator_vector1, iterator_vector2,
|
||||
0, min_elements, visitor, box_visitor);
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
InputCollection1 const
|
||||
>::type iterator_type1;
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
InputCollection2 const
|
||||
>::type iterator_type2;
|
||||
for(iterator_type1 it1 = boost::begin(collection1);
|
||||
it1 != boost::end(collection1);
|
||||
for(iterator_type1 it1 = boost::begin(forward_range1);
|
||||
it1 != boost::end(forward_range1);
|
||||
++it1)
|
||||
{
|
||||
for(iterator_type2 it2 = boost::begin(collection2);
|
||||
it2 != boost::end(collection2);
|
||||
for(iterator_type2 it2 = boost::begin(forward_range2);
|
||||
it2 != boost::end(forward_range2);
|
||||
++it2)
|
||||
{
|
||||
visitor.apply(*it1, *it2);
|
||||
|
||||
@@ -254,15 +254,15 @@ namespace strategy
|
||||
|
||||
#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
template <template<typename> class CS>
|
||||
struct strategy_parse<geographic_tag, CS<degree> >
|
||||
template <template<typename> class CoordinateSystem>
|
||||
struct strategy_parse<geographic_tag, CoordinateSystem<degree> >
|
||||
{
|
||||
typedef strategy::dms_parser<false> type;
|
||||
};
|
||||
|
||||
|
||||
template <template<typename> class CS>
|
||||
struct strategy_parse<geographic_tag, CS<radian> >
|
||||
template <template<typename> class CoordinateSystem>
|
||||
struct strategy_parse<geographic_tag, CoordinateSystem<radian> >
|
||||
{
|
||||
typedef strategy::dms_parser<true> type;
|
||||
};
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace boost { namespace geometry { namespace projections
|
||||
static const int NITER = 20;
|
||||
static const double EPS = 1e-7;
|
||||
static const double ONETOL = 1.000001;
|
||||
static const double CN = 2.67595;
|
||||
static const double CS = 2.43763;
|
||||
static const double CN_ = 2.67595;
|
||||
static const double CS_ = 2.43763;
|
||||
static const double RCN = 0.37369906014686373063;
|
||||
static const double RCS = 0.41023453108141924738;
|
||||
static const double FYCN = 1.75859;
|
||||
@@ -80,7 +80,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
double th1, c;
|
||||
int i;
|
||||
|
||||
c = sin(lp_lat) * (lp_lat < 0. ? CS : CN);
|
||||
c = sin(lp_lat) * (lp_lat < 0. ? CS_ : CN_);
|
||||
for (i = NITER; i; --i) {
|
||||
lp_lat -= th1 = (lp_lat + sin(lp_lat) - c) / (1. + cos(lp_lat));
|
||||
if (fabs(th1) < EPS) break;
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace mbtfpp{
|
||||
static const double CS = .95257934441568037152;
|
||||
static const double CS_ = .95257934441568037152;
|
||||
static const double FXC = .92582009977255146156;
|
||||
static const double FYC = 3.40168025708304504493;
|
||||
static const double C23 = .66666666666666666666;
|
||||
@@ -70,7 +70,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
lp_lat = asin(CS * sin(lp_lat));
|
||||
lp_lat = asin(CS_ * sin(lp_lat));
|
||||
xy_x = FXC * lp_lon * (2. * cos(C23 * lp_lat) - 1.);
|
||||
xy_y = FYC * sin(C13 * lp_lat);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
} else
|
||||
lp_lat = asin(lp_lat);
|
||||
lp_lon = xy_x / ( FXC * (2. * cos(C23 * (lp_lat *= 3.)) - 1.) );
|
||||
if (fabs(lp_lat = sin(lp_lat) / CS) >= 1.) {
|
||||
if (fabs(lp_lat = sin(lp_lat) / CS_) >= 1.) {
|
||||
if (fabs(lp_lat) > ONEEPS) throw proj_exception();
|
||||
else lp_lat = (lp_lat < 0.) ? -HALFPI : HALFPI;
|
||||
} else
|
||||
|
||||
@@ -90,10 +90,6 @@
|
||||
#include <boost/geometry/algorithms/unique.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
// Include multi a.o. because it can give weird effects
|
||||
// if you don't (e.g. area=0 of a multipolygon)
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
|
||||
// check includes all concepts
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace predicates {
|
||||
template <typename Fun, bool IsFunction>
|
||||
struct satisfies_impl
|
||||
{
|
||||
satisfies_impl() : fun(NULL) {}
|
||||
satisfies_impl(Fun f) : fun(f) {}
|
||||
Fun * fun;
|
||||
};
|
||||
@@ -32,6 +33,7 @@ struct satisfies_impl
|
||||
template <typename Fun>
|
||||
struct satisfies_impl<Fun, false>
|
||||
{
|
||||
satisfies_impl() {}
|
||||
satisfies_impl(Fun const& f) : fun(f) {}
|
||||
Fun fun;
|
||||
};
|
||||
@@ -42,6 +44,7 @@ struct satisfies
|
||||
{
|
||||
typedef satisfies_impl<Fun, ::boost::is_function<Fun>::value> base;
|
||||
|
||||
satisfies() {}
|
||||
satisfies(Fun const& f) : base(f) {}
|
||||
satisfies(base const& b) : base(b) {}
|
||||
};
|
||||
@@ -60,6 +63,7 @@ struct within_tag {};
|
||||
template <typename Geometry, typename Tag, bool Negated>
|
||||
struct spatial_predicate
|
||||
{
|
||||
spatial_predicate() {}
|
||||
spatial_predicate(Geometry const& g) : geometry(g) {}
|
||||
Geometry geometry;
|
||||
};
|
||||
@@ -75,6 +79,9 @@ struct spatial_predicate
|
||||
template <typename PointOrRelation>
|
||||
struct nearest
|
||||
{
|
||||
nearest()
|
||||
// : count(0)
|
||||
{}
|
||||
nearest(PointOrRelation const& por, unsigned k)
|
||||
: point_or_relation(por)
|
||||
, count(k)
|
||||
@@ -86,6 +93,9 @@ struct nearest
|
||||
template <typename SegmentOrLinestring>
|
||||
struct path
|
||||
{
|
||||
path()
|
||||
// : count(0)
|
||||
{}
|
||||
path(SegmentOrLinestring const& g, unsigned k)
|
||||
: geometry(g)
|
||||
, count(k)
|
||||
|
||||
122
include/boost/geometry/index/detail/rtree/iterators.hpp
Normal file
122
include/boost/geometry/index/detail/rtree/iterators.hpp
Normal file
@@ -0,0 +1,122 @@
|
||||
// Boost.Geometry Index
|
||||
//
|
||||
// R-tree iterators
|
||||
//
|
||||
// Copyright (c) 2011-2015 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
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_ITERATORS_HPP
|
||||
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_ITERATORS_HPP
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree { namespace iterators {
|
||||
|
||||
template <typename Value, typename Allocators>
|
||||
struct end_iterator
|
||||
{
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
typedef typename Allocators::const_pointer pointer;
|
||||
|
||||
reference operator*() const
|
||||
{
|
||||
BOOST_GEOMETRY_INDEX_ASSERT(false, "iterator not dereferencable");
|
||||
pointer p(0);
|
||||
return *p;
|
||||
}
|
||||
|
||||
const value_type * operator->() const
|
||||
{
|
||||
BOOST_GEOMETRY_INDEX_ASSERT(false, "iterator not dereferencable");
|
||||
const value_type * p = 0;
|
||||
return p;
|
||||
}
|
||||
|
||||
end_iterator & operator++()
|
||||
{
|
||||
BOOST_GEOMETRY_INDEX_ASSERT(false, "iterator not incrementable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
end_iterator operator++(int)
|
||||
{
|
||||
BOOST_GEOMETRY_INDEX_ASSERT(false, "iterator not incrementable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend bool operator==(end_iterator const& /*l*/, end_iterator const& /*r*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
|
||||
class iterator
|
||||
{
|
||||
typedef visitors::iterator<Value, Options, Translator, Box, Allocators> visitor_type;
|
||||
typedef typename visitor_type::node_pointer node_pointer;
|
||||
|
||||
public:
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
typedef typename Allocators::const_pointer pointer;
|
||||
|
||||
inline iterator()
|
||||
{}
|
||||
|
||||
inline iterator(node_pointer root)
|
||||
{
|
||||
m_visitor.initialize(root);
|
||||
}
|
||||
|
||||
reference operator*() const
|
||||
{
|
||||
return m_visitor.dereference();
|
||||
}
|
||||
|
||||
const value_type * operator->() const
|
||||
{
|
||||
return boost::addressof(m_visitor.dereference());
|
||||
}
|
||||
|
||||
iterator & operator++()
|
||||
{
|
||||
m_visitor.increment();
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator operator++(int)
|
||||
{
|
||||
iterator temp = *this;
|
||||
this->operator++();
|
||||
return temp;
|
||||
}
|
||||
|
||||
friend bool operator==(iterator const& l, iterator const& r)
|
||||
{
|
||||
return l.m_visitor == r.m_visitor;
|
||||
}
|
||||
|
||||
friend bool operator==(iterator const& l, end_iterator<Value, Allocators> const& /*r*/)
|
||||
{
|
||||
return l.m_visitor.is_end();
|
||||
}
|
||||
|
||||
friend bool operator==(end_iterator<Value, Allocators> const& /*l*/, iterator const& r)
|
||||
{
|
||||
return r.m_visitor.is_end();
|
||||
}
|
||||
|
||||
private:
|
||||
visitor_type m_visitor;
|
||||
};
|
||||
|
||||
}}}}}} // namespace boost::geometry::index::detail::rtree::iterators
|
||||
|
||||
#endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_ITERATORS_HPP
|
||||
@@ -20,7 +20,7 @@ namespace boost { namespace geometry { namespace index { namespace detail { name
|
||||
template <typename Value, typename Allocators>
|
||||
struct end_query_iterator
|
||||
{
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
@@ -65,12 +65,15 @@ class spatial_query_iterator
|
||||
typedef typename visitor_type::node_pointer node_pointer;
|
||||
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
typedef typename Allocators::const_pointer pointer;
|
||||
|
||||
inline spatial_query_iterator()
|
||||
{}
|
||||
|
||||
inline spatial_query_iterator(Translator const& t, Predicates const& p)
|
||||
: m_visitor(t, p)
|
||||
{}
|
||||
@@ -130,12 +133,15 @@ class distance_query_iterator
|
||||
typedef typename visitor_type::node_pointer node_pointer;
|
||||
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
typedef typename Allocators::const_pointer pointer;
|
||||
|
||||
inline distance_query_iterator()
|
||||
{}
|
||||
|
||||
inline distance_query_iterator(Translator const& t, Predicates const& p)
|
||||
: m_visitor(t, p)
|
||||
{}
|
||||
@@ -188,22 +194,19 @@ private:
|
||||
visitor_type m_visitor;
|
||||
};
|
||||
|
||||
|
||||
template <typename L, typename R>
|
||||
inline bool operator!=(L const& l, R const& r)
|
||||
{
|
||||
return !(l == r);
|
||||
}
|
||||
|
||||
}}}}}} // namespace boost::geometry::index::detail::rtree::iterators
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree { namespace iterators {
|
||||
|
||||
template <typename Value, typename Allocators>
|
||||
class query_iterator_base
|
||||
{
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
@@ -226,12 +229,13 @@ class query_iterator_wrapper
|
||||
typedef query_iterator_base<Value, Allocators> base_t;
|
||||
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
typedef typename Allocators::const_pointer pointer;
|
||||
|
||||
query_iterator_wrapper() : m_iterator() {}
|
||||
explicit query_iterator_wrapper(Iterator const& it) : m_iterator(it) {}
|
||||
|
||||
virtual base_t * clone() const { return new query_iterator_wrapper(m_iterator); }
|
||||
@@ -258,13 +262,14 @@ class query_iterator
|
||||
typedef boost::scoped_ptr<iterator_base> iterator_ptr;
|
||||
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
typedef Value value_type;
|
||||
typedef typename Allocators::const_reference reference;
|
||||
typedef typename Allocators::difference_type difference_type;
|
||||
typedef typename Allocators::const_pointer pointer;
|
||||
|
||||
query_iterator() {}
|
||||
query_iterator()
|
||||
{}
|
||||
|
||||
template <typename It>
|
||||
query_iterator(It const& it)
|
||||
|
||||
@@ -337,6 +337,13 @@ public:
|
||||
};
|
||||
typedef std::vector<internal_stack_element> internal_stack_type;
|
||||
|
||||
inline distance_query_incremental()
|
||||
: m_translator(NULL)
|
||||
// , m_pred()
|
||||
, current_neighbor((std::numeric_limits<size_type>::max)())
|
||||
// , next_closest_node_distance((std::numeric_limits<node_distance_type>::max)())
|
||||
{}
|
||||
|
||||
inline distance_query_incremental(Translator const& translator, Predicates const& pred)
|
||||
: m_translator(::boost::addressof(translator))
|
||||
, m_pred(pred)
|
||||
@@ -428,6 +435,7 @@ public:
|
||||
{
|
||||
BOOST_GEOMETRY_INDEX_ASSERT(l.current_neighbor != r.current_neighbor ||
|
||||
(std::numeric_limits<size_type>::max)() == l.current_neighbor ||
|
||||
(std::numeric_limits<size_type>::max)() == r.current_neighbor ||
|
||||
l.neighbors[l.current_neighbor].second == r.neighbors[r.current_neighbor].second,
|
||||
"not corresponding iterators");
|
||||
return l.current_neighbor == r.current_neighbor;
|
||||
|
||||
134
include/boost/geometry/index/detail/rtree/visitors/iterator.hpp
Normal file
134
include/boost/geometry/index/detail/rtree/visitors/iterator.hpp
Normal file
@@ -0,0 +1,134 @@
|
||||
// Boost.Geometry Index
|
||||
//
|
||||
// R-tree iterator visitor implementation
|
||||
//
|
||||
// Copyright (c) 2011-2015 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
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_ITERATOR_HPP
|
||||
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_ITERATOR_HPP
|
||||
|
||||
namespace boost { namespace geometry { namespace index {
|
||||
|
||||
namespace detail { namespace rtree { namespace visitors {
|
||||
|
||||
template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
|
||||
class iterator
|
||||
: public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
|
||||
{
|
||||
public:
|
||||
typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
|
||||
typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
|
||||
typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
|
||||
|
||||
typedef typename Allocators::size_type size_type;
|
||||
typedef typename Allocators::const_reference const_reference;
|
||||
typedef typename Allocators::node_pointer node_pointer;
|
||||
|
||||
typedef typename rtree::elements_type<internal_node>::type::const_iterator internal_iterator;
|
||||
typedef typename rtree::elements_type<leaf>::type leaf_elements;
|
||||
typedef typename rtree::elements_type<leaf>::type::const_iterator leaf_iterator;
|
||||
|
||||
inline iterator()
|
||||
: m_values(NULL)
|
||||
, m_current()
|
||||
{}
|
||||
|
||||
inline void operator()(internal_node const& n)
|
||||
{
|
||||
typedef typename rtree::elements_type<internal_node>::type elements_type;
|
||||
elements_type const& elements = rtree::elements(n);
|
||||
|
||||
m_internal_stack.push_back(std::make_pair(elements.begin(), elements.end()));
|
||||
}
|
||||
|
||||
inline void operator()(leaf const& n)
|
||||
{
|
||||
m_values = ::boost::addressof(rtree::elements(n));
|
||||
m_current = rtree::elements(n).begin();
|
||||
}
|
||||
|
||||
const_reference dereference() const
|
||||
{
|
||||
BOOST_GEOMETRY_INDEX_ASSERT(m_values, "not dereferencable");
|
||||
return *m_current;
|
||||
}
|
||||
|
||||
void initialize(node_pointer root)
|
||||
{
|
||||
rtree::apply_visitor(*this, *root);
|
||||
search_value();
|
||||
}
|
||||
|
||||
void increment()
|
||||
{
|
||||
++m_current;
|
||||
search_value();
|
||||
}
|
||||
|
||||
void search_value()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
// if leaf is choosen, move to the next value in leaf
|
||||
if ( m_values )
|
||||
{
|
||||
// there are more values in the current leaf
|
||||
if ( m_current != m_values->end() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// no more values, clear current leaf
|
||||
else
|
||||
{
|
||||
m_values = 0;
|
||||
}
|
||||
}
|
||||
// if leaf isn't choosen, move to the next leaf
|
||||
else
|
||||
{
|
||||
// return if there is no more nodes to traverse
|
||||
if ( m_internal_stack.empty() )
|
||||
return;
|
||||
|
||||
// no more children in current node, remove it from stack
|
||||
if ( m_internal_stack.back().first == m_internal_stack.back().second )
|
||||
{
|
||||
m_internal_stack.pop_back();
|
||||
continue;
|
||||
}
|
||||
|
||||
internal_iterator it = m_internal_stack.back().first;
|
||||
++m_internal_stack.back().first;
|
||||
|
||||
// push the next node to the stack
|
||||
rtree::apply_visitor(*this, *(it->second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool is_end() const
|
||||
{
|
||||
return 0 == m_values;
|
||||
}
|
||||
|
||||
friend bool operator==(iterator const& l, iterator const& r)
|
||||
{
|
||||
return (l.m_values == r.m_values) && (0 == l.m_values || l.m_current == r.m_current );
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
std::vector< std::pair<internal_iterator, internal_iterator> > m_internal_stack;
|
||||
const leaf_elements * m_values;
|
||||
leaf_iterator m_current;
|
||||
};
|
||||
|
||||
}}} // namespace detail::rtree::visitors
|
||||
|
||||
}}} // namespace boost::geometry::index
|
||||
|
||||
#endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_ITERATOR_HPP
|
||||
@@ -94,10 +94,18 @@ public:
|
||||
|
||||
static const unsigned predicates_len = index::detail::predicates_length<Predicates>::value;
|
||||
|
||||
inline spatial_query_incremental()
|
||||
: m_translator(NULL)
|
||||
// , m_pred()
|
||||
, m_values(NULL)
|
||||
, m_current()
|
||||
{}
|
||||
|
||||
inline spatial_query_incremental(Translator const& t, Predicates const& p)
|
||||
: m_translator(::boost::addressof(t))
|
||||
, m_pred(p)
|
||||
, m_values(0)
|
||||
, m_values(NULL)
|
||||
, m_current()
|
||||
{}
|
||||
|
||||
inline void operator()(internal_node const& n)
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <boost/geometry/index/detail/algorithms/is_valid.hpp>
|
||||
|
||||
#include <boost/geometry/index/detail/rtree/visitors/insert.hpp>
|
||||
#include <boost/geometry/index/detail/rtree/visitors/iterator.hpp>
|
||||
#include <boost/geometry/index/detail/rtree/visitors/remove.hpp>
|
||||
#include <boost/geometry/index/detail/rtree/visitors/copy.hpp>
|
||||
#include <boost/geometry/index/detail/rtree/visitors/destroy.hpp>
|
||||
@@ -78,6 +79,7 @@
|
||||
|
||||
#include <boost/geometry/index/detail/rtree/utilities/view.hpp>
|
||||
|
||||
#include <boost/geometry/index/detail/rtree/iterators.hpp>
|
||||
#include <boost/geometry/index/detail/rtree/query_iterators.hpp>
|
||||
|
||||
#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
|
||||
@@ -220,8 +222,17 @@ public:
|
||||
/*! \brief Unsigned integral type used by the container. */
|
||||
typedef typename allocators_type::size_type size_type;
|
||||
|
||||
/*! \brief Type of const query iterator. */
|
||||
typedef index::detail::rtree::iterators::query_iterator<value_type, allocators_type> const_query_iterator;
|
||||
/*! \brief Type of const iterator, category ForwardIterator. */
|
||||
typedef index::detail::rtree::iterators::iterator
|
||||
<
|
||||
value_type, options_type, translator_type, box_type, allocators_type
|
||||
> const_iterator;
|
||||
|
||||
/*! \brief Type of const query iterator, category ForwardIterator. */
|
||||
typedef index::detail::rtree::iterators::query_iterator
|
||||
<
|
||||
value_type, allocators_type
|
||||
> const_query_iterator;
|
||||
|
||||
public:
|
||||
|
||||
@@ -766,6 +777,27 @@ public:
|
||||
tree.query(bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result));
|
||||
// return 5 elements nearest to pt and elements are intersecting box
|
||||
tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
|
||||
|
||||
// For each found value do_something (it is a type of function object)
|
||||
tree.query(bgi::intersects(box),
|
||||
boost::make_function_output_iterator(do_something()));
|
||||
|
||||
// For each value stored in the rtree do_something
|
||||
// always_true is a type of function object always returning true
|
||||
tree.query(bgi::satisfies(always_true()),
|
||||
boost::make_function_output_iterator(do_something()));
|
||||
|
||||
// C++11 (lambda expression)
|
||||
tree.query(bgi::intersects(box),
|
||||
boost::make_function_output_iterator([](value_type const& val){
|
||||
// do something
|
||||
}));
|
||||
|
||||
// C++14 (generic lambda expression)
|
||||
tree.query(bgi::intersects(box),
|
||||
boost::make_function_output_iterator([](auto const& val){
|
||||
// do something
|
||||
}));
|
||||
\endverbatim
|
||||
|
||||
\par Throws
|
||||
@@ -774,7 +806,7 @@ public:
|
||||
|
||||
\warning
|
||||
Only one \c nearest() perdicate may be passed to the query. Passing more of them results in compile-time error.
|
||||
|
||||
|
||||
\param predicates Predicates.
|
||||
\param out_it The output iterator, e.g. generated by std::back_inserter().
|
||||
|
||||
@@ -794,11 +826,11 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the query iterator pointing at the begin of the query range.
|
||||
\brief Returns a query iterator pointing at the begin of the query range.
|
||||
|
||||
This method returns an iterator which may be used to perform iterative queries.
|
||||
For the information about predicates which may be passed to this method see query().
|
||||
|
||||
This method returns the iterator which may be used to perform iterative queries. For the information
|
||||
about the predicates which may be passed to this method see query().
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ;
|
||||
@@ -808,12 +840,29 @@ public:
|
||||
if ( has_enough_nearest_values() )
|
||||
break;
|
||||
}
|
||||
|
||||
// C++11 (auto)
|
||||
for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
}
|
||||
|
||||
// C++14 (generic lambda expression)
|
||||
std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){
|
||||
// do something with value
|
||||
});
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
If predicates copy throws.
|
||||
If allocation throws.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\param predicates Predicates.
|
||||
|
||||
\return The iterator pointing at the begin of the query range.
|
||||
@@ -825,10 +874,10 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the query iterator pointing at the end of the query range.
|
||||
\brief Returns a query iterator pointing at the end of the query range.
|
||||
|
||||
This method returns an iterator which may be used to check if the query has ended.
|
||||
|
||||
This method returns the iterator which may be used to check if the query has ended.
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ;
|
||||
@@ -838,10 +887,27 @@ public:
|
||||
if ( has_enough_nearest_values() )
|
||||
break;
|
||||
}
|
||||
|
||||
// C++11 (auto)
|
||||
for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
}
|
||||
|
||||
// C++14 (generic lambda expression)
|
||||
std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){
|
||||
// do something with value
|
||||
});
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
Nothing
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\return The iterator pointing at the end of the query range.
|
||||
*/
|
||||
@@ -854,10 +920,10 @@ public:
|
||||
private:
|
||||
#endif
|
||||
/*!
|
||||
\brief Returns the query iterator pointing at the begin of the query range.
|
||||
\brief Returns a query iterator pointing at the begin of the query range.
|
||||
|
||||
This method returns the iterator which may be used to perform iterative queries. For the information
|
||||
about the predicates which may be passed to this method see query().
|
||||
This method returns an iterator which may be used to perform iterative queries.
|
||||
For the information about predicates which may be passed to this method see query().
|
||||
|
||||
The type of the returned iterator depends on the type of passed Predicates but the iterator of this type
|
||||
may be assigned to the variable of const_query_iterator type. If you'd like to use the type of the iterator
|
||||
@@ -867,16 +933,24 @@ private:
|
||||
\par Example
|
||||
\verbatim
|
||||
// Store the result in the container using std::copy() - it requires both iterators of the same type
|
||||
std::copy(tree.qbegin(bgi::intersects(box)), tree.qend(bgi::intersects(box)), std::back_inserter(result));
|
||||
std::copy(tree.qbegin_(bgi::intersects(box)), tree.qend_(bgi::intersects(box)), std::back_inserter(result));
|
||||
|
||||
// Store the result in the container using std::copy() and type-erased iterators
|
||||
Rtree::const_query_iterator first = tree.qbegin(bgi::intersects(box));
|
||||
Rtree::const_query_iterator last = tree.qend();
|
||||
Rtree::const_query_iterator first = tree.qbegin_(bgi::intersects(box));
|
||||
Rtree::const_query_iterator last = tree.qend_();
|
||||
std::copy(first, last, std::back_inserter(result));
|
||||
|
||||
// Boost.Typeof
|
||||
typedef BOOST_TYPEOF(tree.qbegin(bgi::nearest(pt, 10000))) Iter;
|
||||
for ( Iter it = tree.qbegin(bgi::nearest(pt, 10000)) ; it != tree.qend() ; ++it )
|
||||
for ( Iter it = tree.qbegin_(bgi::nearest(pt, 10000)) ; it != tree.qend_() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
if ( has_enough_nearest_values() )
|
||||
break;
|
||||
}
|
||||
|
||||
// C++11 (auto)
|
||||
for ( auto it = tree.qbegin_(bgi::nearest(pt, 10000)) ; it != tree.qend_() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
if ( has_enough_nearest_values() )
|
||||
@@ -884,10 +958,16 @@ private:
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
If predicates copy throws.
|
||||
If allocation throws.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\param predicates Predicates.
|
||||
|
||||
\return The iterator pointing at the begin of the query range.
|
||||
@@ -937,12 +1017,18 @@ private:
|
||||
\par Example
|
||||
\verbatim
|
||||
// Store the result in the container using std::copy() - it requires both iterators of the same type
|
||||
std::copy(tree.qbegin(bgi::intersects(box)), tree.qend(bgi::intersects(box)), std::back_inserter(result));
|
||||
std::copy(tree.qbegin_(bgi::intersects(box)), tree.qend_(bgi::intersects(box)), std::back_inserter(result));
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
If predicates copy throws.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\param predicates Predicates.
|
||||
|
||||
\return The iterator pointing at the end of the query range.
|
||||
@@ -989,13 +1075,21 @@ private:
|
||||
\par Example
|
||||
\verbatim
|
||||
// Store the result in the container using std::copy() and type-erased iterators
|
||||
Rtree::const_query_iterator first = tree.qbegin(bgi::intersects(box));
|
||||
Rtree::const_query_iterator last = tree.qend();
|
||||
Rtree::const_query_iterator first = tree.qbegin_(bgi::intersects(box));
|
||||
Rtree::const_query_iterator last = tree.qend_();
|
||||
std::copy(first, last, std::back_inserter(result));
|
||||
|
||||
// Boost.Typeof
|
||||
typedef BOOST_TYPEOF(tree.qbegin(bgi::nearest(pt, 10000))) Iter;
|
||||
for ( Iter it = tree.qbegin(bgi::nearest(pt, 10000)) ; it != tree.qend() ; ++it )
|
||||
for ( Iter it = tree.qbegin_(bgi::nearest(pt, 10000)) ; it != tree.qend_() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
if ( has_enough_nearest_values() )
|
||||
break;
|
||||
}
|
||||
|
||||
// C++11 (auto)
|
||||
for ( auto it = tree.qbegin_(bgi::nearest(pt, 10000)) ; it != tree.qend_() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
if ( has_enough_nearest_values() )
|
||||
@@ -1003,8 +1097,14 @@ private:
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
Nothing
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\return The iterator pointing at the end of the query range.
|
||||
*/
|
||||
@@ -1016,6 +1116,88 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
/*!
|
||||
\brief Returns the iterator pointing at the begin of the rtree values range.
|
||||
|
||||
This method returns the iterator which may be used to iterate over all values
|
||||
stored in the rtree.
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
// Copy all values into the vector
|
||||
std::copy(tree.begin(), tree.end(), std::back_inserter(vec));
|
||||
|
||||
for ( Rtree::const_iterator it = tree.begin() ; it != tree.end() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
}
|
||||
|
||||
// C++11 (auto)
|
||||
for ( auto it = tree.begin() ; it != tree.end() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
}
|
||||
|
||||
// C++14 (generic lambda expression)
|
||||
std::for_each(tree.begin(), tree.end(), [](auto const& val){
|
||||
// do something with value
|
||||
})
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
If allocation throws.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\return The iterator pointing at the begin of the range.
|
||||
*/
|
||||
const_iterator begin() const
|
||||
{
|
||||
if ( !m_members.root )
|
||||
return const_iterator();
|
||||
|
||||
return const_iterator(m_members.root);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the iterator pointing at the end of the rtree values range.
|
||||
|
||||
This method returns the iterator which may be compared with the iterator returned by begin()
|
||||
in order to check if the iteration has ended.
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
for ( Rtree::const_iterator it = tree.begin() ; it != tree.end() ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
}
|
||||
|
||||
// C++11 (lambda expression)
|
||||
std::for_each(tree.begin(), tree.end(), [](value_type const& val){
|
||||
// do something with value
|
||||
})
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
Nothing.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\return The iterator pointing at the end of the range.
|
||||
*/
|
||||
const_iterator end() const
|
||||
{
|
||||
return const_iterator();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the number of stored values.
|
||||
|
||||
@@ -1763,6 +1945,10 @@ bgi::query(tree, bgi::intersects(poly) && !bgi::within(box), std::back_inserter(
|
||||
bgi::query(tree, bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result));
|
||||
// return 5 elements nearest to pt and elements are intersecting box
|
||||
bgi::query(tree, bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
|
||||
|
||||
// For each found value do_something (it is a type of function object)
|
||||
tree.query(bgi::intersects(box),
|
||||
boost::make_function_output_iterator(do_something()));
|
||||
\endverbatim
|
||||
|
||||
\par Throws
|
||||
@@ -1797,20 +1983,19 @@ about the predicates which may be passed to this method see query().
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
|
||||
for ( Rtree::const_query_iterator it = qbegin(tree, bgi::nearest(pt, 10000)) ;
|
||||
it != qend(tree) ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
if ( has_enough_nearest_values() )
|
||||
break;
|
||||
}
|
||||
std::for_each(bgi::qbegin(tree, bgi::nearest(pt, 3)), bgi::qend(tree), do_something());
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
If predicates copy throws.
|
||||
If allocation throws.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\ingroup rtree_functions
|
||||
|
||||
\param tree The rtree.
|
||||
@@ -1834,19 +2019,18 @@ This method returns the iterator which may be used to check if the query has end
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
|
||||
for ( Rtree::const_query_iterator it = qbegin(tree, bgi::nearest(pt, 10000)) ;
|
||||
it != qend(tree) ; ++it )
|
||||
{
|
||||
// do something with value
|
||||
if ( has_enough_nearest_values() )
|
||||
break;
|
||||
}
|
||||
std::for_each(bgi::qbegin(tree, bgi::nearest(pt, 3)), bgi::qend(tree), do_something());
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
Nothing
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\ingroup rtree_functions
|
||||
|
||||
\return The iterator pointing at the end of the query range.
|
||||
@@ -1858,6 +2042,72 @@ qend(rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator> const& tree)
|
||||
return tree.qend();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the iterator pointing at the begin of the rtree values range.
|
||||
|
||||
This method returns the iterator which may be used to iterate over all values
|
||||
stored in the rtree.
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
std::for_each(bgi::begin(tree), bgi::end(tree), do_something());
|
||||
// the same as
|
||||
std::for_each(boost::begin(tree), boost::end(tree), do_something());
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
If allocation throws.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\ingroup rtree_functions
|
||||
|
||||
\return The iterator pointing at the begin of the range.
|
||||
*/
|
||||
template <typename Value, typename Parameters, typename IndexableGetter, typename EqualTo, typename Allocator> inline
|
||||
typename rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator>::const_iterator
|
||||
begin(rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator> const& tree)
|
||||
{
|
||||
return tree.begin();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the iterator pointing at the end of the rtree values range.
|
||||
|
||||
This method returns the iterator which may be compared with the iterator returned by begin()
|
||||
in order to check if the iteration has ended.
|
||||
|
||||
\par Example
|
||||
\verbatim
|
||||
std::for_each(bgi::begin(tree), bgi::end(tree), do_something());
|
||||
// the same as
|
||||
std::for_each(boost::begin(tree), boost::end(tree), do_something());
|
||||
\endverbatim
|
||||
|
||||
\par Iterator category
|
||||
ForwardIterator
|
||||
|
||||
\par Throws
|
||||
Nothing.
|
||||
|
||||
\warning
|
||||
The modification of the rtree may invalidate the iterators.
|
||||
|
||||
\ingroup rtree_functions
|
||||
|
||||
\return The iterator pointing at the end of the range.
|
||||
*/
|
||||
template <typename Value, typename Parameters, typename IndexableGetter, typename EqualTo, typename Allocator> inline
|
||||
typename rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator>::const_iterator
|
||||
end(rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator> const& tree)
|
||||
{
|
||||
return tree.end();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Remove all values from the index.
|
||||
|
||||
@@ -1944,6 +2194,23 @@ inline void swap(rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator> &
|
||||
|
||||
}}} // namespace boost::geometry::index
|
||||
|
||||
// Boost.Range adaptation
|
||||
namespace boost {
|
||||
|
||||
template <typename Value, typename Parameters, typename IndexableGetter, typename EqualTo, typename Allocator>
|
||||
struct range_mutable_iterator
|
||||
<
|
||||
boost::geometry::index::rtree<Value, Parameters, IndexableGetter, EqualTo, Allocator>
|
||||
>
|
||||
{
|
||||
typedef typename boost::geometry::index::rtree
|
||||
<
|
||||
Value, Parameters, IndexableGetter, EqualTo, Allocator
|
||||
>::const_iterator type;
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
// TODO: don't include the implementation at the end of the file
|
||||
#include <boost/geometry/algorithms/detail/comparable_distance/implementation.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2009-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -37,9 +37,6 @@
|
||||
#include <boost/geometry/strategies/transform/map_transformer.hpp>
|
||||
#include <boost/geometry/views/segment_view.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/io/svg/write_svg.hpp>
|
||||
|
||||
// Helper geometries (all points are transformed to integer-points)
|
||||
|
||||
@@ -215,12 +215,9 @@ private:
|
||||
--m_outer_it;
|
||||
}
|
||||
while ( empty(m_outer_it) );
|
||||
m_inner_it = --AccessInnerEnd::apply(*m_outer_it);
|
||||
}
|
||||
else
|
||||
{
|
||||
--m_inner_it;
|
||||
}
|
||||
m_inner_it = AccessInnerEnd::apply(*m_outer_it);
|
||||
}
|
||||
--m_inner_it;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2013.
|
||||
// Modifications copyright (c) 2013, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013, 2015.
|
||||
// Modifications copyright (c) 2013-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -17,65 +17,8 @@
|
||||
#ifndef BOOST_GEOMETRY_MULTI_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/geometry_id.hpp>
|
||||
#include <boost/geometry/core/interior_rings.hpp>
|
||||
#include <boost/geometry/core/is_areal.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>
|
||||
#include <boost/geometry/core/topological_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/append.hpp>
|
||||
#include <boost/geometry/algorithms/area.hpp>
|
||||
#include <boost/geometry/algorithms/centroid.hpp>
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/algorithms/disjoint.hpp>
|
||||
#include <boost/geometry/algorithms/distance.hpp>
|
||||
#include <boost/geometry/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/algorithms/equals.hpp>
|
||||
#include <boost/geometry/algorithms/for_each.hpp>
|
||||
#include <boost/geometry/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/algorithms/length.hpp>
|
||||
#include <boost/geometry/algorithms/num_geometries.hpp>
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/algorithms/perimeter.hpp>
|
||||
#include <boost/geometry/algorithms/remove_spikes.hpp>
|
||||
#include <boost/geometry/algorithms/reverse.hpp>
|
||||
#include <boost/geometry/algorithms/simplify.hpp>
|
||||
#include <boost/geometry/algorithms/transform.hpp>
|
||||
#include <boost/geometry/algorithms/unique.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/point_on_border.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/for_each_range.hpp>
|
||||
#include <boost/geometry/algorithms/detail/multi_modify_with_predicate.hpp>
|
||||
#include <boost/geometry/algorithms/detail/multi_sum.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_ring.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/select_rings.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/range_type.hpp>
|
||||
#include <boost/geometry/strategies/cartesian/centroid_average.hpp>
|
||||
|
||||
#include <boost/geometry/io/dsv/write.hpp>
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
|
||||
// keep this file for now, for backward compatibility
|
||||
// functionality-wise, make it equivalent to boost/geometry/geometry.hpp
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_HPP
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/type_traits/is_fundamental.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
|
||||
#include <boost/geometry/util/select_most_precise.hpp>
|
||||
|
||||
@@ -295,6 +296,63 @@ struct square_root<T, true>
|
||||
};
|
||||
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
bool IsFundemantal = boost::is_fundamental<T>::value /* false */
|
||||
>
|
||||
struct modulo
|
||||
{
|
||||
typedef T return_type;
|
||||
|
||||
static inline T apply(T const& value1, T const& value2)
|
||||
{
|
||||
// for non-fundamental number types assume that a free
|
||||
// function mod() is defined either:
|
||||
// 1) at T's scope, or
|
||||
// 2) at global scope
|
||||
return mod(value1, value2);
|
||||
}
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Fundamental,
|
||||
bool IsIntegral = boost::is_integral<Fundamental>::value
|
||||
>
|
||||
struct modulo_for_fundamental
|
||||
{
|
||||
typedef Fundamental return_type;
|
||||
|
||||
static inline Fundamental apply(Fundamental const& value1,
|
||||
Fundamental const& value2)
|
||||
{
|
||||
return value1 % value2;
|
||||
}
|
||||
};
|
||||
|
||||
// specialization for floating-point numbers
|
||||
template <typename Fundamental>
|
||||
struct modulo_for_fundamental<Fundamental, false>
|
||||
{
|
||||
typedef Fundamental return_type;
|
||||
|
||||
static inline Fundamental apply(Fundamental const& value1,
|
||||
Fundamental const& value2)
|
||||
{
|
||||
return std::fmod(value1, value2);
|
||||
}
|
||||
};
|
||||
|
||||
// specialization for fundamental number type
|
||||
template <typename Fundamental>
|
||||
struct modulo<Fundamental, true>
|
||||
: modulo_for_fundamental<Fundamental>
|
||||
{};
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\brief Short construct to enable partial specialization for PI, currently not possible in Math.
|
||||
*/
|
||||
@@ -454,6 +512,24 @@ sqrt(T const& value)
|
||||
>::apply(value);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Short utility to return the modulo of two values
|
||||
\ingroup utility
|
||||
\param value1 First value
|
||||
\param value2 Second value
|
||||
\return The result of the modulo operation on the (ordered) pair
|
||||
(value1, value2)
|
||||
*/
|
||||
template <typename T>
|
||||
inline typename detail::modulo<T>::return_type
|
||||
mod(T const& value1, T const& value2)
|
||||
{
|
||||
return detail::modulo
|
||||
<
|
||||
T, boost::is_fundamental<T>::value
|
||||
>::apply(value1, value2);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Short utility to workaround gcc/clang problem that abs is converting to integer
|
||||
and that older versions of MSVC does not support abs of long long...
|
||||
|
||||
@@ -733,6 +733,38 @@ void copy_alt(First first, Last last, Out out)
|
||||
*out = *first;
|
||||
}
|
||||
|
||||
// test query iterators
|
||||
template <typename QItF, typename QItL>
|
||||
void check_fwd_iterators(QItF first, QItL last)
|
||||
{
|
||||
QItF vinit = QItF();
|
||||
BOOST_CHECK(vinit == last);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
|
||||
QItL vinit2 = QItL();
|
||||
BOOST_CHECK(vinit2 == last);
|
||||
#endif
|
||||
|
||||
QItF def;
|
||||
BOOST_CHECK(def == last);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
|
||||
QItL def2;
|
||||
BOOST_CHECK(def2 == last);
|
||||
#endif
|
||||
|
||||
QItF it = first;
|
||||
for ( ; it != last && first != last ; ++it, ++first)
|
||||
{
|
||||
BOOST_CHECK(it == first);
|
||||
|
||||
bg::index::equal_to<typename std::iterator_traits<QItF>::value_type> eq;
|
||||
BOOST_CHECK(eq(*it, *first));
|
||||
}
|
||||
BOOST_CHECK(it == last);
|
||||
BOOST_CHECK(first == last);
|
||||
}
|
||||
|
||||
// spatial query
|
||||
|
||||
template <typename Rtree, typename Value, typename Predicates>
|
||||
@@ -766,6 +798,8 @@ void spatial_query(Rtree & rtree, Predicates const& pred, std::vector<Value> con
|
||||
|
||||
exactly_the_same_outputs(rtree, output3, output4);
|
||||
|
||||
check_fwd_iterators(rtree.qbegin(pred), rtree.qend());
|
||||
|
||||
#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
|
||||
{
|
||||
std::vector<Value> output4;
|
||||
@@ -774,6 +808,9 @@ void spatial_query(Rtree & rtree, Predicates const& pred, std::vector<Value> con
|
||||
output4.clear();
|
||||
copy_alt(rtree.qbegin_(pred), rtree.qend_(), std::back_inserter(output4));
|
||||
compare_outputs(rtree, output4, expected_output);
|
||||
|
||||
check_fwd_iterators(rtree.qbegin_(pred), rtree.qend_(pred));
|
||||
check_fwd_iterators(rtree.qbegin_(pred), rtree.qend_());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1217,6 +1254,8 @@ inline void nearest_query_k(Rtree const& rtree, std::vector<Value> const& input,
|
||||
compare_nearest_outputs(rtree, output3, expected_output, pt, greatest_distance);
|
||||
check_sorted_by_distance(rtree, output3, pt);
|
||||
|
||||
check_fwd_iterators(rtree.qbegin(bgi::nearest(pt, k)), rtree.qend());
|
||||
|
||||
#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
|
||||
{
|
||||
std::vector<Value> output4;
|
||||
@@ -1225,6 +1264,9 @@ inline void nearest_query_k(Rtree const& rtree, std::vector<Value> const& input,
|
||||
output4.clear();
|
||||
copy_alt(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_(), std::back_inserter(output4));
|
||||
exactly_the_same_outputs(rtree, output4, output3);
|
||||
|
||||
check_fwd_iterators(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_(bgi::nearest(pt, k)));
|
||||
check_fwd_iterators(rtree.qbegin_(bgi::nearest(pt, k)), rtree.qend_());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1580,6 +1622,31 @@ void clear(Rtree const& tree, std::vector<Value> const& input, Box const& qbox)
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Rtree, typename Value>
|
||||
void range(Rtree & tree, std::vector<Value> const& input)
|
||||
{
|
||||
check_fwd_iterators(tree.begin(), tree.end());
|
||||
|
||||
size_t count = std::distance(tree.begin(), tree.end());
|
||||
BOOST_CHECK(count == tree.size());
|
||||
BOOST_CHECK(count == input.size());
|
||||
|
||||
count = std::distance(boost::begin(tree), boost::end(tree));
|
||||
BOOST_CHECK(count == tree.size());
|
||||
|
||||
count = boost::size(tree);
|
||||
BOOST_CHECK(count == tree.size());
|
||||
|
||||
count = 0;
|
||||
BOOST_FOREACH(Value const& v, tree)
|
||||
{
|
||||
boost::ignore_unused(v);
|
||||
++count;
|
||||
}
|
||||
BOOST_CHECK(count == tree.size());
|
||||
|
||||
}
|
||||
|
||||
// rtree queries
|
||||
|
||||
template <typename Rtree, typename Value, typename Box>
|
||||
@@ -1806,12 +1873,36 @@ void test_rtree_bounds(Parameters const& parameters, Allocator const& allocator)
|
||||
BOOST_CHECK(bg::equals(t.bounds(), b));
|
||||
}
|
||||
|
||||
// test rtree iterator
|
||||
|
||||
template <typename Indexable, typename Parameters, typename Allocator>
|
||||
void test_rtree_range(Parameters const& parameters, Allocator const& allocator)
|
||||
{
|
||||
typedef std::pair<Indexable, int> Value;
|
||||
|
||||
typedef bgi::indexable<Value> I;
|
||||
typedef bgi::equal_to<Value> E;
|
||||
typedef typename Allocator::template rebind<Value>::other A;
|
||||
typedef bgi::rtree<Value, Parameters, I, E, A> Tree;
|
||||
typedef typename Tree::bounds_type B;
|
||||
|
||||
Tree t(parameters, I(), E(), allocator);
|
||||
std::vector<Value> input;
|
||||
B qbox;
|
||||
|
||||
generate::rtree(t, input, qbox);
|
||||
|
||||
basictest::range(t, input);
|
||||
basictest::range((Tree const&)t, input);
|
||||
}
|
||||
|
||||
template <typename Indexable, typename Parameters, typename Allocator>
|
||||
void test_rtree_additional(Parameters const& parameters, Allocator const& allocator)
|
||||
{
|
||||
test_count_rtree_values<Indexable>(parameters, allocator);
|
||||
test_rtree_count<Indexable>(parameters, allocator);
|
||||
test_rtree_bounds<Indexable>(parameters, allocator);
|
||||
test_rtree_range<Indexable>(parameters, allocator);
|
||||
}
|
||||
|
||||
// run all tests for one Algorithm for some number of rtrees
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
@@ -24,25 +24,20 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/make.hpp>
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
#include <boost/geometry/algorithms/append.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/geometries/register/linestring.hpp>
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
#include <test_common/test_point.hpp>
|
||||
#include <test_geometries/wrapped_boost_array.hpp>
|
||||
|
||||
// includes for multi-geometries
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
#include <boost/geometry/multi/algorithms/append.hpp>
|
||||
#include <boost/geometry/multi/algorithms/clear.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
|
||||
BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2014-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include <test_buffer.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
std::string read_from_file(std::string const& filename)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include <test_buffer.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
|
||||
static std::string const simplex = "MULTILINESTRING((0 0,4 5),(5 4,10 0))";
|
||||
static std::string const two_bends = "MULTILINESTRING((0 0,4 5,7 4,10 6),(1 5,5 9,8 6))";
|
||||
static std::string const turn_inside = "MULTILINESTRING((0 0,4 5,7 4,10 6),(1 5,5 9,8 6),(0 4,-2 6))";
|
||||
@@ -31,6 +29,7 @@ static std::string const mikado2 = "MULTILINESTRING((-6.117647058823528993798390
|
||||
static std::string const mikado3 = "MULTILINESTRING((1 18,4.0559006211180124168436122999992 7.8136645962732922399140989000443),(6.7243816254416959310447055031545 -1.0812720848056533995418249105569,7 -2,7 -8,14 3.6666666666666669627261399000417),(15.297872340425531234586742357351 5.8297872340425538340014099958353,16 7,15.214285714285713524418497399893 5.8445378151260509724806979647838),(13.685863874345550073030608473346 3.5968586387434555717845796607435,-1 -18,-3.7900797165633304253162805252941 -11.117803365810452476125647081062),(-11.540540540540540348501963308081 8,-16 19,8 14),(1 -10,6.5999999999999996447286321199499 -1.200000000000000177635683940025),(11.5 6.5,15 12),(19 10,11.564231738035264385189293534495 6.4886649874055422060337150469422),(-13.438785504407443127661281323526 -5.3183153770812925387190261972137,-17 -7,-12.970074812967581578959652688354 -7.7556109725685784539450651209336),(-2.3532338308457703135445626685396 -9.7462686567164187323442092747428,-1 -10,12.285714285714286475581502600107 3.2857142857142864755815026001073),(14.90000000000000035527136788005 5.9000000000000003552713678800501,15 6,14.893004115226338157640384451952 5.9012345679012341292946075554937),(11.987804878048780921062643756159 3.2195121951219514144781896902714,-11 -18),(-12.210826210826210669324609625619 -11.703703703703702387883822666481,-15 -15,-11.463576158940396609864365018439 -15.589403973509934786534358863719),(-8.9189189189189193029960733838379 -16.013513513513512265262761502527,-3 -17,-7.0297239915074314353660156484693 -14.210191082802548834251865628175),(-12.450511945392491952588898129761 -10.457337883959045399251408525743,-16 -8,-12.923076923076923350208744523115 -8),(-0.52380952380952372493538859998807 -8,18 -8),(2 -19,-2.2961165048543685784920853620861 -9.6917475728155331182733789319173),(6.0463576158940393057150686217938 -1.7284768211920527036795647291001,7 -3,6.4482758620689653028534848999698 -1.3448275862068967967388744000345),(-1.3333333333333339254522798000835 8,4 16,2.9090909090909091716525836091023 8),(0.64705882352941168633719826175366 -6.8823529411764710062016092706472,-3 -16))";
|
||||
static std::string const mikado4 = "MULTILINESTRING((-15 2,-15 -17,-6 11,-1.9358288770053475591481628725887 10.572192513368984023713892383967),(2.1545064377682408007785852532834 10.14163090128755406738036981551,6.87603305785123986026974307606 9.6446280991735537924114396446384),(8.4810810810810810522752944962122 9.475675675675674369813350494951,13 9),(-15 0,-8 9,-2.9850746268656713766631582984701 4.4865671641791049495395782287233),(-1.8235294117647056211239942058455 3.4411764705882355031008046353236,-1.1428571428571423496123315999284 2.8285714285714291804652020800859),(1.2307692307692308375521861307789 0.69230769230769229061195346730528,1.2857142857142858094476878250134 0.64285714285714290472384391250671,2 0,1.9459459459459460539676456392044 0.51351351351351348650808859019889),(1.908127208480565384363103476062 0.87279151943462895957281943992712,1.9078014184397162900097555393586 0.87588652482269502286271745106205),(1.4685990338164249813246442499803 5.0483091787439615671928550000302,0.63551401869158885560295857430901 12.962616822429906093816498469096,0 19,2.9565217391304345895264304999728 8.6521739130434784925682834000327),(0 19,3.4942528735632185643567027000245 6.770114942528735468840750399977),(4.75 2.375,5.2427184466019420838733822165523 0.65048543689320226235395239200443),(5.5384615384615383248956277384423 -0.38461538461538458122390693461057,5.7358490566037731994697423942853 -1.0754716981132084185901476303115),(5.9777777777777778567269706400111 -1.9222222222222207221875578397885,6.867052023121386739035187929403 -5.0346820809248553629799971531611,10 -16,-14 -19,-12 -12),(0 10,1.9476439790575916788384347455576 5.4554973821989527493769855936989),(-4 1,-4.2790697674418600726653494348284 0.16279069767441856075862460784265))";
|
||||
|
||||
static std::string const mysql_15_04_10 = "MULTILINESTRING((-58 19, 61 88),(1.922421e+307 1.520384e+308, 15 42, 89 -93,-89 -22),(-63 -5, -262141 -536870908, -3 87, 77 -69))";
|
||||
|
||||
template <bool Clockwise, typename P>
|
||||
void test_all()
|
||||
@@ -99,6 +98,10 @@ void test_all()
|
||||
test_one<multi_linestring_type, polygon>("mikado4_large", mikado4, join_round32, end_round32, 11212832197.267, 59772.0);
|
||||
test_one<multi_linestring_type, polygon>("mikado4_small", mikado4, join_round32, end_round32, 2103.686, 10.0);
|
||||
test_one<multi_linestring_type, polygon>("mikado4_small", mikado4, join_round32, end_flat, 1930.785, 10.0);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_BUFFER_INCLUDE_FAILING_TESTS
|
||||
test_one<multi_linestring_type, polygon>("mysql_15_04_10", mysql_15_04_10, join_round32, end_round32, 29151950703.779/*something big*/, 0x98);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include <test_buffer.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
|
||||
static std::string const simplex = "MULTIPOINT((5 5),(7 7))";
|
||||
static std::string const three = "MULTIPOINT((5 8),(9 8),(7 11))";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include <test_buffer.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
|
||||
|
||||
static std::string const simplex
|
||||
= "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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,14 +11,13 @@
|
||||
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/register/point.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/partition.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#if defined(TEST_WITH_SVG)
|
||||
# include <boost/geometry/io/svg/svg_mapper.hpp>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -30,12 +30,6 @@
|
||||
#include <test_geometries/custom_segment.hpp>
|
||||
#include <test_geometries/wrapped_boost_array.hpp>
|
||||
|
||||
// includes for multi-geometries
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
@@ -25,15 +25,12 @@
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/write.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/write.hpp>
|
||||
|
||||
#include <boost/geometry/io/dsv/write.hpp>
|
||||
#include <boost/geometry/multi/io/dsv/write.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/algorithms/distance.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,14 +8,11 @@
|
||||
|
||||
#include <algorithms/test_area.hpp>
|
||||
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -17,18 +17,12 @@
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/algorithms/centroid.hpp>
|
||||
#include <boost/geometry/multi/strategies/cartesian/centroid_average.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/strategies/cartesian/centroid_average.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
|
||||
// #define REPORT_RESULTS
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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,17 +9,11 @@
|
||||
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/clear.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
|
||||
@@ -1,22 +1,12 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
|
||||
#include <algorithms/test_convert.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/convert.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
void test_mixed_point_types()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -26,22 +26,16 @@
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
#include <boost/geometry/views/detail/range_type.hpp>
|
||||
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
#include <boost/geometry/algorithms/detail/for_each_range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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,10 +11,7 @@
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
@@ -22,7 +19,7 @@
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/point.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -15,14 +15,6 @@
|
||||
|
||||
#include <algorithms/test_envelope.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/multi/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/adapted/c_array.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,10 +8,8 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/for_each.hpp>
|
||||
#include <boost/geometry/multi/algorithms/for_each.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
@@ -20,9 +18,9 @@
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <algorithms/test_for_each.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,15 +8,8 @@
|
||||
|
||||
#include <algorithms/test_length.hpp>
|
||||
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
|
||||
template <typename P>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,16 +8,11 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_geometries.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_geometries.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename Geometry>
|
||||
void test_geometry(std::string const& wkt, int expected)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,16 +8,11 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_interior_rings.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename Geometry>
|
||||
void test_geometry(std::string const& wkt, int expected)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,16 +8,14 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,14 +8,12 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/perimeter.hpp>
|
||||
#include <boost/geometry/multi/algorithms/perimeter.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <algorithms/test_perimeter.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,18 +8,12 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/reverse.hpp>
|
||||
#include <boost/geometry/multi/algorithms/reverse.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <algorithms/test_reverse.hpp>
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/simplify.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
@@ -20,9 +15,9 @@
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <algorithms/test_simplify.hpp>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -22,14 +22,7 @@
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/transform.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
// This test is a little different from transform.cpp test.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,18 +8,10 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/unique.hpp>
|
||||
#include <boost/geometry/multi/algorithms/unique.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <algorithms/test_unique.hpp>
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2015 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
|
||||
@@ -15,12 +15,9 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
template <std::size_t D, typename T = double>
|
||||
struct box_dD
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -17,9 +17,8 @@
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
|
||||
#include <test_common/test_point.hpp>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// 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,11 +12,11 @@
|
||||
#define GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
//#include <boost/geometry/multi/io/svg/write_svg.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
//#include <boost/geometry/io/svg/write_svg.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// 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,27 +15,19 @@
|
||||
#define BOOST_GEOMETRY_TEST_MULTI
|
||||
#include <algorithms/overlay/traverse.cpp>
|
||||
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/geometry_id.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/views/detail/range_type.hpp>
|
||||
|
||||
|
||||
#include "multi_overlay_cases.hpp"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/write.hpp>
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
#if defined(TEST_WITH_SVG)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2015 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -43,11 +43,7 @@
|
||||
#include <algorithms/overlay/overlay_cases.hpp>
|
||||
|
||||
#if defined(BOOST_GEOMETRY_UNIT_TEST_MULTI)
|
||||
# include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
# include <boost/geometry/multi/algorithms/within.hpp>
|
||||
# include <boost/geometry/multi/algorithms/detail/extreme_points.hpp>
|
||||
# include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
# include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
# include <boost/geometry/algorithms/detail/extreme_points.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -19,25 +19,13 @@
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/write.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/write.hpp>
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/io/dsv/write.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point.hpp>
|
||||
#include <boost/geometry/geometries/segment.hpp>
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/disjoint.hpp>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -12,17 +12,6 @@
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/point_on_border.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -22,8 +22,7 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/disjoint.hpp>
|
||||
#include <boost/geometry/multi/algorithms/disjoint.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
|
||||
template <typename G1, typename G2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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,16 +11,13 @@
|
||||
#include <boost/geometry/algorithms/covered_by.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include "test_covered_by.hpp"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,15 +8,10 @@
|
||||
|
||||
#include "test_equals.hpp"
|
||||
|
||||
#include <boost/geometry/multi/algorithms/area.hpp>
|
||||
#include <boost/geometry/multi/algorithms/equals.hpp>
|
||||
#include <boost/geometry/algorithms/area.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
|
||||
|
||||
template <typename P>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,24 +8,9 @@
|
||||
|
||||
#include "test_touches.hpp"
|
||||
|
||||
#include <boost/geometry/multi/algorithms/area.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_geometries.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/topological_dimension.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/area.hpp>
|
||||
#include <boost/geometry/algorithms/num_geometries.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
|
||||
template <typename P>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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
|
||||
@@ -22,13 +22,10 @@
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
void check_geometry(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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,27 +14,20 @@
|
||||
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/geometry_id.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/algorithms/intersects.hpp>
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
#include <boost/geometry/multi/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/point_on_border.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
void test_geometry(std::string const& wkt1,
|
||||
std::string const& wkt2, bool expected)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -8,19 +8,14 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include "test_within.hpp"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
@@ -38,10 +39,6 @@
|
||||
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/covered_by.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
void check_geometry(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -17,10 +17,9 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename P>
|
||||
void test_a_a()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -17,9 +17,8 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename P>
|
||||
void test_l_a()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -17,8 +17,7 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
|
||||
template <typename P>
|
||||
void test_l_l()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 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, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -17,10 +17,9 @@
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
template <typename P>
|
||||
void test_p_p()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2015 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
|
||||
@@ -36,14 +36,7 @@
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
|
||||
#if defined(BOOST_GEOMETRY_UNIT_TEST_MULTI)
|
||||
|
||||
# include <boost/geometry/multi/algorithms/remove_spikes.hpp>
|
||||
|
||||
# include <boost/geometry/multi/algorithms/area.hpp>
|
||||
# include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
# include <boost/geometry/multi/algorithms/perimeter.hpp>
|
||||
# include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
# include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
# include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -23,12 +23,8 @@
|
||||
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/is_valid.hpp>
|
||||
#include <boost/geometry/algorithms/perimeter.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
|
||||
@@ -36,7 +32,6 @@
|
||||
#include <algorithms/test_overlay.hpp>
|
||||
#include <algorithms/overlay/overlay_cases.hpp>
|
||||
#include <algorithms/overlay/multi_overlay_cases.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
#ifdef HAVE_TTMATH
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "test_difference_linear_linear.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/algorithms/difference.hpp>
|
||||
|
||||
typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
|
||||
#include "../test_set_ops_pl_pl.hpp"
|
||||
#include "../test_set_ops_pointlike.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
|
||||
@@ -51,17 +51,19 @@ BOOST_AUTO_TEST_CASE( test_difference_point_point )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("ppdf01",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 1)"),
|
||||
"ppdf01");
|
||||
from_wkt<MP>("MULTIPOINT(1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("ppdf02",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"ppdf02");
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,58 +84,66 @@ BOOST_AUTO_TEST_CASE( test_difference_multipoint_point )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
("mppdf01",
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 1)"),
|
||||
"mppdf01");
|
||||
from_wkt<MP>("MULTIPOINT(1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
("mppdf02",
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppdf02");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
("mppdf03",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 1)"),
|
||||
"mppdf03");
|
||||
from_wkt<MP>("MULTIPOINT(1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
("mppdf04",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppdf04");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppdf05",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 1)"),
|
||||
"mppdf05");
|
||||
from_wkt<MP>("MULTIPOINT(1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppdf06",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppdf06");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppdf07",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppdf07");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
("mppdf08",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppdf08");
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,25 +164,28 @@ BOOST_AUTO_TEST_CASE( test_difference_point_multipoint )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("pmpdf01",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1)"),
|
||||
"pmpdf01");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("pmpdf02",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1)"),
|
||||
"pmpdf02");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("pmpdf03",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"pmpdf03");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,35 +205,40 @@ BOOST_AUTO_TEST_CASE( test_difference_multipoint_multipoint )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
("mpmpdf01",
|
||||
from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,4 4)"),
|
||||
from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2)"),
|
||||
from_wkt<MP>("MULTIPOINT(4 4)"),
|
||||
"mpmpdf01");
|
||||
from_wkt<MP>("MULTIPOINT(4 4)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
("mpmpdf02",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpdf02");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
("mpmpdf03",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
"mpmpdf03");
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
("mpmpdf04",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpdf04");
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
("mpmpdf05",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpdf05");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -27,16 +27,16 @@
|
||||
#include <algorithms/test_overlay.hpp>
|
||||
#include <algorithms/overlay/multi_overlay_cases.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp> // only for testing #77
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp> // only for testing #77
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
template <typename Ring, typename Polygon, typename MultiPolygon>
|
||||
void test_areal()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// 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,7 +11,6 @@
|
||||
#include <boost/geometry.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
|
||||
#include "test_difference.hpp"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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)
|
||||
@@ -30,9 +30,9 @@
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "test_intersection_linear_linear.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/algorithms/intersection.hpp>
|
||||
|
||||
typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
|
||||
#include "../test_set_ops_pl_pl.hpp"
|
||||
#include "../test_set_ops_pointlike.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
|
||||
@@ -51,16 +51,18 @@ BOOST_AUTO_TEST_CASE( test_intersection_point_point )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("ppi01",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"ppi01");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("ppi02",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"ppi02");
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,52 +83,60 @@ BOOST_AUTO_TEST_CASE( test_intersection_multipoint_point )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppi01");
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
("mppi01",
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppi02");
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppi03");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
("mppi02",
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppi04");
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppi03",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppi05");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppi04",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
("mppi05",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
("mppi06",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0)"),
|
||||
"mppi06");
|
||||
from_wkt<MP>("MULTIPOINT(1 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppi07",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppi07");
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
("mppi08",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mppi08");
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -146,40 +156,46 @@ BOOST_AUTO_TEST_CASE( test_intersection_multipoint_multipoint )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
("mpmpi01",
|
||||
from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)"),
|
||||
"mpmpi01");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
("mpmp02",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
"mpmpi02");
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
("mpmpi03",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpi03");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
("mpmpi04",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpi04");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
("mpmpi05",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpi05");
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0)"),
|
||||
("mpmpi06",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,2 0)"),
|
||||
"mpmpi06");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,2 0)")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -20,16 +20,16 @@
|
||||
#include <algorithms/test_overlay.hpp>
|
||||
#include <algorithms/overlay/multi_overlay_cases.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp> // only for testing #77
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp> // only for testing #77
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
template <typename Ring, typename Polygon, typename MultiPolygon>
|
||||
void test_areal()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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 +12,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <boost/geometry/multi/geometries/multi_point.hpp>
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include "../test_set_ops_linear_linear.hpp"
|
||||
#include <from_wkt.hpp>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "test_sym_difference_linear_linear.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/algorithms/sym_difference.hpp>
|
||||
|
||||
typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <boost/geometry/policies/compare.hpp>
|
||||
#include <boost/geometry/algorithms/equals.hpp>
|
||||
#include <boost/geometry/algorithms/reverse.hpp>
|
||||
#include <boost/geometry/multi/algorithms/reverse.hpp>
|
||||
|
||||
#include "test_get_turns_ll_invariance.hpp"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
#ifndef BOOST_GEOMETRY_TEST_SET_OPS_PL_PL_HPP
|
||||
#define BOOST_GEOMETRY_TEST_SET_OPS_PL_PL_HPP
|
||||
#ifndef BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
|
||||
#define BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
@@ -170,6 +170,54 @@ struct set_op<bg::overlay_intersection>
|
||||
};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename bg::tag<Geometry>::type
|
||||
> struct geometry_info
|
||||
{};
|
||||
|
||||
template <typename Point>
|
||||
struct geometry_info<Point, bg::point_tag>
|
||||
{
|
||||
static std::size_t const topological_dimension = 0;
|
||||
|
||||
static inline char const* name() { return "P"; }
|
||||
};
|
||||
|
||||
template <typename MultiPoint>
|
||||
struct geometry_info<MultiPoint, bg::multi_point_tag>
|
||||
{
|
||||
static std::size_t const topological_dimension = 0;
|
||||
|
||||
static inline char const* name() { return "MP"; }
|
||||
};
|
||||
|
||||
template <typename Linestring>
|
||||
struct geometry_info<Linestring, bg::linestring_tag>
|
||||
{
|
||||
static std::size_t const topological_dimension = 1;
|
||||
|
||||
static inline char const* name() { return "L"; }
|
||||
};
|
||||
|
||||
template <typename MultiLinestring>
|
||||
struct geometry_info<MultiLinestring, bg::multi_linestring_tag>
|
||||
{
|
||||
static std::size_t const topological_dimension = 1;
|
||||
|
||||
static inline char const* name() { return "ML"; }
|
||||
};
|
||||
|
||||
template <typename Segment>
|
||||
struct geometry_info<Segment, bg::segment_tag>
|
||||
{
|
||||
static std::size_t const topological_dimension = 1;
|
||||
|
||||
static inline char const* name() { return "S"; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
//==================================================================
|
||||
//==================================================================
|
||||
@@ -188,54 +236,78 @@ template
|
||||
class test_set_op_of_pointlike_geometries
|
||||
{
|
||||
private:
|
||||
template <typename G1, typename G2, typename MP>
|
||||
static inline void base_test(G1 const& geometry1,
|
||||
G2 const& geometry2,
|
||||
MP const& mp_expected,
|
||||
std::string const& case_id)
|
||||
template <bool Enable, typename Dummy = void>
|
||||
struct base_test
|
||||
{
|
||||
MultiPoint mp_output;
|
||||
template <typename G1, typename G2, typename MP>
|
||||
static inline void apply(std::string const& case_id,
|
||||
G1 const& geometry1,
|
||||
G2 const& geometry2,
|
||||
MP const& mp_expected)
|
||||
{
|
||||
MultiPoint mp_output;
|
||||
|
||||
set_op<OverlayType>::apply(geometry1, geometry2, mp_output);
|
||||
set_op<OverlayType>::apply(geometry1, geometry2, mp_output);
|
||||
|
||||
std::string op_name = set_op<OverlayType>::name();
|
||||
std::string op_name = set_op<OverlayType>::name();
|
||||
|
||||
BOOST_CHECK_MESSAGE( equals::apply(mp_expected, mp_output),
|
||||
op_name << " P/P: " << bg::wkt(geometry1)
|
||||
<< " " << bg::wkt(geometry2)
|
||||
<< " -> Expected: " << bg::wkt(mp_expected)
|
||||
<< " computed: " << bg::wkt(mp_output) );
|
||||
BOOST_CHECK_MESSAGE(equals::apply(mp_expected, mp_output),
|
||||
"case ID: " << case_id << ", "
|
||||
<< op_name << " "
|
||||
<< geometry_info<G1>::name() << "/"
|
||||
<< geometry_info<G2>::name() << ": "
|
||||
<< bg::wkt(geometry1)
|
||||
<< " " << bg::wkt(geometry2)
|
||||
<< " -> Expected: " << bg::wkt(mp_expected)
|
||||
<< " computed: " << bg::wkt(mp_output) );
|
||||
|
||||
set_operation_output(op_name, case_id,
|
||||
geometry1, geometry2, mp_output);
|
||||
set_operation_output(op_name, case_id,
|
||||
geometry1, geometry2, mp_output);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_DEBUG
|
||||
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
|
||||
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
|
||||
std::cout << "expected " << op_name << " : "
|
||||
<< bg::wkt(mp_expected) << std::endl;
|
||||
std::cout << op_name << " : " << bg::wkt(mp_output) << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "************************************" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
|
||||
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
|
||||
std::cout << "expected " << op_name << " : "
|
||||
<< bg::wkt(mp_expected) << std::endl;
|
||||
std::cout << op_name << " : " << bg::wkt(mp_output) << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "************************************" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Dummy>
|
||||
struct base_test<false, Dummy>
|
||||
{
|
||||
template <typename G1, typename G2, typename MP>
|
||||
static inline void apply(std::string const&, G1 const&, G2 const&,
|
||||
MP const&)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
static inline void apply(Geometry1 const& geometry1,
|
||||
static inline void apply(std::string const& case_id,
|
||||
Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
MultiPoint const& mp_expected12,
|
||||
MultiPoint const& mp_expected21,
|
||||
std::string const& case_id)
|
||||
MultiPoint const& mp_expected21)
|
||||
{
|
||||
#ifdef BOOST_GEOMETRY_TEST_DEBUG
|
||||
std::cout << "test case: " << case_id << std::endl;
|
||||
#endif
|
||||
|
||||
base_test(geometry1, geometry2, mp_expected12, case_id);
|
||||
base_test(geometry2, geometry1, mp_expected21, case_id);
|
||||
base_test<true>::apply(case_id, geometry1, geometry2, mp_expected12);
|
||||
// try the same set operation with the arguments' order
|
||||
// reversed only if the two geometries are of the same
|
||||
// topological dimension
|
||||
base_test
|
||||
<
|
||||
(geometry_info<Geometry1>::topological_dimension
|
||||
== geometry_info<Geometry2>::topological_dimension)
|
||||
>::apply(case_id, geometry2, geometry1, mp_expected21);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_DEBUG
|
||||
std::cout << std::endl;
|
||||
@@ -243,15 +315,14 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline void apply(Geometry1 const& geometry1,
|
||||
static inline void apply(std::string const& case_id,
|
||||
Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
MultiPoint const& mp_expected,
|
||||
std::string const& case_id)
|
||||
MultiPoint const& mp_expected)
|
||||
{
|
||||
apply(geometry1, geometry2, mp_expected, mp_expected, case_id);
|
||||
apply(case_id, geometry1, geometry2, mp_expected, mp_expected);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_TEST_SET_OPS_PL_PL_HPP
|
||||
#endif // BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -18,15 +18,15 @@
|
||||
#include <algorithms/test_overlay.hpp>
|
||||
#include <algorithms/overlay/multi_overlay_cases.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_polygon.hpp>
|
||||
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
|
||||
template <typename Ring, typename Polygon, typename MultiPolygon>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "test_union_linear_linear.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/linestring.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/geometries/multi_linestring.hpp>
|
||||
#include <boost/geometry/algorithms/union.hpp>
|
||||
|
||||
typedef bg::model::point<double,2,bg::cs::cartesian> point_type;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
|
||||
#include "../test_set_ops_pl_pl.hpp"
|
||||
#include "../test_set_ops_pointlike.hpp"
|
||||
|
||||
#include <boost/geometry/geometries/multi_point.hpp>
|
||||
|
||||
@@ -51,16 +51,18 @@ BOOST_AUTO_TEST_CASE( test_union_point_point )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("ppu01",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
|
||||
"ppu01");
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<P>("POINT(0 0)"),
|
||||
("ppu02",
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"ppu02");
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,52 +83,60 @@ BOOST_AUTO_TEST_CASE( test_union_multipoint_point )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1)"),
|
||||
"mppu01");
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
("mppu01",
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppu02");
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 1)"),
|
||||
"mppu03");
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
("mppu02",
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppu04");
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
("mppu03",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0,1 1)"),
|
||||
"mppu05");
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(1 0)"),
|
||||
("mppu04",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
("mppu05",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
"mppu06");
|
||||
from_wkt<P>("POINT(1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
|
||||
"mppu07");
|
||||
("mppu06",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
("mppu07",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,0 0,1 0)"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)"),
|
||||
"mppu08");
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
("mppu08",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<P>("POINT(0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0)")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -146,42 +156,47 @@ BOOST_AUTO_TEST_CASE( test_union_multipoint_multipoint )
|
||||
> tester;
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
("mpmpu01",
|
||||
from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1,2 2,3 3,0 0,0 0,2 2)"),
|
||||
"mpmpu01");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,1 1,1 1,1 1,2 2,3 3,0 0,0 0,2 2)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
("mpmpu02",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
"mpmpu02");
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
"mpmpu03");
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
"mpmpu04");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT()"),
|
||||
("mpmpu03",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
"mpmpu05");
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(1 0,0 0,1 1,0 0)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
(from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0)"),
|
||||
("mpmpu04",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 1,1 0,1 1)")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
("mpmpu05",
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT()"),
|
||||
from_wkt<MP>("MULTIPOINT()")
|
||||
);
|
||||
|
||||
tester::apply
|
||||
("mpmpu06",
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 0,1 0,2 0,3 0,0 0,1 0,2 0,0 1,0 2)"),
|
||||
from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0,3 0)"),
|
||||
"mpmpu06");
|
||||
from_wkt<MP>("MULTIPOINT(0 1,0 2,1 0,0 0,2 0,3 0)")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015.
|
||||
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
|
||||
@@ -26,8 +26,7 @@
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/write.hpp>
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/polygon.hpp>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/length.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Tests
|
||||
|
||||
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2015 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
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
|
||||
template <typename Geometry>
|
||||
inline Geometry from_wkt(std::string const& wkt)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// 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,6 @@
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/multi/multi.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/adapted/c_array.hpp>
|
||||
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
|
||||
@@ -35,8 +34,8 @@
|
||||
|
||||
#elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT)
|
||||
|
||||
#include <boost/geometry/multi/geometries/register/multi_point.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_point_concept.hpp>
|
||||
#include <boost/geometry/geometries/register/multi_point.hpp>
|
||||
#include <boost/geometry/geometries/concepts/multi_point_concept.hpp>
|
||||
|
||||
BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(std::vector)
|
||||
BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(std::deque)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Boost.Geometry
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2014-2015 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
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <boost/geometry/geometries/register/point.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/algorithms/num_geometries.hpp>
|
||||
|
||||
typedef std::pair<float, float> pt_pair_t;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
|
||||
// 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,9 +15,8 @@
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/multi/io/dsv/write.hpp>
|
||||
#include <boost/geometry/multi/geometries/multi_geometries.hpp>
|
||||
#include <boost/geometry/multi/io/wkt/read.hpp>
|
||||
#include <boost/geometry/io/dsv/write.hpp>
|
||||
#include <boost/geometry/io/wkt/read.hpp>
|
||||
|
||||
template <typename Geometry>
|
||||
void test_dsv(std::string const& wkt, std::string const& expected, bool json = false)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user