667 Commits

Author SHA1 Message Date
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
Adam Wulkiewicz
a0d03ed4cf [test] Divide relate() test into several smaller ones.
The intention is to prevent creation of too big files in MinGW.
Move predefined Geometries for relops from test_relate.hpp to predef_relop.hpp
Move test_geometry<> defined in relate.cpp to test_relate.hpp
2014-04-17 13:55:28 +02:00
Adam Wulkiewicz
b87400d822 [test][within] Divide within() test into several smaller files.
The intention is to prevent creation of too big files in MinGW.
2014-04-17 13:30:51 +02:00
Menelaos Karavelas
14df2155d2 [test][set ops] remove linking dependency with Boost.Test for P/P and L/L unit tests for union 2014-04-16 12:51:07 +03:00
Barend Gehrels
d3876c017f Removed dependancy on linking with Boost.Test, using header only 2014-04-16 11:18:46 +02:00
Adam Wulkiewicz
4a4dbf4512 [relate][touches] Implement touches() for L/L and L/A using relate(), fix error in L/A.
Enable touches() for other pairs of Geometries.
Implement ready-to-use in the implementations of relate() less comparators of operations.
Change the less comparator for L/A.
Fix: handling of the entry/interior for some turn with MultiID which comes before union for some other turn with different MultiID.
Finish the support for boost::mpl::vector<> as a complex StaticMask.
2014-04-15 16:28:35 +02:00
Menelaos Karavelas
70a5fafba9 [test][algorithms][set ops] replace BOOST_CHECK by BOOST_CHECK_MESSAGE and in case of error output the two geometries, the expected and the computed results 2014-04-14 10:36:12 +03:00
Adam Wulkiewicz
0631d4ca52 [test][touches] remove invalid #include in multi_touches test 2014-04-12 03:19:11 +02:00
Adam Wulkiewicz
d7b7df8614 [within][covered_by] Add the support for Areal geometries for within() and all OGC geometries for covered_by().
Also the specializations for Multi Geometries was moved from geometry/multi/algorithms to geometry/algorithms. They're now in one place.
The default strategies are point_in_point for PointLike, winding<> for PointLike/AnyGeometry, relate for L/L, L/A and A/A.
Point/MultiGeometry version now uses point_in_geometry directly which implements the correct behavior - this fixes the wrong handling of MultiLinestrings (boundary point of a Linestring may not be a boundary point of a MultiLinestring which contains it).
2014-04-12 01:40:27 +02:00
Menelaos Karavelas
4b7549a39a [test][algorithms] do linking of the unit test framework on a per-unit-test basis 2014-04-11 00:04:40 +03:00
Menelaos Karavelas
b9ea14b76d [test][algorithms] modify Jamfile to work with unit tests for P/P and L/L set ops (need to require that the unit test framework library is available for linking) 2014-04-10 23:39:10 +03:00
Menelaos Karavelas
b88dbfb0cd [test][get_turns] replace AssignPolicy by assign_policy 2014-04-10 15:46:43 +03:00
Menelaos Karavelas
b03318a647 [test] fixed header macros for the from_wkt.hpp file 2014-04-10 15:24:46 +03:00
Menelaos Karavelas
63365a8208 [test][set ops] clean up code; finish up unit test for L/L union; 2014-04-10 15:13:02 +03:00
Menelaos Karavelas
6646470a55 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops-develop 2014-04-10 10:03:43 +03:00
Menelaos Karavelas
fc6ae619ac [test][algorithms] add tests for set operations of L/L and P/P geometries; update copyright header; 2014-04-10 09:25:30 +03:00
Menelaos Karavelas
b8765e195a [set ops] added missing include (fstream) 2014-04-10 08:46:20 +03:00
Menelaos Karavelas
caadd6ce00 [set ops] replace included unit test by unit test 2014-04-10 08:45:38 +03:00
Adam Wulkiewicz
2753f5e30a [crosses] add missing files required by bg::crosses() algorithm 2014-04-09 01:34:34 +02:00
Adam Wulkiewicz
d3f8ea2f6b [crosses] add bg::crosses() algorithm 2014-04-09 01:33:37 +02:00
Adam Wulkiewicz
c1d4a09ec7 [overlaps] add support for P/P, L/L and A/A to overlaps() 2014-04-09 00:23:26 +02:00
Adam Wulkiewicz
1cb4f1f013 [relate] add tests for Poly/MPoly, CCW and open Polygons 2014-04-08 23:40:54 +02:00
Adam Wulkiewicz
d60b0e7cc4 [relate] add tests for Polygons with rings for which IPs were not generated 2014-04-08 15:49:15 +02:00
Adam Wulkiewicz
9e00853dfa [relate] fix: add missing handling of single geometries for which no IPs were generated (exterior ring inside, hole outside) 2014-04-08 15:33:18 +02:00
Adam Wulkiewicz
d76c94d643 [relate] add optimization for L/L ommitting parts of the algorithm if the result mustnot be updated 2014-04-07 23:52:40 +02:00
Adam Wulkiewicz
e7e0083428 [relate] Add optimization to A/A skipping parts of the algorithm if it's not possible to change the final result.
Add may_update() funcionality which may be used if it's possible to change the result for the specified matrix fields and overlap dimension.
Initialize flags in no_turns_aa_pred and uncertain_rings_analyser with values calculated using this functionality.
Add manual checks around the parts of areal_areal::apply() where IPs are sorted and analysed.
2014-04-07 14:18:34 +02:00
Adam Wulkiewicz
8c2ee6152a [relate] Fix wrong type in interrupt_policy for A/A.
Add tests for MLs/MLs, Ring/Poly, Ring/Ring.
2014-04-07 01:30:05 +02:00
Adam Wulkiewicz
7bde891d7a [relate] Add the support for IPs generated for "real" and "fake" holes.
Rename turns::less_seg_dist_op<> to relate::turns::less<>
It now takes the Comp defining how operations are sorted if segment and distance are equal.
Add 2 different operations comparators for L/L,L/A and A/A.
Add tests.
2014-04-07 01:08:24 +02:00