Commit Graph

590 Commits

Author SHA1 Message Date
Barend Gehrels
d140a44bf3 [geometry] Fixed remaining unit test w.r.t. rescale policies 2014-02-12 14:13:25 +01:00
Barend Gehrels
6900fdd46b [geometry] Fixed most of the remaining unit-tests
w.r.t. rescale changes
2014-02-12 12:38:48 +01:00
Barend Gehrels
8d202fd319 [geometry] Verified compatibility with/without robust rescaling
We now have the define BOOST_GEOMETRY_NO_ROBUSTNESS to avoid rescaling
(probably should be renamed)
2014-02-12 11:45:02 +01:00
Barend Gehrels
f3147001b5 [geometry] Splitted file rescale.hpp into different files:
segment_ratio_type
robust_point_type
no_rescale_policy
2014-02-11 23:08:32 +01:00
Barend Gehrels
f6ce9e2c91 [geometry] Moved robustness policies to policies folder
Also added unit-test to develop/test behaviour of different policies
2014-02-09 19:29:01 +01:00
Barend Gehrels
5c8d34ccd3 [geometry] added short int as a test-type 2014-02-06 22:25:38 +01:00
Barend Gehrels
7c6ba53e59 [geometry] Added RescalePolicy (to get SegmentRatio) to strategy_intersection
Some creations/instances of rescale policy had therefore to be moved
2014-02-05 14:06:00 +01:00
Barend Gehrels
f10b2d6b92 [geometry] added boost::long_long_type to test-code debug-string 2014-02-05 14:02:35 +01:00
Barend Gehrels
336f73e276 [geometry] made SegmentRatio as a template argument for turn_operations,
and therefore for turn_info and many more
2014-02-05 11:36:42 +01:00
Barend Gehrels
41f9c94e31 [geometry] Fixed unit test for collinear intersections w.r.t new parameters 2014-01-19 22:33:58 +01:00
Barend Gehrels
ecd0cd8499 [geometry] Reverted changes earlier in unit test, this appeared to be buggy 2014-01-19 22:27:37 +01:00
Barend Gehrels
95bb6372ab [geometry] Added testcase for ticket #9563 which was already fixed in this branch
Rescaling to robust type already fixed this.
2014-01-18 18:14:51 +01:00
Barend Gehrels
e71c0c92e2 [geometry] Uncommented various testcases for traverse unit test
partly related to rescaling
2014-01-17 20:05:46 +01:00
Barend Gehrels
175032c841 [geometry] Integer coordinates are now not rescaled
which fixes corresponding tests
2014-01-17 19:58:31 +01:00
Barend Gehrels
fc681ba236 [geometry] fixes in unit tests w.r.t. rescale policy 2014-01-17 18:53:29 +01:00
Barend Gehrels
75c1010ef1 [geometry] Fixed multi testcases w.r.t. rescaling to robust 2014-01-16 19:34:02 +01:00
Barend Gehrels
f61a9da709 [geometry] Fixed testcases for overlay w.r.t. rescale to integer 2014-01-16 19:03:45 +01:00
Barend Gehrels
417b4d9450 [geometry] Pass rescale policy for get_turns test 2014-01-16 18:46:24 +01:00
Barend Gehrels
90b75b7640 Merge branch 'develop' into rescale_to_integer 2014-01-16 14:19:01 +01:00
Barend Gehrels
a7ca995be5 [geometry] Changes in debug-information 2014-01-16 14:12:37 +01:00
Bruno Lalande
cfba8409c5 Made transform variant-aware. 2014-01-09 09:09:56 +00:00
Bruno Lalande
efd1540b1a Change test_transform_point() to use check_transform(). 2014-01-08 22:36:49 +00:00
Bruno Lalande
be9341df70 Split test_transform_linestring into test/check (in preparation to testing variants). 2014-01-08 17:59:52 +00:00
Bruno Lalande
3019f29a5b Fixed test issue - the test was comparing out1 with itself rather than out2, and started failing when corrected because inappropriately implemented for CS transformations. 2014-01-08 17:54:17 +00:00
Barend Gehrels
5f87dfcd3b [geometry] Unit test traverse, added debug info 2014-01-08 13:51:49 +01:00
Barend Gehrels
831302112e [geometry] Added testcases or changed precisions in a few cases 2014-01-08 13:51:19 +01:00
Bruno Lalande
1d561e58bd Merge branch 'feature/variants' into develop 2014-01-05 17:10:40 +00:00
Bruno Lalande
8d58aaf8b9 Made touches (1 param version) variant aware. 2014-01-05 15:54:14 +00:00
Bruno Lalande
87a5a242f4 Made touches (2 params version) variant aware. 2014-01-02 09:34:31 +00:00
Adam Wulkiewicz
352996aa2e [geometry] added tests for intersects(Ls,Ls) for linestrings with colinear segments 2013-12-27 20:23:33 +01:00
Bruno Lalande
4919e00e2d Made simplify variant-aware 2013-12-24 22:15:15 +00:00
Barend Gehrels
b889923619 [geometry] Take care that FP ratio (which is still used) is between 0-1 too.
If not we take the robust ratio.
This fixes case ticket_9081_15 where the intersection point was far outside
the belonging segment (causing a new spike)
2013-12-22 14:16:15 +01:00
Barend Gehrels
1a1cb4cff0 [geometry] Moved debug string 2013-12-22 14:14:37 +01:00
Barend Gehrels
9cd79d8033 [geometry] Instead of (non-rescaled) append, we clean rescaled dups afterwards.
We don't do it on the fly to avoid additional rescaling, it is done only once per point
This also changes occasionally some number-of-points in testcases (now more cleaned)
2013-12-22 14:12:40 +01:00
Barend Gehrels
e871436e30 [geometry] Slightly increased tolerance for the r.e.s. test 2013-12-22 10:56:49 +01:00
Barend Gehrels
0333e7c313 [geometry] replaced boost::rational with segment_ratio which is more specialized for our needs.
segment_ratio contains specific methods (on a segment the ratio is [0..1]) and
can be based on double or float too (Boost.Rational cannot do that).
Boost.Rational is still used under the hood for comparisons (which will be
made more efficient later)
2013-12-21 17:35:44 +01:00
Barend Gehrels
b00311f502 [geometry] Removed (need for) arrangment and moved disjoint.
Disjoint is now based on ratios too. All is now based on ratios, greatly
simplifying the original code with many lines and conditions.
2013-12-20 19:06:05 +01:00
Barend Gehrels
e0d9036aef [geometry] removed segment_equal, now all collinear go to one fuction.
Function now renamed to segments_collinear, and the other to segments_crosses

