Commit Graph

216 Commits

Author SHA1 Message Date
Barend Gehrels
081860e8dd [sort_by_side] fix (rare) cases where two froms arrive at a turn,
but only one leaves the next turn. This simplifies state to just a boolean.
This fixes cases like case_recursive_boxes_46 for union
2017-04-19 16:32:40 +02:00
Adam Wulkiewicz
2a3cb7b951 [test][intersection][union] Add cases where all points of g1 are the same as some points of g2. 2017-04-14 14:40:52 +02:00
barendgehrels
ace8bdb7f0 [overlay] discard ii turns where two interior rings touch, for union operations.
This fixes case #80. Also, added case #105, testing that in a different way
(limiting solutions)
2017-03-18 20:17:22 +01:00
barendgehrels
12b1ad9e79 [test] avoid testing too much when one type is tested (compilation time) 2017-03-18 20:14:19 +01:00
barendgehrels
f9e2119d32 Merge branch 'develop' into feature/intvalid
# Conflicts:
#	include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
#	test/algorithms/set_operations/intersection/test_intersection.hpp
2017-03-13 16:22:58 +01:00
Adam Wulkiewicz
b1c78f6622 [test] Test setops, is_simple and is_valid with strategies. 2017-02-17 05:45:34 +01:00
barendgehrels
07872acca1 [test] add (still failing) test for validity needing self-turn 2016-12-16 12:30:11 +01:00
Barend Gehrels
a057b49ec0 [test] add testcases with one cluster and multiple outputs (one is invalid)
Add macros to specify testcases more conveniently
2016-10-05 12:55:39 +02:00
Barend Gehrels
30ad9da654 [validity] add cases with single cluster 2016-09-28 12:43:22 +02:00
Barend Gehrels
d4d24524a9 [test] various test updates w.r.t. robustness and validity 2016-07-20 13:46:23 +02:00
Barend Gehrels
389887eaaa [colocations] fix the issue for ccw 2016-07-06 14:25:30 +02:00
Barend Gehrels
08f87517b7 [colocations] also discard interior-ring turns with a ux 2016-07-06 13:31:11 +02:00
Barend Gehrels
5aa82adbba [test] remove duplicate testcase (mysql_23023665_4 is identical to mysql_21964049) 2016-07-06 12:48:46 +02:00
Barend Gehrels
f8ea789f31 [test] move cases, three newly reported cases are fixed already for non-ccw 2016-07-06 12:47:06 +02:00
Barend Gehrels
6b7f5f484d [test] make exceptions for invalid polygons or (union) 3 ccw cases which
are not yet created as valid
2016-06-29 14:08:05 +02:00
Barend Gehrels
b46805107b Merge branch 'develop' into feature/cluster_touch
Conflicts:
	include/boost/geometry/algorithms/detail/overlay/handle_touch.hpp
	test/algorithms/overlay/Jamfile.v2
	test/algorithms/set_operations/difference/difference.cpp
	test/algorithms/set_operations/union/union.cpp
2016-06-29 13:18:51 +02:00
Barend Gehrels
b75c055ff1 [test] add comments 2016-06-29 11:48:03 +02:00
Barend Gehrels
0879dccc81 [traversal] handle clustered turns with interior/exterior touching point by
discarding those turn_points (because detecting that in cluster or switch
and adapt behaviour is way more complex)
2016-06-22 18:44:17 +02:00
Adam Wulkiewicz
699df472e7 [test][setops] Use multi-geometries as output types (to simplify debugging). 2016-06-21 23:55:57 +02:00
Adam Wulkiewicz
ff77e78562 [test][setops] Add failing test cases. 2016-06-21 16:45:46 +02:00
Adam Wulkiewicz
94b2ff8f10 [test][difference][union] Add failing cases. 2016-06-20 15:28:51 +02:00
Barend Gehrels
3d5906f1e8 [traversal] revised switch detector because could not get previous approach
working for the last cases and for newly created connected interior rings. The new approach is much simpler and based
on regions (connected rings, connected via interiors) and works for almost
all cases including newly created connected interiors. Last cases still to
be checked though.

