Commit Graph

4152 Commits

Author SHA1 Message Date
Barend Gehrels
df96ce3bcd fix more region_id occurences to signed_size_type 2017-09-06 11:43:14 +02:00
Barend Gehrels
5125f938d8 Fix std::size_t types of turn_index to signed_size_type 2017-09-06 11:42:31 +02:00
Barend Gehrels
25ee55003b Fix int types of region_id to signed_size_type 2017-09-06 11:36:22 +02:00
Barend Gehrels
41ae79cf15 Fix for C++03 2017-09-06 10:58:46 +02:00
Barend Gehrels
e9c1ed497f Merge branch 'develop' of https://github.com/boostorg/geometry into develop 2017-09-06 09:40:11 +02:00
Barend Gehrels
ccd85b37d0 [buffer] add parameter added in the meantime 2017-08-30 18:45:39 +02:00
Adam Wulkiewicz
1bc57cc645 Merge branch 'develop' into fix/strategy_winding
Conflicts:
	include/boost/geometry/strategies/strategies.hpp
2017-08-30 13:42:39 +02:00
Adam Wulkiewicz
c5e12820e1 Merge pull request #413 from awulkiew/fix/non_cartesian_compare
Fix non-cartesian compare function objects (bg::less, bg::equal_to, bg::greater).
2017-08-30 13:39:57 +02:00
Barend Gehrels
0591aa63ea Merge branch 'develop' into feature/intvalid 2017-08-30 13:30:46 +02:00
Barend Gehrels
64a7c46ab7 [overlay] finetune condition by still deleting colocated self-ii turns
when there are also blocked turns in the cluster
2017-08-30 12:58:43 +02:00
Barend Gehrels
a449c39e6f [overlay] fix missing ring due to discarded self-intersection turn 2017-08-30 12:56:48 +02:00
Barend Gehrels
32705f5b32 [overlay] change is_closed to using count_left for decision to
include polygons
2017-08-23 15:37:00 +02:00
Barend Gehrels
1dd5431560 [overlay] check colocated turns for being blocked. This also moves
the place where is_closed is set
2017-08-23 13:51:27 +02:00
Barend Gehrels
6db9266768 [overlay] replace colocated_ii / uu with has_colocated_both
because only one of them is used.
2017-08-23 13:49:02 +02:00
Barend Gehrels
fae33e64f8 [overlay] remove condition which is not active anymore 2017-08-23 13:43:36 +02:00
Barend Gehrels
ccadeaeeff [overlay] move declaration (this is missing in an earlier commit) 2017-08-23 11:25:18 +02:00
Barend Gehrels
46e4533461 [overlay] add missing include 2017-08-23 11:06:38 +02:00
Barend Gehrels
392a724693 [overlay] fix inclusion of rings which were marked as blocked. 2017-08-23 11:06:18 +02:00
Adam Wulkiewicz
95ffd9efbc [strategies] Relocate CS-specific winding strategies. 2017-08-22 01:11:51 +02:00
Adam Wulkiewicz
74f13547be [strategies] Update intersection and within strategies after change in winding strategy. 2017-08-22 00:33:39 +02:00
Adam Wulkiewicz
9f4682403e [strategies] Fix winding strategy for specific cases in spherical and geographic.
Implement as separate strategies per CS: cartesian_winding,
spherical_winding and geographic_winding. The last one taking Geodesic
FormulaPolicy and Spheroid (interface consistent with other geographic
strategies).

Leave agnostic winding strategy for backward compatibility, sort of
because SideStrategy parameter was removed so it's compatible with Boost
1.63 and below. Internally using one of the above strategies.
2017-08-22 00:28:08 +02:00
Barend Gehrels
4e99afb9d0 [overlay] revise implementation to set traversed - now set in traversal itself,
which makes code in overlay.hpp a bit less complex
2017-08-16 16:25:25 +02:00
Adam Wulkiewicz
11ce2ac02e [algorithms] Fix direction_code different Point types handling and unused variable warning. 2017-08-14 17:39:18 +02:00
Adam Wulkiewicz
42902826be [envelope][expand] Add support for spherical polar Boxes and Segments. 2017-08-06 19:35:54 +02:00
Adam Wulkiewicz
197d396218 [strategies] In cartesian side strategy use cartesian compare strategy directly instead of relate::less<>. 2017-08-05 01:55:25 +02:00
Adam Wulkiewicz
7104c112b1 [algorithms] Remove relate::less<> and replace it with geometry::less<>. 2017-08-05 01:54:27 +02:00
Adam Wulkiewicz
e3e06f7e96 [envelope][expand] Stop using bg::less<>.
bg::less<> now use math::equals() consistently also in single-Dimension
  version, so shouldn't be used for expanding a Box.
Implement expand(Box, Pt) for spherical polar.
Remove compare "strategies" (Predicates) template parameters from expand
  detail and dispatch templates.
