Commit Graph

2770 Commits

Author SHA1 Message Date
Adam Wulkiewicz
ed87f465e2 [relate] Fix relate() for Linear/Areal.
Linestring/MultiPolygon case when the first IP is the u/u for a Polygon in
which the LS is not contained (starting inside). In such cases the
algorithm was detecting the LS in exterior of MultiPolygon.

MultiLinestring/Areal case when the last IP of the first Linestring was
u/u and previously the Linestring was inside. In such case the last
boundary endpoint was not taken into account.
2015-01-23 01:40:59 +01:00
Adam Wulkiewicz
da270a7e95 [disjoint] Fix disjoint L/L by using the L/L get_turn_info policy.
Without this policy the intersection points corresponding to the starting
points of linestrings aren't taken into consideration.
2015-01-22 15:47:33 +01:00
Adam Wulkiewicz
70e9d55cba [overlay][get_turns] Fix get_turns for L/A.
For a case when a last segment of linear geometry was collinear-opposite
to areal's segment and had an endpoint inside the areal's segment the turn
for the first IP wasn't generated, only the one of the endpoint.
2015-01-22 01:56:55 +01:00
Adam Wulkiewicz
fbab19df33 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-01-21 20:43:05 +01:00
Adam Wulkiewicz
c34a8aceb9 [relate] Fix relate for MultiLinestring/Areal.
The exit_watcher state wasn't cleared for first_in_range and
m_interior_detected set, so e.g. if the first linestring was detected as
entering but not detected as exiting afterwards. Furthermore, for such
linestring the last boundary point wasn't checked and the result set
accordingly.
2015-01-21 20:37:25 +01:00
Barend Gehrels
db13795982 [buffer] Add robust calculation method to determine the side of the intersection
point (turn) w.r.t. a segment, where all segments are rescaled. This should
result in a trustable point-in-piece route and obsolete the near_offsetted
workaround.

Includes unit test
2015-01-21 16:08:08 +01:00
Barend Gehrels
d1cbea0d06 [sectionalize] Supress warning signed/unsigned comparison
Apparently mpl::size is signed - so we both cast to signed
2015-01-21 11:40:32 +01:00
Adam Wulkiewicz
6386400075 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-01-20 19:51:21 +01:00
Adam Wulkiewicz
d5431d8bde [disjoint] Fix disjoint(MultiLinestring, Polygon).
Only the first Linestring of a MultiPolygon was taken into consideration.
2015-01-20 19:47:50 +01:00
Adam Wulkiewicz
f422dc02d2 [relate] Fix flags setting in relate A/A uncertain_rings_analyzer. 2015-01-20 00:31:54 +01:00
Adam Wulkiewicz
3838910182 [strategies][relate] Explicitly check segments endpoints for intersection in collinear case.
Without this, if the intersection of endpoints is checked using only the
ratios, the intersecting endpoints may not be detected as such. This is
important for floating-point coordinates/ratios.
2015-01-19 20:00:00 +01:00
Barend Gehrels
9b6be5f942 [point] assign values differently such that: no warning is given,
and explicit can be used for one constructor only
2015-01-14 16:38:30 +01:00
Adam Wulkiewicz
eac5774fc5 [geometries][point] Restore ctor's explicit modifier, conditionally disabled with a macro. 2015-01-13 01:05:18 +01:00
Menelaos Karavelas
125707ca65 [algorithms][distance] explicitly initialize variables to avoid maybe-uninitialized-warning
produced by some compilers
2015-01-12 16:02:19 +02:00
Menelaos Karavelas
4afaae6eb2 [algorithms][closest_feature] initialize variable passed by reference to avoid
maybe-uninitialized-warning produced by some compilers
2015-01-12 15:52:17 +02:00
Adam Wulkiewicz
45d3fcf3eb Merge pull request #190 from awulkiew/fix/centroid
Fix/centroid
2015-01-10 12:41:32 +01:00
Adam Wulkiewicz
62375c09aa [geometries] Shield initializer list support with #ifdef.
In order to test it on various compilers using Boost regression
testing suite before enabling the support by default.
2015-01-10 01:01:45 +01:00
Adam Wulkiewicz
719a47c559 Merge branch 'develop' into feature/initializer_list 2015-01-10 00:56:51 +01:00
Adam Wulkiewicz
5c6f961bbe [index] Include only the required parts of Boost.Variant
apply_visitor, get and variant.
2015-01-10 00:38:31 +01:00
Adam Wulkiewicz
f07edd0b34 [index] Tweaks related to is_leaf visitor/check.
Initialize the result in the ctor of the visitor.
In remove() check if a node is a leaf using the level, apply the visitor
only in the assert check.
2015-01-09 16:55:43 +01:00
Adam Wulkiewicz
d642e3b733 [relate] Handle a situation when the last turn is collinear for Linear.
This is a case when e.g. a Linestring is going out from a Polygon on a
spike collinear to the Linestring. So if such case is detected, handle it
"correctly" even if in general spikes aren't supported.
2015-01-08 16:00:13 +01:00
Adam Wulkiewicz
f666ab23df [algorithms][centroid] Support degenerated Linear and Areal geometries. 2015-01-08 03:26:00 +01:00
Adam Wulkiewicz
416ec8423c [index][utilities] Add are_counts_ok(). 2015-01-07 22:42:48 +01:00
Adam Wulkiewicz
b6ee911d30 [relate] Fix relate for A/A (touching exterior rings and non-touching holes).
Ticket 10912.
2015-01-06 22:18:41 +01:00
Adam Wulkiewicz
8536ce0cf1 [strategies][relate] Fix the relate Strategy concept-conformance.
Actually this commit tweaks the relate Strategy to make possible the
compilation of concept check. In order to do this GeometryX template
parameters are moved from apply() function level to struct level.

