Commit Graph

8536 Commits

Author SHA1 Message Date
Menelaos Karavelas
a69456a7e3 [algorithms][is_valid] check if the coordinates of a geometry are valid or not;
coordinates are considered invalid if they are off floating point type and either
NaN or infinite;
2015-11-06 12:16:07 +02:00
Menelaos Karavelas
97bb918a38 [test][algorithms][is_simple] add test cases involving the empty linestring,
the empty polygon and empty multi-geometries; these test cases are related to
Boost.Trac tickets 11709 and 11710;
2015-11-05 15:03:40 +02:00
Menelaos Karavelas
80c706df39 [algorithms][is_simple] patch the is_simple algorithm to address Boost.trac tickets
11709 and 11710;

Ticket 11709 (is_simple segfault): modify the is_simple algorithm to check a linestring
for emptiness; if an empty linestring is discovered, return false; the actual return
value does not really matter as empty linestrings are considered as invalid, which means
that the behavior of is_simple for empty linestrings is undefined; on the other hand,
we do want to avoid segfaults, which is achieved with the patch; the same approach has
been applied to emtpy rings, and as a result to empty polygons;

Ticket 11710 (empty geometry logic): modify the behavior of the is_simple algorithm with
respect to empty multi-geometries; the old behavior was considering empty multi-geometries
as non-simple, whereas the current behavior is the opposite; this change has been made in
order to be consistent with the fact that empty multi-geometries are considered as valid;
2015-11-05 14:56:18 +02:00
Menelaos Karavelas
dd5773a40d [test][algorithms][sym_difference] fix call to test_difference (due to new
function prototype that takes as argument a ut_settings object)
2015-11-04 16:23:57 +02:00
Barend Gehrels
cd6bfc54d4 [colocations] extract code to separate function 2015-11-04 13:22:41 +01:00
Barend Gehrels
2cf781aa68 [test] add testcase for which is failing for intersection. This is the
inverse testcase for difference (which is also failing and which is why it
is added). To be fixed.
2015-11-04 12:36:16 +01:00
Barend Gehrels
312cbd92d4 [test] added correct expectation values in failing tests 2015-11-03 20:47:30 +01:00
Barend Gehrels
057467f415 [test] test all types for traverse 2015-11-03 20:26:52 +01:00
Barend Gehrels
c7f8de6632 [test] add testcase for #10661, still failing w.r.t. validity in second stage.
To enable scenarios like this, let unit test return WKT
2015-11-01 17:33:21 +01:00
Barend Gehrels
99eeec0d1c [test] enable #11676 (still showing validity should be tested too)
and don't remove spikes by default
2015-11-01 17:03:49 +01:00
Barend Gehrels
9fd8d1643f [test] remove testcode 2015-11-01 16:59:09 +01:00
Barend Gehrels
dc941d27b0 [test] enable test #11674, still showing that validity should be checked
too. sym difference is still failing
2015-11-01 16:55:38 +01:00
Barend Gehrels
adb2cccdd7 [test] move bug 21155501 to difference_multi and test it the normal way,
still showing that validity should be checked too
2015-11-01 16:54:25 +01:00
Barend Gehrels
a98772cba0 [test] remove duplicate test cases #10658 and #11121 now that
validity is tested for them in the normal flow
2015-11-01 16:30:32 +01:00
Barend Gehrels
e939bf8e83 [test] add settings to difference to test for validity and
conditionally remove spikes
2015-11-01 16:24:39 +01:00
Barend Gehrels
44372ca32e [test] harmonize names for define 2015-11-01 13:44:42 +01:00
Barend Gehrels
29e1595e3f [test] added failing test cases for tickets #11674, #11676 2015-11-01 13:39:41 +01:00
Barend Gehrels
50c7e922d4 [test] extract areal_linear from difference_multi into separate ut 2015-11-01 13:19:52 +01:00
Barend Gehrels
c3b23647eb [test] extract areal_linear from difference.cpp into separate ut 2015-11-01 12:56:21 +01:00
Barend Gehrels
a2d2d4f58d [test] remove overload with percentage, only used once and now
supported by ut_settings
2015-11-01 12:27:08 +01:00
Barend Gehrels
94dc52a931 [test] add test case for ticket 10803 and added code to test for validity 2015-11-01 12:17:45 +01:00
Barend Gehrels
7ee6bd99b1 [buffer] prefix traits::detail namespace 2015-11-01 11:17:32 +01:00
Barend Gehrels
4327b0cb35 [difference][test] add currently failing testcase 2015-11-01 11:15:40 +01:00
Barend Gehrels
8f8b7bdfb1 [test] add testcase for similar situation (interior ring touches exterior
ring)
2015-11-01 11:14:58 +01:00
Barend Gehrels
7d2b3b6ba2 [test] fix traverse_ccw w.r.t. enrich_intersection_points 2015-10-31 22:46:52 +01:00
Barend Gehrels
085d641dab [difference] fix colocations 2015-10-31 20:06:39 +01:00
Barend Gehrels
c1aeab008b [enrich] add overlay_type template parameter
which will be used later
2015-10-31 19:35:18 +01:00
Barend Gehrels
a9277926fb [test] move wkt's to headerfile 2015-10-31 19:08:54 +01:00
Barend Gehrels
e764179a41 [test] update traverse unit test, using overlay_type instead of
operation_type
2015-10-31 19:06:26 +01:00
Barend Gehrels
d6b7e052ba [union] fix new case #80 to discard i/i turn of interior ring with
interior ring, in case of a colocation
2015-10-31 18:53:55 +01:00
Barend Gehrels
cbd431a65a typo 2015-10-31 12:29:57 +01:00
Barend Gehrels
4cc8112544 [colocations] fix: the condition to select on uu or ux should be there 2015-10-31 12:26:09 +01:00
Barend Gehrels
77299c8c22 [intersection] testcase was already fixed by colocations solution,
remove #ifdef and add testcase
2015-10-31 11:35:22 +01:00
Barend Gehrels
a1e4a65f9a [test] add case with two ext/int colocations at the same point 2015-10-31 11:16:55 +01:00
Barend Gehrels
013420fd07 [colocations] fix debug info 2015-10-31 11:00:41 +01:00
Barend Gehrels
7cfe3dc337 [union] instead of checking on u/u, sort/check
on exterior ring/interior rings such that also cases with u/x are handled

