Commit Graph

2781 Commits

Author SHA1 Message Date
Menelaos Karavelas
5899ac451f [algorithms][is_simple] fix bug in is_simple(multilinestring): is_simple
was considering a simple closed linestring (living inside a multilinestring)
as non-simple because it was wrongly detecting the turn associated with the
first and last (closing) point as an unacceptable turn;
fix: allow such turns acceptable;
2015-01-28 12:40:46 +02:00
Barend Gehrels
3c57ee2cae [test] remove timings in include files 2015-01-28 10:29:31 +01:00
Barend Gehrels
486ed6605c [extensions] remove unused msm state and unused Boost.Unit example/header 2015-01-28 10:04:03 +01:00
Adam Wulkiewicz
6665fb7bf6 [relate] Fix relate(Ls,MLs) - collinear L spike touching other Ls. 2015-01-27 00:27:59 +01:00
Adam Wulkiewicz
1588215368 [overlay][get_turns] Fix get_turns(L,A) for opposite last L segment.
For last Linear segment collinear opposite to A segment the pk point was
also used in a check inside collinear_opposite handler. But in the case of
the last segment pk was invalid and set to one of the L points. So the
result of the check was "random".
2015-01-26 04:00:51 +01:00
Adam Wulkiewicz
8100303092 [overlay][get_turns] Fix the calculation of spike's side.
In get_turn_info L/A for a Linear spike support special case when pj == qj
differently, check it explicitly if it must be handled.
2015-01-23 19:04:00 +01:00
Adam Wulkiewicz
949fd8ac39 [relate] Small optimization in L/A turns analyser, don't reset the watcher twice. 2015-01-23 19:03:39 +01:00
Adam Wulkiewicz
2ac11443fa [relate] Fix relate(MLs,A) - reset state in handler per Ls.
In turns handling code reset exit_watcher and other state variables when
new linestring is detected and previous one was handled.
2015-01-23 17:10:44 +01:00
Adam Wulkiewicz
2493f07792 Merge pull request #196 from mkaravel/fix/closing_iterator_for_empty_ranges
Fix/closing iterator for empty ranges
2015-01-23 05:49:06 +01:00
Adam Wulkiewicz
f30691be50 [relate] Fix relate() for MultiPolygon/Areal.
Remove the symmetry from uncertain u/u handling. Set I/E and B/E only for
rings containing only u/u, not for both geometries.

Also replace int with signed_index_type for ring index.
2015-01-23 03:33:02 +01:00
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
Menelaos Karavelas
8643f25f97 [iterators][closing_iterator] fix bug in closing_iterator for empty ranges:
the closing_iterator was not working for empty ranges as it was trying
to append the first range item of an empty range to the end of the range;
the proposed fix changes the index of the last item in the closing iterator's
range to be 0 instead of 1 when the range is empty;
2015-01-22 16:58:39 +02: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