Commit Graph

2803 Commits

Author SHA1 Message Date
Menelaos Karavelas
bbd755350b [algorithms][simplify] update copyright dates and add missing include 2015-02-05 14:09:27 +02:00
Barend Gehrels
63b3e39592 Merge pull request #209 from mkaravel/fix/use_correct_namespace_in_comment
[algorithms][is_valid] fix namespace in comment
2015-02-03 22:54:51 +01:00
Menelaos Karavelas
2b8528e318 [algorithms][is_valid] fix namespace in comment 2015-02-03 21:57:10 +02:00
Menelaos Karavelas
fe257ef8b4 [algorithms][detail][overlay][turns L/L] remove trailing spaces 2015-02-03 21:54:52 +02:00
Adam Wulkiewicz
93d9881fa2 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-03 18:27:11 +01:00
Adam Wulkiewicz
5c73173d60 [get_turns] Fix the handling of Linear collinear spikes for L/L. 2015-02-03 18:26:46 +01:00
Barend Gehrels
2bd4be27c8 Merge branch 'feature/buffer' into develop 2015-02-03 12:30:33 +01:00
Adam Wulkiewicz
10ddece05c Merge pull request #204 from mkaravel/fix/is_simple_wrong_turns_detection
Fix/is simple wrong turns detection
2015-02-02 19:54:28 +01:00
Adam Wulkiewicz
3e367f9f6d [get_turns] Fix handling of a specific case of L/L collinear spike. 2015-02-02 02:14:12 +01:00
Menelaos Karavelas
2c0c882cf4 [algorithms][is_simple] replace equality testing of turn point and linestring
endpoint by using the turn's fraction instead of the geometry::equals algorithm
2015-02-01 11:30:54 +02:00
Menelaos Karavelas
eac0dc71bb [algorithms][is_simple] optimize the computation of turns for
multilinestrings: instead of computing the turns for each linestring
(through bg::intersects) and then again for the entire multilinestring,
avoid computing the turns for the individual linestrings in the multilinestring
and compute and process all multilinestring turns together;
besides the optimization this approach fixes a bug in bg::intersects in the
context of simplicity testing: bg::intersects cannot detect the intersection
occuring when a boundary point of linestring is also an internal point of the
linestring, as in LINESTRING(4 1,10 8,4 6,4 1,10 5,10 3), for example;
2015-01-29 23:45:46 +02:00
Menelaos Karavelas
e2d15e9eb3 [algorithms][is_simple][debug][turns] add debugging support for the
boundary (endpoints) of linestrings
2015-01-29 23:31:14 +02:00
Menelaos Karavelas
2be267d79e [algorithms][is_valid][debug][turns] add display of segment indices 2015-01-29 23:29:42 +02:00
Menelaos Karavelas
ba5ae9ef4d [iterators][segment iterator][range segment iterator] declare range_segment_iterator
as a class (to match the friend declaration inside it);
fix bug in initialization of the m_has_less_than_two_elements boolean member variable
for open ranges;
2015-01-29 23:13:45 +02:00
Adam Wulkiewicz
23d3e60767 Merge pull request #197 from mkaravel/feature/support_for_one_point_geometries
Feature/support for one point geometries
2015-01-28 23:24:42 +01:00
Menelaos Karavelas
bc1da220a4 [iterators][segment iterator][range segment iterator] initialize boolean in default
constructor with false
2015-01-28 19:18:19 +02:00
Menelaos Karavelas
3763829be3 [iterators][segment iterator][range segment iterator] replace has_less_than_two_elements
by an appropriate call to boost::size
2015-01-28 17:38:58 +02:00
Barend Gehrels
b349fc0f45 [buffer] use turn instead of point in analysis to get their segments later 2015-01-28 14:35:26 +01:00
Barend Gehrels
f056a0bb54 [overlay] minor change: replace now longer expressions with p_arrival, q_arrival
to enhance readability
2015-01-28 13:38:12 +01:00
Barend Gehrels
a44c753612 [overlay] replace intersection_info (old) with (new) to allow getting access
to (robust) points used for the segment intersection. This makes dir_info
redundant there, because it is included in (new)
2015-01-28 13:30:42 +01:00
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
28cf857743 [buffer] pass turn instead of piece to analysis to be able to use
the robust segments it is calculated from (in a later commit)
2015-01-28 11:26:41 +01: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
3eeb26b58f [iterators][segment_iterator] modify range_segment_iterator class to support
ranges with less than two elements
2015-01-22 18:25:11 +02: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