This fixes case mysql_21964049
2015-10-31 10:56:27 +01:00
Barend Gehrels
4ae1320d1c [union][test] move test cases to overlay_cases.hpp and enable two cases
which are fixed now
2015-10-28 19:49:37 +01:00
Barend Gehrels
ac5bc527e7 [union] fix cases where a polygon is touching the interior ring of another
polygon at a point where that interior ring touches its exterior ring
2015-10-28 19:48:34 +01:00
Barend Gehrels
285419176e Merge branch 'bg-prepare' 2015-10-28 11:27:07 +01:00
Barend Gehrels
653f6f32ec Merge branch 'develop' into bg-prepare
Conflicts:
	include/boost/geometry/extensions/algorithms/offset.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp
	include/boost/geometry/extensions/iterators/section_iterators.hpp
	include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp
	include/boost/geometry/extensions/nsphere/algorithms/within.hpp
	include/boost/geometry/extensions/nsphere/nsphere.hpp
	include/boost/geometry/extensions/nsphere/strategies/cartesian/nsphere_in_box.hpp
	include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp
2015-10-28 10:11:24 +01:00
Adam Wulkiewicz
ddcce3d2a9 [test][union] Add failing test case. 2015-10-22 22:40:27 +02:00
Adam Wulkiewicz
7ddeab4f05 [test][intersection] Add failing test case. 2015-10-22 22:05:22 +02:00
Adam Wulkiewicz
40aafb8107 [test][difference] Add failing test cases. 2015-10-22 21:43:41 +02:00
Adam Wulkiewicz
a952202668 [test][intersects] Add test cases for Segment/Box (0 distance between coordinates). 2015-10-21 02:35:28 +02:00
Adam Wulkiewicz
1305c06b3c [disjoint][intersects] Fix special case for Segment/Box.
When the difference between coordinates of Segment's points is 0 for some
dimension and the Segment is disjoint return the result stright away. In
this case both relative distances are infinite and their signs are the
same.
2015-10-21 02:25:57 +02:00
Barend Gehrels
f98e0ed947 Merge pull request #324 from jeremy-murphy/pj_units
Split pj units at divisor, support fractional multipliers.
2015-10-17 10:42:57 +02:00
Menelaos Karavelas
fc3f5e57fb [test][algorithms][buffer] fix "enumeration value not handled warning" 2015-10-16 11:25:51 +03:00
Adam Wulkiewicz
9fcbd75ee1 [test][intersects] Add possibly failing test cases (Seg/Box). 2015-10-15 22:09:42 +02:00
Adam Wulkiewicz
3e22205687 Merge pull request #329 from springmeyer/fix-lineclip-int
[algorithms][intersection] Fixes liang_barsky for integral data
2015-10-14 23:41:08 +02:00
Dane Springmeyer
6f214c54c6 use select_most_precise + better naming of TemplateType 2015-10-14 11:36:50 -07:00