Commit Graph

5228 Commits

Author SHA1 Message Date
Adam Wulkiewicz
9b09cd2efa Divide type_traits, replace bare_type with remove_cptrref.
Divide type_traits into two groups:
- util/type_traits_std.hpp - dependant only on std type_traits
- util/type_traits.hpp - dependant on geometry tags, also including the
above.

Add remove_cptrref and use it instead of bare_type.

For now keep bare_type, move it to util/type_traits_std.hpp.
2020-09-03 19:32:01 +02:00
Adam Wulkiewicz
00f00369cd Replace add_const_if_c with transcribe_const.
Move add_const_if_c to util/type_traits.hpp
Remove usage when not needed.
2020-09-03 16:26:06 +02:00
Adam Wulkiewicz
c63e7a8394 Move is_range util to range.hpp to avoid Boost.Range/MPL dependency in type_traits.hpp 2020-09-03 16:24:29 +02:00
Adam Wulkiewicz
d7619d11c2 Replace Boost.MPL/TypeTraits with std type_traits in various parts of the library. 2020-09-03 13:36:18 +02:00
Adam Wulkiewicz
b9a60636e0 [util] Add more type_traits. 2020-09-03 13:35:19 +02:00
Adam Wulkiewicz
6c0490a366 Merge branch 'develop' into feature/type_traits 2020-08-31 23:33:27 +02:00
Adam Wulkiewicz
3cd74503b1 [util] Use std type_traits instead of Boost type_traits/mpl in various utils. 2020-08-31 01:43:44 +02:00
Adam Wulkiewicz
8deda7466c [index] Replace deprecated header. 2020-08-30 04:18:14 +02:00
Adam Wulkiewicz
dda7e6b450 [index] Fix compilation error and warning in varray_detail.
Error with msvc-14.2: ambiguous call to destroy()
  - explicitly define namespace

Warning with gcc-8.1: memcpy called for non-trivially-copyable type
  - check correct type trait
2020-08-30 03:46:09 +02:00
Adam Wulkiewicz
9c4c884a4c [strategies] Use select_calculation_type in buffer::geographic_point_circle. 2020-08-29 17:43:09 +02:00
Adam Wulkiewicz
4b75d69937 Move various traits to util/type_traits.hpp and adapt the code using them. 2020-08-29 01:48:39 +02:00
Adam Wulkiewicz
786bc54c68 Add util/type_traits, polylinear_tag, simplify types in umbrella strategies. 2020-08-28 19:12:31 +02:00
Adam Wulkiewicz
5ca542fc4f Merge pull request #726 from awulkiew/feature/strategies
Umbrella strategies.
2020-08-28 16:16:25 +02:00
Adam Wulkiewicz
0166c8ea6e Merge pull request #743 from awulkiew/feature/for_each
Refactor for_each_x and implement new algorithms.
2020-08-24 12:37:23 +02:00
Adam Wulkiewicz
7ef3117f27 [for_each] Refactor for_each_x and implement new algorithms.
for_each_range now expects functors instead of structs with apply()
member function.

for_each_segment now calls functor also for degenerated ranges for
consistency with segment_iterator.

New algorithms based on std::all_of, std::any_of and std::none_of
- all_points_of, any_point_of, none_point_of
- all_segments_of, any_segment_of, none_segment_of
- all_ranges_of, any_range_of, none_range_of

New algorithms used in several places in the library.

