Commit Graph

5455 Commits

Author SHA1 Message Date
Adam Wulkiewicz
46e3d9231c [algorithms][formulas][strategies] Add missing includes. 2021-07-19 15:10:12 +02:00
Adam Wulkiewicz
406b48bb96 [index] Avoid sorting current neighbor in distance_query_incremental. 2021-07-16 23:44:50 +02:00
Adam Wulkiewicz
a1f679fe17 [index] Do not gather all of the closest neighbors of same distance in qbegin(). Return as soon as possible. 2021-07-16 12:18:04 +02:00
Adam Wulkiewicz
8ad418bb1d [index] Avoid sorting already handled neighbors in distance_query_incremental. 2021-07-08 11:57:41 +02:00
Adam Wulkiewicz
557f8e722b [index] Avoid traversing unnecessary nodes in distance_query_incremental. 2021-07-07 22:18:11 +02:00
Adam Wulkiewicz
0bf96e09b4 [index] Use size_t instead of unsigned int 2021-07-07 15:01:52 +02:00
Adam Wulkiewicz
2922b27d52 Merge pull request #883 from awulkiew/fix/warnings
Fix various warnings, e.g. remove unused variables, etc.
2021-07-06 16:11:58 +02:00
Vissarion Fisikopoulos
f940c16fd6 Remove sum_error function 2021-07-05 16:04:40 +03:00
Adam Wulkiewicz
ebbc58b52e Fix various warnings, e.g. remove unused variables, etc. 2021-07-05 14:15:38 +02:00
Adam Wulkiewicz
7d23591945 [strategy] Fix initializer_list narrowing conversion error in side_robust strategy. 2021-07-01 22:58:57 +02:00
Adam Wulkiewicz
3094ae04a4 [strategies] Add area(box) getters to relate umbrella strategies. 2021-06-30 23:40:58 +02:00
Adam Wulkiewicz
815de96b84 Merge pull request #862 from awulkiew/feature/range_rvalue
Ranges, views and iterators improvements
2021-06-30 23:11:26 +02:00
Adam Wulkiewicz
64978521f8 [equals] Rename template parameter. 2021-06-30 23:09:36 +02:00
Adam Wulkiewicz
0ff39316f7 Merge pull request #832 from awulkiew/fix/area_box
Area strategies for non-cartesian boxes.
2021-06-30 23:04:07 +02:00
Barend Gehrels
174c380da2 [traverse] modernize code and add documentation, make clusters const 2021-06-30 10:24:29 +02:00
Adam Wulkiewicz
8c1505bc4e Remove redundant reverse/close views.
Rename close_view and close_clockwise_view to closed_view and
closed_clockwise_view.

Leave only the following views:
- closed_view
- clockwise_view
- closed_clockwise_view

This means that in all algorithms consistently first the range may be closed
and then reversed if necessary.

Replace Reverse->Direction translation with Reverse->Order.

iterate_direction and order_as_direction are unused now but left for
backward compatibility.

Rename normalized_view.hpp to closed_clockwise_view.hpp
2021-06-17 18:57:39 +02:00
Adam Wulkiewicz
d1be5614fe [index] Fix rtree serialization load for 1-level tree with number of elements lesser than min. 2021-06-11 13:29:17 +02:00
Adam Wulkiewicz
2ae706c4ae [algorithms] Replace closeable_view and reversible_view in several algorithms. 2021-06-07 19:55:49 +02:00
Adam Wulkiewicz
6849800ae9 [views] Add views aliases (e.g. detail::reverse_view, detail::clockwise_close_view, etc.).
These views make closeable_view and reversible_view utilities obsolete.

Add aliases:
- detail::clockwise_close_view
- detail::clockwise_view
- detail::close_clockwise_view
- detail::reverse_view

Added utilities:
- detail::minimum_ring_size

Add Direction and Closure parameters to detail::reverse_close_view for
consistency.
2021-06-07 18:35:26 +02:00
Adam Wulkiewicz
d2434eeead Rename detail::normalized_view to detail::reverse_close_view.
Add detail::close_reverse_view performing closing and reversing in a
different order.

Use these views in algorithms.

Use different order of views in convert to preserve the starting point
of the original range.
2021-06-07 02:08:56 +02:00
Adam Wulkiewicz
a9e5f267c3 Move std::array from base class to member of box_view and segment_view. 2021-06-06 16:38:05 +02:00
Adam Wulkiewicz
32aaa05bd0 Remove range_type<> and modify detail::as_range(), plus other minor tweaks.
The rationale behind it is that in all cases range_type<> was used as
ring_type<>. There was a specialization for Box defining box_view<> but
this was semantically different than accessing a ring of geometry.

detail::as_range() was taking a range type and returning a reference to
this range which was inconsistent with ring_return_type<>.

Remove unneeded begin() and end() functions in non-mutable ranges
closeable_view<> and detail::normalized_view<>.

Add specialization of ring_type<> for linestrings since there is already
specialization of ring_return_type<>.