It does not traverse through turns, but instead navigates through rings
2016-06-08 14:53:49 +02:00
Barend Gehrels
8a1c3e99c6 [test] add (currently failing) testcase 2016-06-08 12:20:56 +02:00
Barend Gehrels
e5652cffe1 [test] add optional check of input validity 2016-06-01 13:48:20 +02:00
Barend Gehrels
597ea22bef [test] test validity now that input is valid, and add testcases for
some deliberately invalid input
2016-06-01 13:39:01 +02:00
Barend Gehrels
ee38e20243 [test] remove var which is not used anymore 2016-06-01 12:36:43 +02:00
Barend Gehrels
1b5efbaeb7 [traverse] fix switch cases on first visit by extracting that code
to separate method and call it twice
2016-06-01 12:36:08 +02:00
Barend Gehrels
f62503c2d4 [traverse] implement zones in traversal switch detections 2016-06-01 10:34:00 +02:00
Barend Gehrels
dc63848782 [traverse] check other ring while determining switches 2016-05-18 12:20:17 +02:00
Barend Gehrels
1d273e223b [traverse] touch detection for clusters, implemented partly.
This still causes some regressions and fixes other (about equally amount) cases
2016-05-11 14:09:03 +02:00
Barend Gehrels
1e99b1adf9 [traverse] use switch_source in clusters 2016-05-05 12:25:20 +02:00
Barend Gehrels
c2baa5c46b [test] add testcases for two tickets 2016-04-27 11:42:16 +02:00
Barend Gehrels
df9a97dea8 [traverse] enhance validity by checking touching (uu or combined turns creating a touch)
in clusters.
2016-04-27 11:39:40 +02:00
Barend Gehrels
950c2644e5 [traverse] reimplement touch the same way as traversal, but don't create rings
there but detect source-switching

