Commit Graph

8515 Commits

Author SHA1 Message Date
Adam Wulkiewicz
cb03829dc1 [simplify] Correctly propagate strategies to area() and perimeter().
Also made the algorithm more robust by checking the iterator before
using it.
2021-03-03 01:15:12 +01:00
Adam Wulkiewicz
3620e0aada [simplify] Refactor the implementation.
Add dummy geometries which can be used to get strategies from umbrella
strategy without creating heavy temporary geometries.
2021-03-03 00:27:30 +01:00
Adam Wulkiewicz
d6a44a6601 [test] Alter buffer and douglas_peucker tests. 2021-03-02 00:50:14 +01:00
Adam Wulkiewicz
26a62a24fe [buffer][simplify] Use umbrella strategies in buffer and simplify.
Move agnostic simplify strategy to algorithms.
2021-03-02 00:48:36 +01:00
Adam Wulkiewicz
095d1615bb [strategies] Add buffer and simplify umbrella strategies. 2021-03-02 00:48:18 +01:00
Adam Wulkiewicz
8886b1d59d [algorithms][strategies] Add support for umbrella strategies in several algorithms.
Algorithms:
  - densify,
  - discrete_frechet_distance,
  - discrete_hausdorff_distance,
  - length,
  - perimeter.
2021-02-24 02:31:09 +01:00
Adam Wulkiewicz
e25d20b296 [test][distance] Tweak the tests for distance umbrella strategies. 2021-02-17 02:04:12 +01:00
Adam Wulkiewicz
9ca2e1897d [algorithms][index][strategies] Add support for distance umbrella strategies in distance, comparable_distance.
Also adapt index calling comparable_distance in knn query.
2021-02-17 02:01:15 +01:00
Adam Wulkiewicz
f413c31d02 [strategies] Add distance umbrella strategies and modify existing ones.
Replace existing comparable_distance() getters with distance() getters.
The code using them is responsible for the conversion to comparable if
needed.

In some cases it is required to force the algorithms to use comparable
strategies internally. For this purpose add
strategies::distance::detail::comparable<> wrapper converting distance
strategies to comparable strategies.

Derive distance strategies from relate strategies.
Derive index strategies from distance strategies.