Fix some compilation errors.
2021-06-06 00:00:52 +02:00
Adam Wulkiewicz
5f0ba22310 Simplify the implementation of box_view and segment_view.
Remove detail::points_view.
2021-06-05 15:04:44 +02:00
Adam Wulkiewicz
03269615ef Move iterators-related details to detail namespace and directory. 2021-06-05 12:15:10 +02:00
Adam Wulkiewicz
cad76bf9a0 Refactor iterators and views allowing to pass them as temporaries.
Do not store pointers to ranges in iterators and views.

Implement copy ctors in iterators allowing to convert compatible
iterators.

In copy ctors use enable_if instead of static_assert.
2021-06-05 02:13:00 +02:00
Adam Wulkiewicz
2fc1a3fe8f Add support for ranges passed by rvalue in range utilities.
This allows to pass temporary ranges and proxies without the need to
explicitly create variables.
2021-06-05 00:35:10 +02:00
Adam Wulkiewicz
bac1e432ae [append] Replace typedefs with using. 2021-06-03 16:03:06 +02:00
Adam Wulkiewicz
b1b29ec41d [clear] Add support for GeometryCollection in clear(). 2021-06-02 22:48:20 +02:00
Adam Wulkiewicz
620e02f4b6 Check all subgeometry types in DG and GC concept checks. 2021-06-02 22:29:39 +02:00
Adam Wulkiewicz
fd32e7b88e Replace typedef with using in trait specializations for DGs and GC.
Add missing curly braces.
Remove unneeded comments.
2021-06-02 14:07:43 +02:00
Adam Wulkiewicz
4c84757d68 Merge branch 'develop' into feature/gc 2021-06-02 13:54:10 +02:00
Adam Wulkiewicz
8e3785ed67 Merge pull request #855 from awulkiew/feature/strategies_improvements
Umbrella strategies improvements
2021-06-02 13:40:15 +02:00
Adam Wulkiewicz
3f0087a861 [length] Add TODO comment. 2021-06-02 13:39:12 +02:00
Barend Gehrels
798726a542 [overlay] fix cluster order 2021-06-02 11:46:31 +02:00
Adam Wulkiewicz
e966bdd370 [length] Add support for DynamicGeometry and GeometryCollection in length(). 2021-06-02 01:30:18 +02:00
Adam Wulkiewicz
7adb72e81a Support Boost.Variant with disabled variadic templates regardless of the compiler.
Variadic templates can be disabled in Boost.Variant by defining
BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES.

Also support DG and GC in:
- comparable_distance_result
- default_length_result
- distance_result
2021-06-01 15:22:47 +02:00
Adam Wulkiewicz
ef89b4cf55 [concepts] Implement DynamicGeometry and GeometryCollection concepts.
Add concepts::concept_type<> utility for generic concept definitions.

Replace tag dispatching in concepts::check() with
concepts::concept_type<>.
2021-05-30 17:11:57 +02:00
Adam Wulkiewicz
a8db9241f2 [io] Bring back support of proxy interior rings (e.g. Boost.Polygon) in wkt read. 2021-05-30 01:25:23 +02:00
Adam Wulkiewicz
9849f23b5c Add DynamicGeometry adaptation for std::any. 2021-05-29 23:09:12 +02:00
Adam Wulkiewicz
6e71295d64 Add DynamicGeometry adaptation for std::variant. 2021-05-28 18:36:39 +02:00
Adam Wulkiewicz
d690364aa0 Reenable 2-argument visit specializations (disabled for test purposes). 2021-05-28 18:35:08 +02:00
Adam Wulkiewicz
251f7d15e0 Move algorithms/visit.hpp to algorithms/detail/visit.hpp 2021-05-28 17:30:26 +02:00
Adam Wulkiewicz
c7ae87d15c Merge branch 'develop' into feature/gc 2021-05-28 17:09:11 +02:00
Adam Wulkiewicz
d523cb9989 Minor changes related to DG and GC support.
Remove unneeded comments.
Replace typedef with using.
Change names and formatting.
2021-05-28 17:07:57 +02:00
Adam Wulkiewicz
667471e5ed Improve visit traits and algorithms.
Add support for rvalue references in visit traits and algorithms.
Move visit algorithms to detail namespace.
Rename visit_iterator trait to iter_visit.
Add tests for visit traits and algorithms.
Remove unneeded comments.
2021-05-28 01:48:26 +02:00
Vissarion Fisikopoulos
5702548348 Add missing cases for geographic segment-box disjoint (#853) 2021-05-26 10:49:06 +03:00
Adam Wulkiewicz
b90a3116a5 [algorithms] Include default strategies with corresponding algorithms. 2021-05-24 21:30:32 +02:00
Adam Wulkiewicz
dda2898215 [is_convex] Add support for Polygons. 2021-05-24 21:30:32 +02:00
Adam Wulkiewicz
e06f6e6cdf [is_convex] Add support for umbrella strategies. 2021-05-24 21:30:32 +02:00
Adam Wulkiewicz
94353d9f15 [strategies] Remove strategy getters from legacy strategies. 2021-05-24 21:30:32 +02:00