This fixes several touching-cases (clusters with uu not yet handled)
2016-04-20 14:13:09 +02:00
Barend Gehrels
a7071f1ef1 [test] ignore validity teset for rt_f which is somehow failing (since
validity test is turned on) on this branch or my machine. To be fixed if
validity is fixed in general
2016-04-06 17:30:36 +02:00
Barend Gehrels
cfa0c184f8 Merge branch 'develop' into feature/cluster_touch 2016-04-06 09:38:08 +02:00
Adam Wulkiewicz
f46ed34965 [test][union][intersection] Add test case (failing union). 2016-04-05 20:23:30 +02:00
Barend Gehrels
5a5ed0cb10 [test] in union_multi, test for the uu-interior ring cases (4 of them still failing w.r.t. validity) 2016-03-30 11:27:26 +02:00
Barend Gehrels
ebe3ffbd58 [test][union] test validity by default 2016-03-30 11:12:09 +02:00
Barend Gehrels
ebd3b6a4b9 [test] fix #exected holes 2016-03-27 10:58:46 +02:00
Barend Gehrels
9c33e37647 [test] add test for ticket 10866 which is apparently fixed 2016-03-23 16:58:45 +01:00
Barend Gehrels
2f785c09e5 [test] add testcase for ticket_11725 which is solved now by sometimes
switching source in u/u (the yet simple approach)
2016-03-23 16:27:15 +01:00
Barend Gehrels
7818ce8793 [test] add testcase for ticket_11984 which is solved now by last commit 2016-03-23 16:05:01 +01:00
Barend Gehrels
85e0755ccd [traverse][fix] use two passes, in first pass avoid uu turns to get
the interior rings right at starting points. Second pass use uu, but
only switch source if there are only uu turns found. This fixes most
of the simple cases (complex cases can still go wrong)
2016-03-23 13:25:30 +01:00
Barend Gehrels
1439c479d6 [union][test] multi: add cases from branch handle_touch 2016-03-23 11:22:47 +01:00
Barend Gehrels
27b7b9d803 [union][test] add cases from branch handle_touch and put UT report
in argument order
2016-03-23 11:09:33 +01:00
Barend Gehrels
588d102b19 [union] same solution as for intersection should be applied for union,
but not in case of uu or similar
2016-03-16 17:54:03 +01:00
Barend Gehrels
7d3d0dd69f [traverse] revise last weeks fix, make it more general. It should just
skip finalized arcs. This fixes the robustness test almost completely
2016-03-16 14:46:05 +01:00
Barend Gehrels
d9ac176f27 [test] adapt expected values 2016-02-28 12:44:59 +01:00
Barend Gehrels
c4c180bb7d [union] instead of checking uu, count open spaces to support also
conbined touching turns without a uu
2016-02-10 20:34:37 +01:00
Barend Gehrels
5eea0f2f61 [test] updated expected clips/holes 2016-02-03 11:18:45 +01:00
Barend Gehrels
a236ba3391 [overlay] add counts to enrichtment info, this avoids it to be redone,
and use it in traverse omitting the operation condition
2016-01-13 15:58:51 +01:00
Barend Gehrels
8364aed91b [intersection] fix cases where intersection has to travel through uu/ux 2016-01-13 12:49:47 +01:00
Barend Gehrels
d256e57487 [overlay] now we can/need to remove functionality to discard turns
colocated with uu and the same ring.
This breaks one case (# case_recursive_boxes_23) but repairs many (about 50%
of the wrong cases in robustness test)
2016-01-13 10:52:04 +01:00
Barend Gehrels
5f028b0b04 [overlay] split polygon_count in left_count/right_count, this is necessary
for some cases (ex. #case_recursive_boxes_29). Also, necessary, now that
startable is defined, don't discard colocated cc in clusters, they are
sometimes necessary.
2016-01-10 19:06:34 +01:00
Barend Gehrels
01df9eacbb [overlay] fix implementation of startable flag, it should start if there
are 1 (union) or 2 (intersection) polygons on right hand
2016-01-10 13:32:08 +01:00
Barend Gehrels
e4624dad28 [union] remove discarded lonely uu turns from cluster 2016-01-09 20:09:35 +01:00
Barend Gehrels
7931e0445b [intersection] now discarded uu turns outside clusters, they block traversal 2016-01-09 19:31:19 +01:00
Barend Gehrels
b7a16976c9 [overlay] handle startable functionality for traverse w.r.t. clusters
This has a small regression on 5 cases in multi_difference, to be inspected,
and can change the number of holes due to commenting handle_touch
2016-01-09 13:39:28 +01:00
Barend Gehrels
f377eebf8c [traverse] instead of combination uu/ux for specific behaviour,
now check on uu/* (any turn in combination with uu) for unionts
2016-01-08 18:28:38 +01:00
Barend Gehrels
0d3ef5e3e9 [intersection] discard turns colocated with uu too (these turns are based on
invalid input)
2016-01-07 19:34:08 +01:00
Barend Gehrels
59125adb8d [intersection] don't exclude ux for intersection because it is necessary
to block certain paths
2016-01-07 18:59:05 +01:00
Barend Gehrels
98f26765e7 [union] change solution for reversed clusters (uu/ux only),
this fixes the new case #case_recursive_boxes21

This fixes again all current multi union/intersection/difference and all union
2016-01-06 22:29:52 +01:00
Barend Gehrels
32ddae6c0d [union] handle clusters with uu-only and halfway incoming arcs 2016-01-06 18:18:18 +01:00
Barend Gehrels
c9836ca17f [union] handle clusters with uu/ux combined 2016-01-06 17:18:05 +01:00
Barend Gehrels
2c1a7b7f40 [union] fix simple cases having two colocated uu turns
(appearing now that uu turns are included)
2016-01-06 16:52:19 +01:00
Barend Gehrels
e52f55bd78 [test] case_36 is fixed now (handle_touch),
correct expected #holes
2016-01-06 13:01:00 +01:00
Barend Gehrels
f803c0cae2 [overlay] stop discarding uu turns. Discard cc turns colocated with uu turns.
Including uu turns is necessary to handle cases as in #recursive_boxes_17 and also for
validity of output polygons.
This also makes code simpler for now, removing the separate uu handling from
for example select_rings
2016-01-03 13:17:17 +01:00
Barend Gehrels
fe5264ef00 [traverse] fix selection of operation in case of continue: do not
select a continue operation if next turn is a dead end
2016-01-01 11:09:21 +01:00
Barend Gehrels
e059715a2a [traverse] fix selecting invalid arc in cluster 2015-12-31 18:09:10 +01:00
Barend Gehrels
f63573d58b [colocations] fix assigning discarded turns for clusters 2015-12-31 15:55:00 +01:00
Barend Gehrels
716fe421e0 [enrich] fix cluster behaviour, only point to next turn if clusters
are also on
2015-12-31 14:55:31 +01:00
Barend Gehrels
4878e7c34c [enrich] move discarding uu until after clustering, and within
clustering discarding turns colocated with uu on the same ring.
This breaks 2 cases, to be solved later, and fixes case_recursive_boxes_12
2015-12-24 17:05:05 +01:00
Barend Gehrels
f2319263a0 [union] fix known cases using clustering and sort_by_side during traversal 2015-12-19 18:10:34 +01:00
Barend Gehrels
d08f527271 [test] added several existing and two new tests mainly for difference
(work in progress)
2015-12-09 18:05:40 +01:00
Barend Gehrels
a9903f8c7f [overlay] fix ordering ii-turns and skip turns afterwards 2015-11-18 17:33:23 +01:00
Barend Gehrels
67ac81e5b2 [overlay] fix cases where intersection point is in the middle of the
first segment, and not at the endpoint
2015-11-18 14:53:00 +01:00
Barend Gehrels
a48a935064 [overlay] self-tangencies, similarly as handling side left/right,
handle cases where one leg continues collinearly
2015-11-18 11:14:35 +01:00
Barend Gehrels
e97bbb4da1 [overlay] fix cases where IP is not at endpoint. This fixes the last
union/buffer cases with less_by_segment_ratio instead of handle_tangencies
2015-11-12 19:46:29 +01:00
Barend Gehrels
242c619b35 [overlay] handle ux/ui and ui/ui in a more generic way, for union,
checking the relative sides of the outgoing segments (in the sorting)
2015-11-11 21:50:34 +01:00
Barend Gehrels
529b8e804c [overlay] fix ux/ux cases by sort order
(instead of handle tangencies)
2015-11-11 16:18:19 +01:00
Barend Gehrels
4a05869d2f [overlay] turn off handle_tangencies 2015-11-11 15:43:29 +01:00
Barend Gehrels
4270ccce20 [test] add recent regression for intersection. Found using recursive_polygon
Date of regression yet unknown. In 1.55 the recursive_polygons tool
never detected errors.
2015-11-11 13:34:49 +01:00
Barend Gehrels
2cf781aa68 [test] add testcase for which is failing for intersection. This is the
inverse testcase for difference (which is also failing and which is why it
is added). To be fixed.
2015-11-04 12:36:16 +01:00
Barend Gehrels
44372ca32e [test] harmonize names for define 2015-11-01 13:44:42 +01:00
Barend Gehrels
a2d2d4f58d [test] remove overload with percentage, only used once and now
supported by ut_settings
2015-11-01 12:27:08 +01:00
Barend Gehrels
94dc52a931 [test] add test case for ticket 10803 and added code to test for validity 2015-11-01 12:17:45 +01:00
Barend Gehrels
8f8b7bdfb1 [test] add testcase for similar situation (interior ring touches exterior
ring)
2015-11-01 11:14:58 +01:00
Barend Gehrels
a1e4a65f9a [test] add case with two ext/int colocations at the same point 2015-10-31 11:16:55 +01:00
Barend Gehrels
7cfe3dc337 [union] instead of checking on u/u, sort/check
on exterior ring/interior rings such that also cases with u/x are handled

This fixes case mysql_21964049
2015-10-31 10:56:27 +01:00
Barend Gehrels
4ae1320d1c [union][test] move test cases to overlay_cases.hpp and enable two cases
which are fixed now
2015-10-28 19:49:37 +01:00
Adam Wulkiewicz
ddcce3d2a9 [test][union] Add failing test case. 2015-10-22 22:40:27 +02:00
Barend Gehrels
533543e86b [traverse][robustness] in case of cc, instead of arbitrary candidate,
take candidate with largest remaining distance. This fixes some
errors if rescaling is turned off.
2015-10-14 17:15:53 +02:00
Barend Gehrels
b1c0c487e1 [test][union] add two testcases causing problems with u/u turns
and handle_touch (in other branch)
2015-10-07 19:45:25 +02:00
Adam Wulkiewicz
154650f8d0 [test][union] Enable testing of a case also when rescaling is disabled.
Fix unused parameter warning.
2015-08-05 01:04:15 +02:00
Barend Gehrels
79800dd3cb [union][test] adapt one of the testcases for NO_ROBUSTNESS 2015-07-15 13:12:15 +02:00
Barend Gehrels
3547648730 [union][test] Exclude some of the tests for no-robustness 2015-07-15 12:34:07 +02:00
Adam Wulkiewicz
5c03dd10d6 [union] Update expected test results, syncronize with the change in rescale policy (rounding). 2015-06-25 17:29:56 +02:00
Adam Wulkiewicz
a5c79c9e22 [test][set_operations] Rename the tests. 2015-06-12 13:26:57 +02:00
Menelaos Karavelas
2de36a37df [test][geometry] replace instances of "num_point() == 0" by "is_empty()";
replace instances of "num_points() > 0" by "! is_empty()";
2015-06-03 17:18:55 +03:00
Adam Wulkiewicz
2b11233f00 Merge pull request #264 from mkaravel/fix/remove_deprecated_include_paths
Fix: remove deprecated include paths
2015-04-06 01:32:39 +02:00
Adam Wulkiewicz
5feb4afe70 Merge pull request #256 from mkaravel/fix/polish_set_ops_pl_pl_tests
Unit tests for set operations of pointlike/pointlike geometries
2015-04-05 02:31:35 +02:00
Menelaos Karavelas
7658231aa4 Merge branch 'develop' of https://github.com/boostorg/geometry into fix/remove_deprecated_include_paths
Conflicts:
	test/algorithms/set_operations/difference/difference.cpp
2015-03-31 14:30:04 +03:00
Barend Gehrels
90fcd83f30 [test] Remove bigobj flag from Jamfiles
now that it is defined in the upper level
2015-03-22 22:58:24 +01:00
Menelaos Karavelas
4d544287a3 [test][algorithms][set operations] update deprecated includes referring to
the include/boost/geometry/multi/ directory
2015-03-12 10:47:28 +02:00
Menelaos Karavelas
29c460b546 [test][algorithms] remove deprecated includes referring to the
include/boost/geometry/multi/ directory; polish and simplify some includes;
2015-03-12 02:10:14 +02:00
Menelaos Karavelas
ec5efe3799 [test][algorithms][set operations][pointlike] polish tests of set operations
for pointlike/pointlike geometries (make the case ID the first argument of the tester);
modify the common set operations test code so that it can be applied to set operations
of pointlike/linear geometries as well;
2015-03-10 16:04:31 +02:00
Menelaos Karavelas
bcb52c4f47 [test][algorithms][set operations L/L] update copyright year 2015-02-10 17:10:47 +02:00
Menelaos Karavelas
a4988e34a3 [test][algorithms][union L/L] add missing include 2015-02-10 16:13:11 +02:00
Menelaos Karavelas
e131358c9e [test][algorithms][union L/L] add support for checking equality with tolerance 2015-02-10 16:04:12 +02:00
Menelaos Karavelas
04814e5303 [test][algorithms][union] add one more test case for union(linestring, linestring) 2015-02-04 10:27:18 +02:00
Barend Gehrels
432f1f1a77 [test][union] by default check CCW/Open too 2014-12-21 15:58:40 +01:00
Barend Gehrels
c5417f6f43 [overlay] fix ticket #10108: rings only touching should check for u/u turns
and don't call point_on_border because that might be located on the border of the
other geometry. This also avoids passing the mid_point boolean, and including
within_code in ring_properties
2014-11-06 14:29:35 +01:00
Adam Wulkiewicz
61c9fa6bd2 [test] Move overlay tests from multi directory. 2014-10-30 13:41:41 +01:00
Adam Wulkiewicz
2bef2facc1 [test] Move set operations tests from multi directory. 2014-10-30 13:24:10 +01:00
Adam Wulkiewicz
26b338a20f [test] Move set and relational operations tests to separate directories. 2014-10-30 13:09:12 +01:00