Alter legacy strategies if it's required, e.g. for automatic conversion
to umbrella strategies.
2021-02-17 01:55:23 +01:00
Adam Wulkiewicz
0922e3d56c [util] Add new is_segmental type trait (meaning linear or polygonal). 2021-02-17 01:33:40 +01:00
Adam Wulkiewicz
b786bd9dd9 [test][setops] Fix gcc error caused by incorrect passing of interrupt_policy into get_turns. 2021-02-16 17:44:12 +01:00
Adam Wulkiewicz
5c1fffb1ea [overlay] Fix warnings: unused type and signed/unsigned comparison. 2021-02-16 17:17:55 +01:00
Adam Wulkiewicz
2a048f7be4 [distance] Add missing include. 2021-02-16 16:15:12 +01:00
Adam Wulkiewicz
090289ab2e Merge pull request #797 from awulkiew/feature/azimuth
Add new algorithm azimuth.
2021-02-16 15:38:45 +01:00
Adam Wulkiewicz
a941645547 [test][azimuth] Add tests with non-default vincenty formula. 2021-02-16 15:35:38 +01:00
Adam Wulkiewicz
1f16b72cd6 [strategies] Remove redundent comments. 2021-02-16 15:25:11 +01:00
Adam Wulkiewicz
b1e5362d59 [azimuth] Make variables const. 2021-02-16 14:24:10 +01:00
Adam Wulkiewicz
ae33a8dc0c Merge branch 'develop' into feature/azimuth 2021-02-16 14:14:13 +01:00
Adam Wulkiewicz
429423cdb1 Merge pull request #768 from awulkiew/feature/strategies_relate
Support umbrella strategies in relops, setops, index, buffer and more.
2021-02-16 13:32:17 +01:00
Adam Wulkiewicz
920de2ca6a [algorithms] Remove unneeded comments, change names and indentation. 2021-02-16 13:06:32 +01:00
Ayush Gupta
3b0898389a Update unit test for parse.hpp (#806)
Initial implementation of the tests have been added in #802
These are further improvements to those tests.
2021-02-15 19:19:44 +01:00
Joni Kerkelä
accec61743 Add tests for extensions/algorithms/parse.hpp (#802)
Closes #788
2021-02-15 09:22:58 +01:00
Adam Wulkiewicz
bec798d60f Merge pull request #779 from awulkiew/fix/test_range_includes
[test] Include only necessary headers of Boost.Range.
2021-02-12 18:58:25 +01:00
Adam Wulkiewicz
0cfe9ae1d2 [ci] Add repositories for GH workflows with ubuntu-latest. 2021-02-12 00:47:11 +01:00
Mateusz Łoskot
c7adc567b0 Fix MSVC warning C4267: '=': conversion from 'size_t' to 'int' (#798) 2021-02-11 23:37:09 +01:00
Adam Wulkiewicz
9eb674d64f [strategies] Remove usage of equals() algorithm from side strategies. 2021-01-31 22:23:05 +01:00
Adam Wulkiewicz
ab28baae28 Merge branch 'develop' into feature/strategies_relate 2021-01-31 21:08:38 +01:00
Mateusz Łoskot
602790a3f3 Display in README.md we are a C++14 header-only library 2021-01-28 22:58:12 +01:00
Mateusz Łoskot
bceae0187c Add missing #include <string> 2021-01-20 23:23:34 +01:00
Adam Wulkiewicz
c267547e2e [doc] Add documentation for azimuth() algorithm. 2021-01-20 02:49:40 +01:00
Barend Gehrels
18f6ad3658 Merge pull request #790 from barendgehrels/fix/get-turn-info-collinear
Fix/get turn info collinear
2021-01-13 09:36:13 +01:00
Barend Gehrels
d006d1e4ac [test] add testcases from recursive_polygons_buffer partly solved by handling collinear as equal 2021-01-13 09:33:57 +01:00
Barend Gehrels
58429fb557 [get_turn_info] minor clean up of typedefs and includes 2021-01-13 09:33:21 +01:00
Adam Wulkiewicz
627e9d93b5 [test] Add test for newly added azimuth() algorithm. 2021-01-13 01:24:50 +01:00
Adam Wulkiewicz
24dc47e23f [algorithms] Add new algorithm: azimuth(). 2021-01-13 01:23:52 +01:00
Barend Gehrels
84d3a8d9ce [get_turn_info] handle collinear as equal if both segments arrive at intersection point 2020-12-30 14:18:01 +01:00
Barend Gehrels
705efe9bad Merge pull request #780 from barendgehrels/fix/sort-by-side-point-at-turn
Fix/sort by side point at turn
2020-12-30 11:37:24 +01:00
Vissarion Fisikopoulos
421f4de74c Merge pull request #785 from vissarion/fix/spherical_str
[strategies] [test] Fix spherical cross track and convex hull tests
2020-12-23 14:49:19 +02:00
Mateusz Łoskot
b54a0589bd Catch up with dms_parser change from function call operator to apply (#786)
The change was applied in PR #394
2020-12-23 10:35:09 +01:00
Mateusz Łoskot
f6153724c0 Catch up examples with addition of robustness policy and others (#787)
The example/c03_custom_linestring_example.cpp requires change from PR #786
These changes make all examples compile again.
Fixes #784
2020-12-23 10:30:04 +01:00
Vissarion Fisikopoulos
4034ac88b2 [strategies] [test] Fix spherical cross track and convex hull tests 2020-12-21 15:11:17 +02:00
Vissarion Fisikopoulos
74b98a95f7 Merge pull request #756 from vissarion/feature/robust_convex_hull
Non cartesian and robust convex hulls
2020-12-21 12:33:22 +02:00
Vissarion Fisikopoulos
83dcb53ffc Merge remote-tracking branch 'origin/develop' into feature/robust_convex_hull 2020-12-21 12:22:55 +02:00
Vissarion Fisikopoulos
3374cda6f6 Merge pull request #749 from vissarion/feature/robust_area
Area strategy for more accurate computations in cartesian CS
2020-12-21 12:20:31 +02:00
Edward Diener
cb9c71037c Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries whose minumum C++ standard compilation level is C++11 on up. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. (#783) 2020-12-20 11:15:29 +01:00
Barend Gehrels
59e0840d75 [sort_by_side] walk forward for point_to
(similarly to walking backwards for point_from)
2020-12-16 14:41:49 +01:00
Barend Gehrels
4e8ff81131 [sort_by_side] add epsilon to approximately_equals 2020-12-16 10:31:14 +01:00
Barend Gehrels
324249bb2d [copy_segment_point] change offset with modulo, add to box, update unit test 2020-12-09 13:52:07 +01:00
Barend Gehrels
abaa211d3a [sort_by_side] fix cases where the cluster point is approached by segments, but the last point before is colocated with the turn itself
This fixes 50% of the errors currently found by recursive_polygons_buffer (when rescaling is turned off)
2020-12-02 14:19:50 +01:00
Barend Gehrels
77838a8995 [copy_segment_point] change implementation to allow also negative offsets,
including unit test
2020-12-02 13:19:15 +01:00