Commit Graph

297 Commits

Author SHA1 Message Date
Barend Gehrels
cef05d3bf2 [buffer][test] remove default values for new tests 2014-10-29 11:16:42 +01:00
Barend Gehrels
4a7c63fb17 [buffer][test] add custom-strategy version and test scenario which did round-join buffer fail 2014-10-29 11:16:11 +01:00
Adam Wulkiewicz
c411f2bdb3 [test][buffer] Add test cases for Polygon. 2014-10-28 15:07:36 +01:00
Adam Wulkiewicz
3500cc4355 [test][buffer] Add CCW test polygons (not tested yet). 2014-10-28 13:49:08 +01:00
Barend Gehrels
a5b9cfe0bc [buffer][fix] fix for open input of 3 points 2014-10-24 19:39:01 +02:00
Barend Gehrels
0f72af95f0 [buffer] fix simplify which should work on input ringtype
and added unit test which tests different input/output types w.r.t. point order
(different point types are not yet supported)
2014-10-24 15:52:05 +02:00
Barend Gehrels
ffd3cd1e3d [buffer][test] fix ccw suffix which should use output geometry 2014-10-24 15:33:03 +02:00
Barend Gehrels
6f09c5fd98 [buffer][test] test counter clockwise output for (multi)linestrings / points 2014-10-24 15:17:05 +02:00
Barend Gehrels
bd4de457d8 [buffer][fix] fixes counter clockwise polygons 2014-10-24 15:02:55 +02:00
Barend Gehrels
b40c1096a4 [buffer][test] fix 3 testcase names 2014-10-24 14:20:15 +02:00
Barend Gehrels
d762543676 [buffer][test] add reported testcase which succeeds 2014-10-24 13:33:17 +02:00
Barend Gehrels
6280a2b67e [buffer] support buffer for degenerate polygons (pointlike, not enough points) 2014-10-24 13:12:10 +02:00
Barend Gehrels
fd75d83fd1 [buffer][fix] fix output for generated linestrings with two equal points only
It now simplifies first and removes second point if necessary. Also it is
defensive such that generation is stopped if length is 0.
Including unit tests.
2014-10-24 12:36:22 +02:00
Barend Gehrels
e4cd46ac5d [buffer] support degenerate linestrings containing one point. In that
case point-buffer is applied. Including updated unit tests
2014-10-24 11:21:32 +02:00
Barend Gehrels
98d8c88372 [buffer][test] remove redundant index 2014-10-15 11:59:18 +02:00
Barend Gehrels
94bd840102 [buffer][test] make labels for turns optional, for good turns and for bad turns 2014-09-24 16:47:29 +02:00
Barend Gehrels
a0d7a260dc [buffer][test] add failing test for which there is not yet a solution.
It is related to colocated turns and sorting
2014-09-24 16:46:41 +02:00
Barend Gehrels
2c84bb4d49 [buffer] block turns instead of discarding them
This fixes case rt_u11
New result of recursive_polygons_buffer: 2 errors out of 510372
2014-09-24 10:36:15 +02:00
Barend Gehrels
e02c82623a [buffer] add new failing testcases (now 9 out of 500000 fail for miter) 2014-09-17 16:53:55 +02:00
Barend Gehrels
8de1b4da16 [buffer] fix comment 2014-09-17 16:52:19 +02:00
Barend Gehrels
c55e000eef [buffer] small changes in comments/test svg 2014-09-17 16:32:25 +02:00
Barend Gehrels
9298ac2a2c [buffer] fix intersection points on border, equal points should not be checked
and correct order in call to side strategy
This fixes case rt_u10
2014-09-17 16:30:03 +02:00
Barend Gehrels
e3130b2f39 [buffer][test] added new failing testcase rt_u10 2014-09-10 15:45:32 +02:00
Barend Gehrels
e6043d9a5c [buffer] fix cases where intersection point falls between robust piece
and non-robust original. We now check robust representions of originals
where this cannot happen
This fixes rt_u9
This obsoletes turn_in_input
2014-09-10 15:33:44 +02:00
Barend Gehrels
fcd0c5b768 [buffer] helper_points (formerly called helper_segments) are now optional
and we rescale/finish the piece on the fly and not in a separate call
2014-09-10 13:05:13 +02:00
Barend Gehrels
e0b82cd47f [test] enable rt_u8 case and change comments 2014-09-10 11:01:21 +02:00
Barend Gehrels
6fcdf246e0 [test] comment update 2014-09-10 10:34:43 +02:00
Barend Gehrels
9b5a8dfb2f [buffer][test] add testcase rt_u8, currently still failing 2014-09-03 17:54:17 +02:00
Barend Gehrels
95d794e218 [buffer] fix order when multiple turns are colocated on the same point.
This replaces get_relative_order which was not effectively used anymore and
(most probably) get_left_turns.
This fixes case rt_u7
2014-09-03 17:53:21 +02:00
Barend Gehrels
c271df6a8b Merge branch 'feature/buffer' into develop
Conflicts:
	test/algorithms/buffer/polygon_buffer.cpp
