507 Commits

Author SHA1 Message Date
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
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
Adam Wulkiewicz
09ab2351f9 [relate] Add support for rings with no turns and some special cases in A/A.
Add support for:
- single geometries for which no turns were generated
- rings for which no turns were generated
- i/i and u/u turns

TODO: some cases where turns are generated for the intersection of a "real" hole and a "fake" hole (self-touching exterior ring).
2014-04-06 02:52:24 +02:00
Adam Wulkiewicz
47747938a6 [relate] add for now commented out ignoring of u/u turns in A/A, add some tests 2014-04-04 01:16:27 +02:00
Adam Wulkiewicz
fd5bd13705 [relate] added more tests for non-simple A/A with holes 2014-04-04 00:22:06 +02:00
Adam Wulkiewicz
8cb6366bb4 Merge branch 'develop' into feature/relate 2014-04-03 12:11:22 +02:00
Menelaos Karavelas
91d094673b Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops 2014-04-03 13:05:16 +03:00
Adam Wulkiewicz
ca0c8b97df [get_turns] Fix turns dumplication for L/L.
Change the ignoring check calculation in get_turn_info_for_endpoint.
Add additional parameters to the second version of collinear_opposite<>::apply() defining if the pk and/or qk are valid (in other words current segment is NOT the last one).
Also make ignoring check for last endpoint in L/A more clear.
2014-04-03 11:58:50 +02:00
Menelaos Karavelas
b88b4e3d71 [set ops] re-arranged code a bit; moved tests from algorithms/detail/overlay/linear_linear.hpp to currect branch 2014-04-03 03:43:11 +03:00
Menelaos Karavelas
be2795a6f2 [set ops] add missing include 2014-04-03 02:51:16 +03:00
Menelaos Karavelas
5be2682000 [set ops] rename test_set_ops_common.hpp to test_set_ops_linear_linear.hpp 2014-04-03 02:50:30 +03:00
Menelaos Karavelas
4295f0bcf7 [set ops] add more examples with duplicate points and zero length linestrings 2014-04-03 00:36:44 +03:00
Menelaos Karavelas
df33e8a92a [set ops] modify way of calling multilinestring_equals (due to changes in multilinestring_equals) 2014-04-03 00:08:11 +03:00
Menelaos Karavelas
a806cd0419 [set ops] change macro used for debugging 2014-04-03 00:04:50 +03:00
Menelaos Karavelas
b0e2521fa1 [set ops] allow equality for multilinestrings with duplicate linestrings 2014-04-03 00:02:13 +03:00
Menelaos Karavelas
4ceea13cf4 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops 2014-04-02 21:47:09 +03:00
Adam Wulkiewicz
2f9f454334 [get_turns] fix for MultiLinestrings containing Ls with equal points
In this case no sections were generated for those "empty" Linestrings but if there were some sections already generated they could be marked as last_non_duplicated.
2014-04-02 20:21:32 +02:00
Adam Wulkiewicz
47da24242c [relate] add code ignoring i/i turns, comment out some unneeded code in areal_areal 2014-04-02 20:14:34 +02:00
Adam Wulkiewicz
8c700e9f31 [relate] handle non-simple Polygons in A/A, NOT FULLY SUPPORTED
Not supported: i/i, non-intersecting rings
2014-04-02 14:10:36 +02:00
Menelaos Karavelas
598b6a51cf Merge branch 'feature/relate' of https://github.com/boostorg/geometry into feature/setops 2014-04-02 11:09:17 +03:00
Menelaos Karavelas
39a521934d [intersection] guard print-outs within a #ifdef/#endif block 2014-04-02 10:31:43 +03:00