594 Commits

Author SHA1 Message Date
Menelaos Karavelas
9d9f1241be [test][distance] add test case for distance between boxes with integer coordinates 2014-05-13 10:54:35 +03:00
Menelaos Karavelas
aba739439b [test][distance L/A] add test case for segment-box distance, where the segment degenerates to a point 2014-05-09 23:07:00 +03:00
Menelaos Karavelas
5c5d42341c [test][distance] move unit test code from test/multi/algorithms/multi_distance.cpp to test/algorithms/distance.cpp;
delete test/multi/algorithms/multi_distance.cpp;
2014-05-09 22:25:45 +03:00
Menelaos Karavelas
a7d02e0391 [distance][test] enable segment-segment distance computations 2014-05-09 00:20:24 +03:00
Menelaos Karavelas
8a23c01061 [test][distance] add common code for distance unit tests 2014-05-08 15:02:49 +03:00
Menelaos Karavelas
319f9a7b83 [test][algorithms] add new unit tests for distance in Jamfile 2014-05-08 13:46:31 +03:00
Menelaos Karavelas
302c25280d [distance] add unit tests for all geometry combinations 2014-05-08 13:45:10 +03:00
Adam Wulkiewicz
dffd4a4f64 Merge pull request #22 from mkaravel/feature/setops
Feature/setops
2014-05-07 11:58:11 +02:00
Adam Wulkiewicz
8eefe4d3ba [equals] Add missing copyright info 2014-05-06 19:00:28 +02:00
Adam Wulkiewicz
8bb1d98aaf [equals][relate] Add equals() Ls/MLs, MLs/MLs. Fix relate(L/L).
Also use relate() in equals(Ls,Ls) because collect_vectors() approach doesn't work properly for non-simple or even opposite/reversed Linestrings.

Fix how 'u' is handled in relate() in the edge case when there are more 'u' operations in the same point, also when 'u' is on the first endpoint followed by 'i' on the same IP.

Add tests for equals() and relate().
2014-05-06 16:18:05 +02:00
Menelaos Karavelas
321d12c56a [test][set ops L/L] add two more test cases with spikes (examples sent by Adam on the BG mailing list) 2014-05-05 14:45:26 +03:00
Menelaos Karavelas
606295db4a [test][set ops L/L] add more test cases for difference and intersection of linear geometries; the geometries in these test cases have spikes 2014-05-05 12:08:36 +03:00
Menelaos Karavelas
a73ce5fbd6 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops 2014-05-05 10:23:45 +03:00
Adam Wulkiewicz
aea578c602 [get_turns] Fix turn operation is_collinear values for L/L and L/A.
is_collinear for the first endpoint of L is now unified and is always equal to FALSE.

Add tests of is_collinear. It is tested by passing 4th and 5th char in the expected turn string (= means collinear, + means non-collinear), e.g. "mxi=+" for L/L means that L1 ends in this IP and was collinear before meeting the Point, L2 is going "inside" intersection and wasn't collinear before.

Replace method_and_operation_replacer with turn_transformer.
2014-05-04 22:31:13 +02:00
Adam Wulkiewicz
47d581304e [relate][test] Enable tests for 2-Point degenerated Linestrings 2014-05-03 13:57:08 +02:00
Adam Wulkiewicz
8775e65b20 [get_turns] Add tests for t-spikes vs collinear internal pt for L/L 2014-05-03 04:11:22 +02:00
Adam Wulkiewicz
7192e6cbf6 [get_turns] Add more tests for t-spikes for L/L 2014-05-03 04:02:44 +02:00
Adam Wulkiewicz
d4d7bf9657 [get_turns] Fix the generation of some special cases of touch-spike-turns for L/L and L/A 2014-05-03 02:40:21 +02:00
Adam Wulkiewicz
288c7e6980 [get_turns] Fix for L/L spike vs. endpoint for the same direction segments. Add failing test cases for spikes touching internal point 2014-05-01 12:37:54 +02:00
Menelaos Karavelas
c2bf14e1c3 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops 2014-04-30 22:05:09 +03:00
Adam Wulkiewicz
566957de29 [test][get_turns] Add failing test cases for L/L 2014-04-30 12:57:39 +02:00
Menelaos Karavelas
d7c6c39182 [test][difference L/L] add a couple more test cases of geometries with spikes 2014-04-30 12:09:37 +03:00
Menelaos Karavelas
f605bbc7d1 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops 2014-04-30 01:27:23 +03:00
Adam Wulkiewicz
d682a74c1b [extensions/dissolve] Fix compilation error - pass segment_ratio<> to traversal_turn_info<>. Remove mistankenly commited test change 2014-04-29 13:19:11 +02:00
Adam Wulkiewicz
d44e1a1e01 [get_turns][extensions/dissolve] Fix VS compilation error (STATIC_ASSERT + template). Add not_implemented<> info to extensions/dissolve. 2014-04-29 13:06:04 +02:00
Adam Wulkiewicz
2349c817e2 [get_turns] Fix turns generation for double collinear spikes.
Add check if a spike Point is realy an IP.
2014-04-28 12:21:06 +02:00
Menelaos Karavelas
82ce56765d [test][set ops] separate test with duplicate points as different test cases; add test cases with spikes; 2014-04-28 12:07:56 +03:00
Menelaos Karavelas
f25e0c2d7e [test][set ops] separate tests with multiple points as different test cases 2014-04-28 12:07:08 +03:00
Menelaos Karavelas
333cfdccfb [turns] rename less functor from less_seg_dist_other_op to less_seg_fraction_other_op (to indicate that the fraction comparison is now used) 2014-04-28 10:29:45 +03:00
Adam Wulkiewicz
7615ac3392 [get_turns] Add template parameters to side_calculator<> defining types of all points.
It is possible to use side_calculator<> with Points of various types without the conversion.
2014-04-26 15:27:53 +02:00
Adam Wulkiewicz
b682b8996b [test] Add intersection test for 1-3d boxes 2014-04-26 14:23:35 +02:00
Adam Wulkiewicz
1da9113046 [relate][get_turns] Support spikes for Linear in relate(L/A). Fix errors in get_turns for L/L and L/A.
relate_linear_areal:
handle non-endpoint x-c turns pair generated for a collinear spike.