This code requires C++14.
2020-08-24 12:28:43 +02:00
Adam Wulkiewicz
070480d97c Merge pull request #745 from awulkiew/feature/constexpr
Support constexpr in points, segment, box, get, dot and cross products.
2020-08-24 12:26:52 +02:00
Barend Gehrels
5813841757 Merge pull request #744 from barendgehrels/fix/remove_is_ii
[get_turn_info] Remove the recently added is_ii
2020-08-19 09:51:30 +02:00
Adam Wulkiewicz
0326eaf679 [arithmetic][core][geometries] Support constexpr in points, segment, box, get, dot and cross products. 2020-08-16 00:50:35 +02:00
Adam Wulkiewicz
99fe9fe6c6 [is_valid] Add TODO comments in is_valid for linestrings. 2020-08-13 19:19:32 +02:00
Barend Gehrels
7739109b3b [get_turn_info] Remove the recently added is_ii 2020-08-12 11:39:22 +02:00
Adam Wulkiewicz
734b6470af [strategies] Add missing #includes. 2020-08-10 21:06:46 +02:00
Barend Gehrels
8251f19331 Merge pull request #741 from barendgehrels/fix/handle_as_touch
Fix/handle as touch
2020-08-10 20:46:00 +02:00
Adam Wulkiewicz
98617679bb [algorithms] Fix dangling references for referring_segment and non-true references returned from ranges. 2020-08-10 12:40:55 +02:00
Adam Wulkiewicz
52cceae021 [strategies] Relocate area, envelope and expand strategies. 2020-08-05 22:59:13 +02:00
Barend Gehrels
adef6b24de [turns] handle ii-situation in touch,
which is a new situation which needs to be handled in the handle-as-touch,
in last commit.
2020-08-05 11:10:15 +02:00
Barend Gehrels
dfbbfc0a87 [turns] if the touch-interior touches near the end (near the IP), then handle
it as if it is a touch
2020-08-05 10:43:35 +02:00
Adam Wulkiewicz
9ede81c724 Merge pull request #738 from awulkiew/fix/direct_formulas2
[formulas] Normalize resulting longitudes in direct formulas.
2020-07-31 23:43:29 +02:00
Adam Wulkiewicz
36298d6324 [formulas] Normalize resulting longitudes in direct formulas. 2020-07-31 19:44:18 +02:00
Barend Gehrels
9759656d2b Merge pull request #736 from barendgehrels/fix/imperfect-touch
Fix errors in some floating point cases
2020-07-22 11:57:35 +02:00
Barend Gehrels
0969372147 [get_turns] use distance measures for side, and handle situation
with an imperfect touch (floating point issue)
2020-07-22 11:53:48 +02:00
Barend Gehrels
761170b0b4 [intersection] check for disjoint-by-range.
Without it, in FP calculations, for nearly collinear segments, it might happen that an intersection is calculated even if the ranges are farther apart from each other
2020-07-15 12:45:34 +02:00
Adam Wulkiewicz
a5b46d0f8b [algorithms][strategies] Add umbrella strategies for area, envelope and expand. 2020-07-10 12:58:23 +02:00
Adam Wulkiewicz
5c878cfb31 Merge pull request #700 from vissarion/fix_default_strategies_distance
Add missing cases for default strategies in distance algorithm
2020-07-08 20:44:21 +02:00
Barend Gehrels
cc0643941a [turns] correct variable names, remove old unused functionality 2020-07-08 10:18:00 +02:00
Barend Gehrels
d347251055 [traversal] Support additional cluster exit functionality.
This makes it more efficient too (sort-by-side one time less).
This fixes some cases in buffer when rescaling is turned off.
2020-06-24 12:36:30 +02:00
Barend Gehrels
4cab526355 Merge pull request #724 from barendgehrels/refactoring/intersection
[intersection] refactor segment-intersection class
2020-06-19 22:05:25 +02:00
Mateusz Łoskot
06208f61d7 Fix MSVC warning C4127: conditional expression is constant (#730)
Fixes #727
2020-06-19 19:12:58 +02:00
Barend Gehrels
81c8351d82 [intersection] refactor segment-intersection class,
to avoid using both non-rescaled and rescaled coordinates in one method
2020-06-10 14:30:34 +02:00
Caian Benedicto
10b0c37216 [index] Add custom pack allocator to r-tree constructor (#720)
* Add pack overload that accepts custom allocator

* Refactor packed rtree construction to pack_construct

* Add rtree constructors with support for a pack allocator

* Add copyright to modified files

* Rework constructors to leave pack allocator at the end

* Rename tree_allocator and pack_allocator

* Update list of contributors

* Fix temp_allocator comment
2020-06-08 18:33:41 +02:00
Jonathan Wakely
aafbceccc7 Make index::detail::rtree::visitors::insert base class public
Fixes #721
2020-06-05 19:29:27 +01:00
Barend Gehrels
001274d72c Merge pull request #712 from barendgehrels/fix/sort-by-side-stability
[overlay] Fix possible instabilities in sort_by_side
2020-05-15 22:45:14 +02:00
Adam Wulkiewicz
a92b5e36fc Merge pull request #695 from awulkiew/feature/setops_output
Support tupled-output in difference, sym_difference and union_.
2020-05-13 17:04:04 +02:00
Adam Wulkiewicz
1d994350bd Merge pull request #710 from awulkiew/fix/varray
[index] Use memcpy and memmove only if T is_trivially_copyable.
2020-05-13 16:55:38 +02:00
tinko92
bf8f192412 [extensions] Performance improvements for side_robust strategy (#701)
* reorganize some parts of orient2d for a speedup

* replace array in orient2d with own clearly named type.
2020-05-13 16:10:58 +03:00
Barend Gehrels
cb3eff6657 [overlay] Fix possible instabilities in sort_by_side
plus some minor code refactoring
2020-05-13 14:10:04 +02:00
Barend Gehrels
70ecdfdd19 [buffer] Fix direction code for some new cases.
The similar_direction function could be erroneous for corner cases,
refactored it out.
This also makes it a bit less dependent on infinite_line (cartesian)
2020-05-06 14:22:32 +02:00
Barend Gehrels
ef66e923cc Merge pull request #708 from barendgehrels/feature/buffer-turn-in-original-revision
[buffer] remove rescaling from the turn-in-original check
2020-05-06 10:24:54 +02:00
Adam Wulkiewicz
d09596b96e [setops] Rename single_tag_from_base_tag util and remove commented code. 2020-05-05 20:47:15 +02:00
Adam Wulkiewicz
5f2d4b31f0 [index] Use memcpy and memmove only if T is_trivially_copyable.
In C++03 mimic the trait with has_trivial_copy, has_trivial_assign and
has_trivial_destructor.
2020-05-01 23:43:05 +02:00
Adam Wulkiewicz
f3d1e702d9 [relate] Add missing include. 2020-04-30 23:44:05 +02:00