2014-09-03 11:42:30 +02:00
Barend Gehrels
5b42d85326 [buffer][test] add testcase for ticket 10412 (Olivier) 2014-08-30 11:54:57 +02:00
Barend Gehrels
c42aeb4447 [buffer][fix] fix neighbour check in calculating turns. This fixes ticket 10398 2014-08-27 12:27:57 +02:00
Barend Gehrels
12b61c6a0f Merge branch 'develop' into feature/buffer 2014-08-27 11:34:07 +02:00
Barend Gehrels
7a7d5935d6 [buffer][test] add failing ticket 10398 2014-08-27 11:32:33 +02:00
Barend Gehrels
1830208b74 [buffer][test] Add rt_u7 which is currently failing because of tripled IP,
needing get_left_turn info again. Added debug info
2014-08-10 19:21:21 +02:00
Barend Gehrels
f98549f82d [buffer][test] Minor change in comments/whitespace 2014-08-10 15:34:33 +02:00
Barend Gehrels
9c3ca1e69a [buffer][test] improve piece labelling on round joins 2014-08-10 15:32:46 +02:00
Barend Gehrels
a7764c1b9e [buffer][fix] use taxicab distance instead of comparable distance
This is faster and avoids overflows. This fixes rt_u6
2014-08-10 15:32:07 +02:00
Barend Gehrels
31abd20829 [buffer][fix] Distinguish between "within" and "within_near_offsetted"
The last one might be offsetted by 1 due to integer rounding. It is not
selectable as a starting point but may be used for traversal
2014-08-10 14:15:04 +02:00
Barend Gehrels
6df7738d3a [buffer][fix] Fix turns which were only on helper-segments, they can be discarded.
This fixes rt_u3 and rt_u4 where a false interior ring was generated
2014-08-10 12:49:37 +02:00
Barend Gehrels
468c3dd36a [buffer][test] clean up old comments/cases 2014-08-10 00:03:15 +02:00
Barend Gehrels
a46e2603d8 [buffer][fix] In rare cases an extra ring was traversed and created. Fixed, that ring is
discarded now. This fixes behaviour of assign_parents with positive-rings in positive-rings (when
check_for_orientation is true; normally (for overlay) it is false)

It also reverses a negative-only ring so fixes a linestring_buffer testcase.

For multi-polygon it fixes new testcase rt_u2 found by recursive-polygon-buffer test
2014-08-09 23:51:42 +02:00
Barend Gehrels
6cf72447d1 [buffer][test] remove unused variable 2014-08-09 23:33:15 +02:00
Barend Gehrels
e1fc427e30 [buffer][fix] Mark points in buffered areas as not startable instead of discarding them
Within can have in rare cases a rounding issue. We don't discard this
point, so it can be used to continue started rings in traversal. But
will never start a new ring from this type of points.