relate/follow helpers:
fix turn_on_the_same_ip to use fraction instead of dimension.

get_turns:
L/L and L/A - use base_turn_handler::assign_point() to set fractions properly for collinear-opposite spikes.
L/A - fix the condition in calculate_spike_operation() used to check if a spike goes into the interior or exterior.
2014-04-24 23:49:36 +02:00
Adam Wulkiewicz
b4b902ac85 [get_turns] Add the support for spikes for Linear Geometry in get_turns_linear_areal 2014-04-24 18:41:37 +02:00
Adam Wulkiewicz
85b7589bb1 [geometry] Merge develop with feature/relate, resolve conflicts 2014-04-24 00:37:46 +02:00
Adam Wulkiewicz
babe91b210 [relate][get_turns] Add the support for spikes in relate(L/L). Fix errors in get_turns L/L.
Some asserts are invalid when 'x' operation can be somewhere in the middle (boundary_checker).
boundary_checker::is_boundary() function removed since it's not used anywhere.
Errors in get_turns are related to the handling of touches turn. t,i/i must be handled and is_collinear must be set in operations for spikes.
2014-04-23 23:43:00 +02:00
Adam Wulkiewicz
973e5a58bc [get_turns] Add handling of spikes for L/L for endpoints 2014-04-23 22:09:00 +02:00
Adam Wulkiewicz
db318225f3 [touches] Add the implementation for Box/Box 2014-04-23 16:33:43 +02:00
Adam Wulkiewicz
e351063b9d Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-04-23 14:53:11 +02:00
Adam Wulkiewicz
f9c51246c2 [touches][relate] Replace use_relate with relate_base<> for automatic support generation. Also implement static_mask_touches_type<> as 2 parameter template. 2014-04-23 14:53:04 +02:00
Barend Gehrels
2bfede47f3 updated tests due to changes in rescale_to_integer branch 2014-04-23 13:30:00 +02:00
Barend Gehrels
dc2993ae3a Merge branch 'develop' into rescale_to_integer
Conflicts:
	include/boost/geometry/algorithms/detail/relate/turns.hpp
	include/boost/geometry/algorithms/touches.hppq
2014-04-23 13:26:59 +02:00
Adam Wulkiewicz
9ee78e4686 [get_turns] Handle m spike for L/L, add more tests 2014-04-23 12:53:36 +02:00
Adam Wulkiewicz
3fc8acc3f9 [get_turns] Add the generation of spike IPs for L/L non-endpoint touching and collinear-opposite segments 2014-04-22 16:11:04 +02:00
Barend Gehrels
c3bd204708 [remove_spikes] Fixed polygons consisting only of a spike.
If so, spike is now removed and only one point is left.
2014-04-21 19:44:42 +02:00
Adam Wulkiewicz
12797dbfb7 [get_turns][relate] Handle spikes for L/L !opposite collinear and equal turns.
2 Turns are generated for a spike, one with operation_blocked the second one with operation_intersection.
relate_linear_linear is not working yet, for now it is only ensured that boundaries will not be checked for those turns, which would result with assert failure.
TODO: opposite collinear and equal, touches c/c and endpoints intersecting a spike + the adaptation of relate(L,L).
2014-04-20 01:36:08 +02:00
Barend Gehrels
2077f81164 Merge branch 'rescale_to_integer' of github.com:boostorg/geometry into rescale_to_integer 2014-04-19 20:01:16 +02:00
Barend Gehrels
d54ced58d4 Use smallest of the segment_ratios to calculate the intersection point,
w.r.t. either segment a or segment b.
This results in small differences in the unit test for difference, which are
checked visually and/or compared with other output. In these cases it is
an enhancement
2014-04-19 19:59:14 +02:00
Adam Wulkiewicz
0d01847701 [relate][test] Add tests for consistency check (overlapping and Point-sized Lss) 2014-04-18 14:58:29 +02:00
Adam Wulkiewicz
a99fda5362 [relate] Fix L/L : handling of MLs containing overlapping, collinear Linestrings.
It's also consistent with the behavior for Point-like Linestrings.

E.g. some MultiLinestring may have boundary and interior in the same point:

Ls1:
  |--------------|
MLs2:
  |------------|
|------|

In this case the current version of the algorithm will set BB=0 and BI=0.
2014-04-18 14:43:07 +02:00
Adam Wulkiewicz
89955b787b [get_turns][relate] Handle Point-size Linestrings
Point-size Linestring is a linestring containing exactly 2 equal points.

Add generation of positions for degenerated turns, non-degenerated segments in get_turns_linear_linear.
The code should be polished after the addition of info about the degeneration of segments into Turns.
2014-04-18 02:22:33 +02:00