In general relate Strategy is not checked but there are cases when this
can be done. E.g. if a specialized Strategy for a pair of geometries is not
implemented for some CS (currently e.g. within or covered_by) the
default_strategy may return relate strategy like for Box/Box in
non-cartesian CS, concept check is done e.g. in WithinStrategyBoxBox.
2015-01-06 17:17:55 +01:00
Adam Wulkiewicz
d501d3774b [centroid] Fix (deterministic result) and refactor.
Make the result for invalid geometries more deterministic.
Translate back from the origin only if the centroid was calculated properly by the
Strategy (strategy.result() returns true).

Refactor centroid_indexed_calculator - use default template parameters.
2015-01-05 23:08:37 +01:00
Adam Wulkiewicz
9a3fc20ae6 [strategies][centroid] Fix/refactor average and bashein_detmer.
Return bool from average as is required by the centroid strategy concept,
this also improves robustness since false is returned if count == 0.

Use std::size_t for counters instead of int in both strategies.
2015-01-05 23:03:55 +01:00
Adam Wulkiewicz
fa76f14090 [geometry] Update copyright info in various files modified recently. 2015-01-05 14:17:30 +01:00
Adam Wulkiewicz
ca81fe416a [algorithms] Drop Foreach dependency. 2015-01-05 00:52:38 +01:00
Adam Wulkiewicz
4b34a79de0 [extensions] Drop TypeOf dependency. 2015-01-04 23:10:06 +01:00
Adam Wulkiewicz
9d89626d9f [index] Remove unused implementations of query iterator. Drop conditional Function, Bind and TypeErasure dependency. 2015-01-04 22:29:46 +01:00
Adam Wulkiewicz
228baa61a3 [geometries] Refactor includes in adapted/boost_fusion.hpp (alphabetical order and replacement of Utility with Core). 2015-01-04 21:58:59 +01:00
Adam Wulkiewicz
547b208cee [index] Fix perfect forwarding emulation in varray due to the recent changes in Boost.Container (drop of PP dependency). 2015-01-04 03:45:39 +01:00
Adam Wulkiewicz
9dc467f634 Merge branch 'develop' into feature/initializer_list 2015-01-03 00:20:16 +01:00
Adam Wulkiewicz
1ab3905687 [geometries] Comment out assignment operators taking initializer_list<>.
In order to support Boost.Assign.
2015-01-03 00:15:41 +01:00
Adam Wulkiewicz
6108b0ed92 [get_turns] Add comments and commented out code in get_turn_info_la regarding the handling of Areal's spikes. 2015-01-01 14:23:22 +01:00
Adam Wulkiewicz
3f430ed43b [relate] Comment out an assertion in relate(L/A) failing for Polygon with spikes. 2015-01-01 14:18:08 +01:00
Adam Wulkiewicz
0cd28170d7 [geometry] Change the order of Boost.Variant headers includes to alphabetical. 2014-12-31 15:48:15 +01:00
Barend Gehrels
24301d2b59 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-12-31 12:50:04 +01:00
Adam Wulkiewicz
036df6c86e [strategies] Improve the way of picking Dimension for very short orthogonal segments detected as collinear. 2014-12-31 04:32:17 +01:00
Adam Wulkiewicz
996c83e62a [extensions] Update andoyer and vincenty strategies headers locations. 2014-12-30 14:10:09 +01:00
Adam Wulkiewicz
4c944a60bb [geometries] Add MSVC workarounds for assignments taking std::initializer_list.
Don't define assignment operator taking std::initializer_list on MSVC.
On this compiler, when an initializer_list is assigned, first an object is
created using ctor taking initializer_list and then it's moved.
2014-12-30 02:36:31 +01:00
Adam Wulkiewicz
01e6f98628 Merge pull request #189 from awulkiew/fix/cart_intersect
Fix/cart intersect
2014-12-29 22:08:38 +01:00
Adam Wulkiewicz
b91e292476 [index] Refactor error handling (asserts and exceptions).
For run-time assertions always use macro BOOST_GEOMETRY_INDEX_ASSERT.
For exceptions use BOOST_THROW_EXCEPTION.
2014-12-29 22:04:42 +01:00
Adam Wulkiewicz
90c2b058a1 [strategies] Fix cart_intersect for very small segments.
Change the way how a Dimension is choosen for a point detected as
collinear. For very small segments invalid Dimension was choosen in some
cases.
2014-12-27 23:06:18 +01:00
Adam Wulkiewicz
b43958174a Merge branch 'develop' into feature/initializer_list 2014-12-26 17:13:44 +01:00
Adam Wulkiewicz
12de28aa54 [index] Remove ...ASSERT_UNUSED_PARAM macro, use boost::ignore_unused() instead. 2014-12-24 14:39:41 +01:00
Adam Wulkiewicz
179e88f40c [index] Add indexable validity assertion check to pack-create. 2014-12-24 14:24:35 +01:00
Barend Gehrels
13e4b1daca [buffer] Split some of new code into functions 2014-12-23 20:23:36 +01:00
Barend Gehrels
7006d6ca80 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-12-21 22:03:47 +01:00