This fixes p17
2014-08-06 13:27:52 +02:00
Barend Gehrels
a999baa01e [buffer][test] Exclude failing tests (Aimes),
include succeeding test (O1)
avoid reporting (false) self-intersection (aimes120)
2014-07-27 20:39:46 +02:00
Barend Gehrels
27b95ee544 [buffer][test] increased tolerance for aimes test
Most of them now succeed, with exception of 6 cases
2014-07-27 18:50:43 +02:00
Barend Gehrels
a94d0ce415 [buffer][test] enabled field_sprayer test, added aimes-167 test
Both tests are disabled for flat-ends for the same reason: flat ends should
be intersected with helper-segments too
2014-07-27 18:49:25 +02:00
Barend Gehrels
76bebeee6c [buffer][fix] don't check within concave helper pieces 2014-07-27 18:12:04 +02:00
Barend Gehrels
9467d5d060 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-07-27 17:13:13 +02:00
Barend Gehrels
4d05c94b94 [buffer][test] count only if self IP's are reported (has_self_intersection does
additional checks)
2014-07-27 17:12:01 +02:00
Barend Gehrels
710a0e4308 [buffer][test] enhanced svg debug display 2014-07-27 17:11:29 +02:00
Barend Gehrels
feccd380ee [buffer][fix] Fix limit for consideration as continue, as it was too high
(for Aimes test or in general cases using lat long)
Including addition of unit test (aimes181)
2014-07-27 17:07:32 +02:00
Menelaos Karavelas
cea3a65e7e [test][buffer] remove used local typedef 2014-07-27 13:48:49 +03:00
Barend Gehrels
f3c000aadd [buffer][test] comment one test case now failing because of other rescaling factor 2014-07-23 16:05:36 +02:00
Barend Gehrels
6b29736b6c [buffer][test] added missing includes (that depend on Boost.Test) 2014-07-23 15:14:38 +02:00
Barend Gehrels
1fa87bcbba [buffer][fix] to get a proper rescale policy, the buffer distance must be added 2014-07-23 15:13:16 +02:00
Barend Gehrels
dd418dbc69 [buffer][test] catch exceptions per test and
remove skipped testcases
2014-07-23 13:33:37 +02:00
Barend Gehrels
04eeee1b56 [buffer][test] Display name of testcases with self-ips and
disable piece labels by default
2014-07-23 13:29:58 +02:00
Barend Gehrels
e4260a9445 [buffer][test] Extracted test-case for difference spike/continue case 2014-07-23 13:29:19 +02:00
Barend Gehrels
77b2723935 [buffer] make miter_limit flexibel and correct IP to exactly that limit 2014-07-20 16:38:32 +02:00
Barend Gehrels
03b6571555 [buffer][test] join/end strategies are now arguments, such that we can change
the default without changing the tests.
This only changes the parameter / involves many lines but nothing else is changed.
2014-07-20 15:27:24 +02:00
Barend Gehrels
0e77ef5342 [buffer] rename buffer_side to side_straight to make it consistent with other buffer strategies
and buffer is already part of the namespace
2014-07-20 10:52:48 +02:00
Barend Gehrels
0b635e342d [buffer] rename buffer_circle to point_circle to have it consistent with other strategies,
and buffer is already in the namespace. same for buffer_square -> point_square
2014-07-20 10:38:40 +02:00
Adam Wulkiewicz
d16a343c0a [buffer] Fix buffer_inserter() call in multi_point_buffer test
Function was moved to namespace bg::detail::buffer
2014-07-16 22:28:10 +02:00
Barend Gehrels
97fd8f5332 [buffer] move buffer_inserter to namespace detail::buffer, add overload using 5 strategies 2014-07-16 16:58:02 +02:00
Barend Gehrels
038253e8f5 [buffer] remove end_skip strategy 2014-07-16 15:21:11 +02:00
Barend Gehrels
61ed918240 [buffer] add side/circle strategies to include 2014-07-16 15:12:52 +02:00
Barend Gehrels
bac1ac66af [buffer] avoid having point types in strategies which can be deferred 2014-07-16 15:11:55 +02:00
Barend Gehrels
0f027b5ff9 [buffer] add buffer_circle strategy for points and multi-points, and pass
it all the way through the dispatches
2014-07-16 11:31:35 +02:00
Barend Gehrels
58fa94c897 [buffer][test] use Aimes to test simplify with ax strategy, optionally count number of self-ips 2014-07-16 10:48:27 +02:00
Adam Wulkiewicz
9cfee81a09 [geometry] Replace tabs with spaces 2014-07-08 02:27:17 +02:00
Barend Gehrels
b6b49f5308 [buffer] fix check of buffer_flat_end for inside 2014-07-06 20:22:04 +02:00
Barend Gehrels
da1323716a [buffer] Pass side strategy 2014-07-03 19:59:28 +02:00
Barend Gehrels
b637012bf3 [test] add bigobj flag for union/buffer 2014-06-28 13:22:32 +02:00
Barend Gehrels
7baf1a29e5 [buffer] We have to simplify the ring before to avoid very small-scaled
features in the original (convex/concave/convex) being enlarged
in a very large scale and causing issues (IP's within pieces).
This might be reconsidered later. Simplifying with a very small
distance will never be visible in the result,
if it is using round joins. For miter joins they are even more
sensitive to small scale input features, however the result will
look better.

A distance strategy can change behaviour (make larger - set simplify
distance to 0.0 to avoid simplification)

This fixes the parcel issue(s)
2014-06-25 13:32:42 +02:00
Barend Gehrels
7f3b509fb5 [buffer] use endcap strategy for spikes. Check jointype also (again)
for line-line intersection because it is based on buffered segments.
2014-06-24 22:48:04 +02:00
Barend Gehrels
9b6aa189bd [buffer] changes in includes/defines 2014-06-23 22:40:03 +02:00
Barend Gehrels
aa307b5ad2 [buffer] add join_selector and use it before generating the join.
This moves responsibility of generation to the calling code, removes it
from the join strategies. It also enables using the end-strategy for the
spikes
2014-06-23 22:39:29 +02:00
Barend Gehrels
5c3f1f2006 [buffer] fix limit which was too low for LatLong coordinates. Also fix in test
for tolerance which was too high. Added unit test
2014-06-22 19:54:13 +02:00
Barend Gehrels
b6ba959f7b [buffer][test] SVG enhancements 2014-06-22 19:50:06 +02:00
Barend Gehrels
b1bcc9c4dc [buffer] test - indentation, remove old comment 2014-06-22 16:11:58 +02:00
Barend Gehrels
2f6abfce3f [buffer] test: remove old code and instead add 3 parcels
which went wrong earlier or still have issues
2014-06-22 16:08:56 +02:00
Barend Gehrels
3628e85a25 [buffer] fix non-intersecting sides around concave points
there was no segment in between generated, therefore if the side-segments
did not intersect (e.g. donut_diamond in polygon_buffer.cpp unit test),
there was no intersection at all. Now a helper piece is generated and it
will intersect.
2014-06-22 15:12:40 +02:00
Barend Gehrels
7df029b176 [buffer] make buffer (miter, round) around spike possible
including unit testcase. For miters, the limit is enlarged (after
visual inspection of spike_simplex_miter)
2014-06-20 22:34:40 +02:00
Adam Wulkiewicz
05891db57a [test][buffer] Remove unused typedefs. 2014-06-20 00:00:55 +02:00
Adam Wulkiewicz
38afbb322f [test][buffer] Remove unused typedefs. 2014-06-19 23:57:01 +02:00
Barend Gehrels
c5de26945b [overlay] use uniform robust policy, this obsoletes zoom_to_robust 2014-06-19 19:10:28 +02:00
Barend Gehrels
76a56c787c [buffer] exclude failing testcase for MSVC 2014-06-18 16:51:13 +02:00
Barend Gehrels
dadfe91378 [buffer][test] use other robust_point for counting dupplicate points 2014-06-18 14:08:05 +02:00
Barend Gehrels
0194072516 [buffer][test] optinally skip self-intersection check 2014-06-18 14:07:21 +02:00
Barend Gehrels
84d240ee9d [buffer][test] visit collection twice for mapping 2014-06-18 14:02:18 +02:00
Barend Gehrels
1e7a631379 [buffer] rename check_original to turn_in_input
comparable to point_in_geometry.
This removes multi_buffer_inserter
2014-06-14 11:39:49 +02:00
Barend Gehrels
e00e307f2f [buffer] remove unused functionality 2014-06-14 11:01:42 +02:00
Barend Gehrels
cee0903f2d [buffer] Remove buffer_piece_collection_with_mapper
this was a debugging tool. It is now replaced by a visiting policy (like
in partition), and implemented in the unit test itself
2014-06-14 10:57:59 +02:00
Barend Gehrels
fdd983ce72 [buffer] Changes in (folder)locations of strategies, and
moved buffer_side_selector and piece_type used by strategies.
2014-06-13 21:30:53 +02:00
Barend Gehrels
c96d6394a9 [buffer] update include guards/copyright info 2014-06-13 20:45:34 +02:00
Barend Gehrels
31af14453a [buffer] Move from extensions to algorithms/detail 2014-06-13 20:26:33 +02:00