2017-08-05 01:45:32 +02:00
Adam Wulkiewicz
3ba45ba8cc [math][detail] Support spherical_polar CS in normalization utils. Also add some helper functions (checking poles and antimeridians). 2017-08-05 01:41:55 +02:00
Adam Wulkiewicz
fdca32a6e5 [compare] Support non-cartesian CSes in less<>, greater<> and equal_to<>.
Improve consistency with single-Dimension version and equals(Pt, Pt).
Always use math::equals when checking equality of coordinates,
  also in single-Dimension versions.
Check antimeridians and poles also when only longitudes are compared
  (At poles all longitudes are considered equal).
Add template argument defaulting to void and specialization defining
  operator comparing objects of 2 different types (after C++14).
Remove Strategy template parameter which only allowed to pass standard
  predicates (e.g. std::less) so was unusable and this design was forcing
  unnecessary equal_to call when math::equals() failed.
Implement compare strategies the same way how other strategies are
  implemented. Add compare:: cartesian and spherical strategies and
  compare::services::default_strategy traits.
2017-08-05 01:16:16 +02:00
Adam Wulkiewicz
98b8821be6 [sectionalize] Add full namespace to function call (mingw workaround). 2017-08-02 02:52:02 +02:00
Adam Wulkiewicz
35897a6a81 Merge pull request #412 from awulkiew/fix/algorithms_side_strategy
Geographic coordinate system related fixes.
2017-07-31 18:30:25 +02:00
Barend Gehrels
56b5d7bf8a [overlay] fix bug where self-turn was not startable, and therefore an
interior ring was missing
2017-07-31 12:14:40 +02:00
Adam Wulkiewicz
e7463b35f0 [buffer][overlay] Fix get_turns/secionalize/partition for non-cartesian CS.
- Handle longitudes differently in section_functions preceding() and
  exceeding().
- Calculate directions in sectionalize differently for longitudes.
- Update buffer and get_turns due to the above changes.
2017-07-27 03:31:35 +02:00
Barend Gehrels
d25fe47a93 [overlay] fix case which was not taking correct rank 2017-07-26 14:26:44 +02:00
Adam Wulkiewicz
925b715f4d [algorithms] direction_code(): Add support for non-cartesian CSes. 2017-07-21 03:36:15 +02:00
Adam Wulkiewicz
6519f7a411 [strategies] Fix geographic area strategy for sphere (a==b), error being NaN result. 2017-07-20 18:27:11 +02:00
Barend Gehrels
0cd5f968cc [traverse] belongs to previous commit, remaining distance needs also
to be calculated for ii turns etc, for clusters.
2017-07-19 19:05:07 +02:00
Barend Gehrels
4082167be8 [traverse] added local typedef and comments to aggregate_operations 2017-07-19 19:03:24 +02:00
Barend Gehrels
982d4936fa [traverse] remove unused function 2017-07-19 19:00:41 +02:00
Barend Gehrels
174ef5e38c [overlay] fix cases where two arcs leave a cluster in same direction,
one longer as the other. Remaining distance needs to be considered.
Including testcase case_recursive_boxes_64 which is fixed by this issue.
2017-07-19 18:59:55 +02:00
Barend Gehrels
497e055639 [overlay] don't check startable for determining has_traversed_turn,
and also check for turns both going in opposite direction (so uu for int)
This fixes case_recursive_boxes_63 (but not for difference yet)
2017-07-19 14:02:59 +02:00
Adam Wulkiewicz
77c54c50d9 [algorithms] Fix direction_code for very close coordinates and use it in point_is_spike_or_equal to fix it too. 2017-07-18 14:38:19 +02:00
Adam Wulkiewicz
7dcba58943 [algorithms] Use user-defined side strategy in various algorithms
... instead of using the default one created internally.

It affects buffer, is_simple, is_valid, is_convex, point_on_surface,
remove spikes and various overlay algorithms.
2017-07-14 16:13:38 +02:00
Barend Gehrels
9acd4dcbba [overlay] dont excluded colocated self-turns from check within other geometry 2017-07-12 09:56:23 +02:00
Barend Gehrels
1b71880b4f [intersection] fix intersection pattern where it accidentally took last
one instead of penultimate
2017-07-08 12:45:24 +02:00
Barend Gehrels
8012d17ca6 Merge branch 'feature/intvalid' into develop 2017-07-05 17:08:52 +02:00
Barend Gehrels
de8273ab92 [is_valid] fix, using touch_only information, and checking border_point
instead of touching point
2017-07-05 14:37:29 +02:00
Adam Wulkiewicz
a51a331df9 Merge pull request #405 from awulkiew/feature/area_strategy
Add missing propagation of area strategy in buffer, is_valid and overlay.
2017-07-05 13:51:43 +02:00
Adam Wulkiewicz
0b62b81fb4 Merge pull request #403 from awulkiew/fix/non_cart_intersection
Handle degenerated segments near poles in spherical and geographic intersection strategies.
2017-07-05 13:51:31 +02:00
Barend Gehrels
4ccd4e43ce [is_valid] add extra info to turn to determine validity
Including unit test adaptions. Results are verified visually with SVG
2017-07-05 13:06:15 +02:00