We calculate opposite now only in "direction", where it is used to pass through.
That one also checks on equality

Test 5103 now (or with previous action for touches) also passes again.
2013-12-20 18:50:08 +01:00
Adam Wulkiewicz
3f7ef7b739 [geometry] added within(Ls, Ls) tests for overlapping linestrings 2013-12-20 01:41:35 +01:00
Adam Wulkiewicz
907a260b01 [geometry] added within(Ls, Ls) 2013-12-20 01:28:32 +01:00
Barend Gehrels
e3893d31ea [geometry] Modified #clips, caused by fix in touch
(note: this was modified to 4 in 9a9efcff89,
18 dec 19:19:10 so this is effectively a reversal)
2013-12-19 22:43:26 +01:00
Barend Gehrels
4a5b85c870 [geometry] Collinear touch now also uses new unified method
This fixes the holes_intersect_and_touch case
NOTE: method should now be renamed, not ...two_intersection_points
2013-12-19 22:38:52 +01:00
Barend Gehrels
9a9efcff89 [geometry] Work in progress: factor (rational) instead of distance
This is a large commit. It replaces enriched.distance with factor. Factor
is based on integer calculations, calculated in cart_intersect, from the
passed robust points, so always trustable.

We had to do this because without certain tests failed because of FP
problems with distance (calculated with FP).

This commit also greatly simplifies relate_collinear, where most things and checks
are replaced by simple unified calculations. This is also based on robust
fractions (but could have been done earlier).

Many (but not all) testcases commented in previous commit are now uncommented
again, they now work thanks to the fractions. There are also testcases
uncommented which now work correctly using clang/Linux

This commit breaks compiling disjoint (because of rescale), and running buffer
(also because of rescale), and some more (probably all because or rescaling),
this has to be fixed soon after.
2013-12-18 19:19:10 +01:00
Adam Wulkiewicz
2b2ceadfc6 [geometry] fixed within(Box, Box) for Boxes with overlapping boundaries - OGC conformance 2013-12-16 00:42:15 +01:00
Adam Wulkiewicz
8f5aa8f236 [geometry] 2-parameter touches() properly dispatched for non-areal geometries, fixed sub_geometry::get() for multi geometries - const correctness 2013-12-15 03:43:07 +01:00
Barend Gehrels
107621943d [geometry] Use robust determinant for comparisons
This breaks one extra testcase which should be verified later
2013-12-14 19:49:35 +01:00
Barend Gehrels
c173233efa [geometry] Propagated rescale_policy further / from earlier phase 2013-12-14 19:45:21 +01:00
Barend Gehrels
ff7cb5c21e Merge branch 'develop' into rescale_to_integer 2013-12-14 13:38:28 +01:00
Barend Gehrels
d988e1ac93 [geometry] Work in progress: rescaling to robust-type
A robust type is integer for float/double. The rescaled points will only
be used for side-information and equality and distance-comparisons, not
to calculate the intersection points themselves.
Currently the code is #ifdefed
2013-12-14 13:25:46 +01:00
Adam Wulkiewicz
a238da019b [geometry] added touches(Ls, Poly), added details for other combinations of linear-areal geometries 2013-12-14 04:01:32 +01:00