Commit Graph

5259 Commits

Author SHA1 Message Date
Barend Gehrels
0c9d365d4b [fix] copy_segment_points did not use reverse, fixed. It is now similar to
copy_segments
This somehow influences one unit test case but that will be handled later.
2015-12-06 18:01:19 +01:00
Barend Gehrels
90485acf79 Merge branch 'develop' into feature/fix_tangencies 2015-12-06 17:45:12 +01:00
Adam Wulkiewicz
5d02ff6aed [index] Add workarounds for uninitialized variable warnings reported by GCC-4.4 -O2. 2015-12-01 23:46:11 +01:00
Barend Gehrels
285e0ad61d Merge branch 'develop' into feature/fix_tangencies 2015-11-28 09:10:28 +01:00
Barend Gehrels
c220373473 Merge branch 'develop' into bg-prepare
Conflicts:
	include/boost/geometry/extensions/algorithms/dissolve.hpp
2015-11-27 19:37:14 +01:00
Menelaos Karavelas
beabe33efc [strategies][distance][spherical equatorial] fix comment written in Greek characters 2015-11-27 12:29:34 +02:00
Menelaos Karavelas
4dedae6eb7 Merge pull request #335 from mkaravel/fix/is_valid_invalid_coordinates
Boost.Trac ticket 11711
2015-11-26 23:30:58 +02:00
Barend Gehrels
fa202f7821 [enrich] remove now obsolete flag for clustered 2015-11-22 14:11:05 +01:00
Barend Gehrels
17c83298d4 [overlay] remove (handling of) discarded in enrich/traverse.
Discarded is still there but not used or assigned in any sorting
2015-11-22 14:10:02 +01:00
Barend Gehrels
2945201838 [overlay] pass inverse flag for difference and use it
to reverse condition on interior/exterior touch
2015-11-22 14:01:05 +01:00
Barend Gehrels
fdcf6df915 typo 2015-11-21 19:02:00 +01:00
Barend Gehrels
939bf656f9 [intersection/enrich] don' t skip after ii if it is about interior rings,
they should be traversed. This fixes case mysql_21965285_b_inv
and helps for cases #58 (no backtracking)
2015-11-21 19:01:51 +01:00
Barend Gehrels
6fb034581a [traverse] fix situations for ii by checking if in a cc case (where either
one can be selected normally) one of the options leads to the starting turn.

This, together with previous commit (finish early), fixes the many
variants of case #58
2015-11-21 18:56:40 +01:00
Barend Gehrels
88d2276b69 [traverse] fix situations for ii by checking if current ring is
finished immediately (without switching to other source as ii does)
2015-11-21 18:54:00 +01:00
Barend Gehrels
a9903f8c7f [overlay] fix ordering ii-turns and skip turns afterwards 2015-11-18 17:33:23 +01:00
Barend Gehrels
67ac81e5b2 [overlay] fix cases where intersection point is in the middle of the
first segment, and not at the endpoint
2015-11-18 14:53:00 +01:00
Barend Gehrels
a48a935064 [overlay] self-tangencies, similarly as handling side left/right,
handle cases where one leg continues collinearly
2015-11-18 11:14:35 +01:00
Menelaos Karavelas
348b7f7f56 [algorithms][is_valid] check invalid floating-point coordinates using
boost::math::isfinite instead of boost::math::isnan and boost::math::isinfinite;
2015-11-18 10:46:58 +02:00
Menelaos Karavelas
719d0f6f49 [util] apply coding rules 2015-11-18 10:27:20 +02:00
Menelaos Karavelas
045522d9cb Merge branch 'develop' of github.com:boostorg/geometry into fix/is_valid_invalid_coordinates 2015-11-18 09:58:37 +02:00
Barend Gehrels
2e7e21dd31 [overlay] don' t discard for difference too 2015-11-15 12:33:13 +01:00
Barend Gehrels
e2764a795b [overlay] sort on cc too. Also, sort/fix cases where ux is considered for intersection too.
They are discarded now, besides the sorting order is fixed (but that
alone does not help)
2015-11-15 11:55:13 +01:00
Barend Gehrels
c7d419785e [overlay] in less_by_segment_ratio, sort turns where operation occurs
(and not in the other turn) first
2015-11-14 11:23:37 +01:00
Barend Gehrels
d038e58f16 [overlay] check for sides w.r.t. both, this fixes two cases for
intersection
2015-11-13 20:08:14 +01:00
Barend Gehrels
b891bbe741 [overlay] use same functionality also for intersection 2015-11-13 19:29:55 +01:00
Barend Gehrels
e97bbb4da1 [overlay] fix cases where IP is not at endpoint. This fixes the last
union/buffer cases with less_by_segment_ratio instead of handle_tangencies
2015-11-12 19:46:29 +01:00
Jiri Drbalek
cb9c581365 [algorithms][centroid] Fix crash when multi-geometry contains empty geometry 2015-11-11 21:24:26 +00:00
Barend Gehrels
242c619b35 [overlay] handle ux/ui and ui/ui in a more generic way, for union,
checking the relative sides of the outgoing segments (in the sorting)
2015-11-11 21:50:34 +01:00
Barend Gehrels
529b8e804c [overlay] fix ux/ux cases by sort order
(instead of handle tangencies)
2015-11-11 16:18:19 +01:00
Barend Gehrels
6b0be79ff3 [enrich] move indexed_turn_operation/sort to separate source file to
reuse it for handle_touch

Also, remove the unused member variable m_strategy from it

Conflicts:
	include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
2015-11-11 15:54:47 +01:00
Barend Gehrels
4a05869d2f [overlay] turn off handle_tangencies 2015-11-11 15:43:29 +01:00
Barend Gehrels
9ec7e5f3d3 Merge branch 'develop' of https://github.com/boostorg/geometry into develop 2015-11-11 10:27:42 +01:00
Menelaos Karavelas
d9317bdba6 Merge pull request #334 from mkaravel/fix/is_simple_for_empty_geometries
Boost.Trac tickets 11709 and 11710
2015-11-10 08:06:17 +02:00
Adam Wulkiewicz
450cfb42be [arithmetic] Add missing include in determinant.hpp 2015-11-08 05:30:07 +01:00
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
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
Barend Gehrels
cd6bfc54d4 [colocations] extract code to separate function 2015-11-04 13:22:41 +01:00
Barend Gehrels
7ee6bd99b1 [buffer] prefix traits::detail namespace 2015-11-01 11:17:32 +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
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
4cc8112544 [colocations] fix: the condition to select on uu or ux should be there 2015-10-31 12:26:09 +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
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
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
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
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
Barend Gehrels
533543e86b [traverse][robustness] in case of cc, instead of arbitrary candidate,
take candidate with largest remaining distance. This fixes some
errors if rescaling is turned off.
2015-10-14 17:15:53 +02:00
Barend Gehrels
4c29a2f7d5 [buffer] initialize intersection point to avoid warning 2015-10-14 12:58:05 +02:00
Barend Gehrels
ec017da3f0 [buffer] move same code fragments to finish_ring 2015-10-14 12:57:46 +02:00
Barend Gehrels
71143c1b68 [buffer][fix] Fix case where side calculation fails because of length 2015-10-14 12:14:38 +02:00
Menelaos Karavelas
b029641604 [algorithms][detail][point_is_spike_or_equal] fix inconsistency between sideness/collinearity
test and check for direction of vectors;

Problem: when checking whether a point q creates a spike or not with respect to two (ordered)
points a and b, the first check performed is whether q, a and b are collinear; if so, then it
is determined whether the vectors q-b and b-a have the same direction or not; for points with
floating-point coordinates, due to rounding errors as well as due to the fact that equality to
zero is checked using some tolerance, the three points may be detected as collinear; however,
when the directions of the two vectors are checked, computations are done without taking into
account any tolerance and this can lead to inconsistent results;

Fix: when checking the directions of the vectors q-b and b-a, compute signs of differences using
numerical tolerances, that is using math::equals() instead of plain comparison operators;
2015-10-12 12:07:10 +03:00
Jeremy W. Murphy
013ed09a55 [projections] Use lexical_cast, check for zeroes.
-99 is a placeholder.
2015-10-11 23:36:22 +11:00
Jeremy W. Murphy
37b3487a0d [projections] Punctuation and naming. 2015-10-11 18:13:22 +11:00
Adam Wulkiewicz
605d6d2e9b [relate] Comment-out unused variable to suppress compiler warning. 2015-10-09 17:04:38 +02:00
Adam Wulkiewicz
51d683c737 Merge pull request #321 from awulkiew/fix/rtree_eps2
Enlarge nodes boxes in the rtree WRT epsilon when non-Box values are indexed.
2015-10-09 15:54:03 +02:00
Menelaos Karavelas
8614c403f0 Merge pull request #325 from mkaravel/fix/difference_intersection_linear_areal
Fix/difference intersection linear areal
2015-10-09 08:13:52 +03:00
Menelaos Karavelas
49b7be215e [algorithms][intersection] use more descriptive name for method;
change template parameter name to something more descreptive;
2015-10-09 08:11:39 +03:00
Adam Wulkiewicz
350e75bfc2 Merge pull request #328 from jeremy-murphy/redefined_macro
[transform][strategies] Don't clobber BOOST_UBLAS_TYPE_CHECK macro.
2015-10-09 02:26:00 +02:00
Adam Wulkiewicz
bef1a98d2e [index] Add #ifdef for conditional enabling of Values' bounds in the rtree. 2015-10-08 19:01:00 +02:00
Adam Wulkiewicz
25d9f9c195 [distance] Fix assertion failure in distance(Pt, Box) for NaN coordinates.
If there are NaN coordinates the conditions cannot be reasonably
calculated, therefore if the condition isn't met check if NaN coordinates
were not involved. This is consistent with the general policy WRT invalid
geometries, the algorithm don't fail but may generate invalid result.
2015-10-08 17:39:16 +02:00
Adam Wulkiewicz
d518688486 [relate][touches] Fix bugs in relate(A,A) and use it in touches(A,A)
Bugs are related to the handling of interior rings intersecting the second
geometry.

touches(A,A) now calls relate(A,A) besides a Ring/Ring case bcause Rings
have no holes so the simpified version may be used.
2015-10-08 13:55:11 +02:00
Dane Springmeyer
eb7613e703 [algorithms][intersection] Fixes liang_barsky for integer coordinate types
- Fixes an integer division bug which caused incorrect clipping results when
   a geometry is clipped by a box and the coordinate type is integral
 - Refs https://github.com/mapbox/mapnik-vector-tile/pull/102
2015-10-06 13:58:18 -07:00
Menelaos Karavelas
b3be70aee2 [algorithms][overlay][exception] move inconsistent_turns_exception to a separate file 2015-10-05 14:06:58 +03:00
Menelaos Karavelas
7f5f894535 [algorithms][overlay][exception] move inconsistent_turns_exception to a separate file 2015-10-05 12:24:31 +03:00
Jeremy W. Murphy
2c9cf6cc5f [transform][strategies] Don't clobber BOOST_UBLAS_TYPE_CHECK macro.
This macro is also defined in boost/numeric/ublas/detail/config.hpp.
2015-09-27 19:50:15 +10:00
Menelaos Karavelas
c8b1095eea [algorithms][is_valid] fix issue with use of std::cout only in debug mode:
originally reported by Jeremy Murphy (GitHub PR #326); the problem is that
when debug_print_complement_graph() is called, std::cout needs to be defined
which requires the inclusion of <iostream> even in non-debug mode; with this
commit the call to debug_print_complement_graph() is guarded by the appropriate
macro and the use inclusion of <iostream> is no longer needed in non-debug mode;
2015-09-17 09:28:55 +03:00
Jeremy W. Murphy
cb78622a8e Merge branch 'develop' into pj_units 2015-09-07 23:44:29 +10:00
Adam Wulkiewicz
a71aaa3617 [core] Make geometry::exception::what() public. 2015-09-07 14:03:54 +02:00
Barend Gehrels
e8785f63dc [handle_touch] check on uu index 2015-09-06 20:25:41 +02:00
Barend Gehrels
b0262c163e [handle_touch] remove map, because now that u/u turns contain travel information
we can start just there and don' t have to start on another turn on the same
input rings. This simplifies the code
2015-09-06 19:47:56 +02:00
Barend Gehrels
eb3880991e [handle_touch] add logic to set the selectable_start flag to true 2015-09-06 15:43:43 +02:00
Barend Gehrels
93481dc289 [union] include handle_touch in operation, handle switch_source, and add corresponding testcases
(from Menelaos' unmerged PR).
Regression in one case (case_recursive_boxes_3)
2015-09-06 14:52:28 +02:00
Barend Gehrels
9977478aec [handle_touch] split can_reach function and add more conditions to check
reachability via u/u turn. Which fixes the issues in unit test
2015-09-06 12:30:08 +02:00
Barend Gehrels
5b4ff7dc7f [handle_touch] remove the insert_into_sequence method because it is
way more convenient to do that in enrich
(not complete yet - union test still fails for some cases)
2015-09-04 23:25:49 +02:00
Barend Gehrels
ad2524d245 [traverse] handle u/u differently such that it is not discarded
for a union operation
2015-09-04 23:13:28 +02:00
Menelaos Karavelas
68611a159c [algorithms][intersection][difference] fix bug in determining whether a turn
is a crossing turn or not (as part of the bug-fix the logic now determines is the
turn is a crossing turn, as opposed to a non-crossing turn)
2015-09-04 10:50:03 +03:00
Barend Gehrels
77c2a32503 [handle_touch] add start sorting to re-assign index of non-discarded u/u turn 2015-09-03 23:35:32 +02:00
Barend Gehrels
9a6695c825 [enrich] move indexed_turn_operation/sort to separate source file to
reuse it for handle_touch

Also, remove the unused member variable m_strategy from it
2015-09-03 23:17:44 +02:00
Menelaos Karavelas
3b12d520ac [util][math] fix possible unused variable warning 2015-09-03 20:04:55 +03:00
Menelaos Karavelas
290688c502 [algorithms][difference][intersection] modify intersection and difference algorithm
for L and A geometries to keep (instead of discarding) spikes of liear geometries
2015-09-03 15:04:00 +03:00
Barend Gehrels
45f32bee3b [handle_touch] process operation_continue and added corresponding testcases,
and test cases having u/u from union_multi.cpp
2015-09-02 16:09:49 +02:00
Barend Gehrels
16967cc7f8 [overlay] add handle_touch to examine u/u turns
First phase: check if a u/u turn should be traversed or discarded, including
unit test
2015-09-02 14:27:19 +02:00
Jeremy W. Murphy
a830e16723 Split pj units at divisor, support fractional multipliers.
Use std::atof rather than global namespace atof.
2015-08-30 18:41:41 +10:00
Adam Wulkiewicz
5daa5a78a3 Merge branch 'develop' into fix/rtree_eps2 2015-08-25 16:43:47 +02:00
Adam Wulkiewicz
3dd8d1e689 Merge pull request #320 from awulkiew/fix/box_eps
Different approach for handling Boxes WRT machine epsilon
2015-08-25 16:40:55 +02:00
Adam Wulkiewicz
069316c591 [extensions][nsphere][index] Update index-related nsphere code accoring to the latest changes in the rtree. 2015-08-23 15:03:16 +02:00
Adam Wulkiewicz
1084a124de [index] Enlarge leafs' boxes WRT epsilon for non-Box Values. 2015-08-23 15:03:16 +02:00
Adam Wulkiewicz
342306bf9e [index] Add values_box() and is_leaf_element.
The function values_box() enlarges the box WRT epsilon if the elements are
not of bounding geometry type, so Point or Segment.
2015-08-23 15:03:15 +02:00
Adam Wulkiewicz
f39d37f195 [index] Add is_bounding_geometry and relocate is_indexable. 2015-08-23 15:03:15 +02:00
Adam Wulkiewicz
0addcbb330 [math] In detail::scaled_epsilon call detail::abs instead of math::abs. 2015-08-22 17:36:54 +02:00
Adam Wulkiewicz
4a15918915 [extensions][nsphere][relops] Use raw comparison operators instead of math:: functions. 2015-08-21 20:00:13 +02:00
Adam Wulkiewicz
035a49d417 [extensions][sections] Use raw comparison operators instead of math:: functions. 2015-08-21 19:59:40 +02:00
Adam Wulkiewicz
3dcfb86cb9 [touches] For Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:54:57 +02:00
Adam Wulkiewicz
0d5c18ea56 [overlaps] For Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:54:28 +02:00
Adam Wulkiewicz
7636aa1a9e [intersection] For Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:54:02 +02:00
Adam Wulkiewicz
c8e65b5082 [within][strategies] For Point/Box and Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:53:18 +02:00
Adam Wulkiewicz
b3c9d963a3 [disjoint] For Point/Box and Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:52:11 +02:00
Adam Wulkiewicz
b22a3c0530 [sections] Enlarge section bounding Boxes WRT epsilon.
This allows the algorithms using sections to check spatial predicates
using raw operators < (e.g. in Box/Box disjoint). There is no need to
use less performant calls to math::smaller.

Replace math::smaller usage in section functions preceeding() and
exceeding() and therefore revert the change done recently.
2015-08-21 19:41:01 +02:00
Adam Wulkiewicz
d248323369 [math][algorithms] Add expand_by_epsilon()
Add math::scaled_epsilon().
Optimize math::smaller().
2015-08-21 19:38:51 +02:00
Adam Wulkiewicz
8f7af3cf63 Merge pull request #319 from awulkiew/fix/nan_coordinates
Take special care of NaN coordinates in relate for MultiLinestring
2015-08-20 14:05:15 +02:00
Adam Wulkiewicz
7aa3dd47f8 Merge pull request #318 from awulkiew/fix/box_eps
Take into account machine epsilon when handling Boxes in various algorithms.
2015-08-19 02:41:26 +02:00
Adam Wulkiewicz
12ba76ff70 [relate][util] Take special care about NaN coordinates in relate for MultiLinestring.
In places where a check must be performed, if a Point is one of the
endpoints of a Linestring contained in a MultiLinestring, std::sort() and
std::equal_range() algorithms are used. With MSVC the assertion in
std::equal_range() fails if the elements cannot be reliably compared, i.e.
in the case when Points has NaN coordinates.

Add has_nan_coordinate() utility and use it in boundary_checker and
topology_check in relate() implementation.
2015-08-14 17:50:31 +02:00
Adam Wulkiewicz
8ba5a7f02a [touches] Remove spaces according to coding guidelines. 2015-08-13 21:42:37 +02:00
Adam Wulkiewicz
8fcbb8e370 [index] Fix the removal of value from an empty rtree.
- Instead of assertion failure there is no effect and 0 is returned.
- Handle the NULL root in a similar way in insert, remove and count.
- Add runtime asserts.
2015-08-13 21:02:30 +02:00
Adam Wulkiewicz
098279e739 [index] Fix rtree removal for min elements == 1
Support 0-element range in elements_box() helper function.
Handle special case in remove visitor - root node containing 0 elements after underflow.
2015-08-13 00:44:33 +02:00
Adam Wulkiewicz
94b198e23f [extensions][iterators] In section_iterator take into account machine epsilon. 2015-08-05 01:02:17 +02:00
Adam Wulkiewicz
3a522f11f6 [extensions][nsphere][within][strategies] For NSphere/Box and Point/Nsphere take into account machine epsilon. 2015-08-05 00:59:48 +02:00
Adam Wulkiewicz
9d4c806994 [extensions][nsphere][disjoint] For Box/NSphere take into account machine epsilon. 2015-08-05 00:59:05 +02:00
Adam Wulkiewicz
fdc3a6870f [algorithms][sections] Take into account machine epsilon in preceding() and exceeding() functions. 2015-08-05 00:57:03 +02:00
Adam Wulkiewicz
36cdd25674 [intersection] For Box/Box take into account machine epsilon. 2015-08-05 00:55:21 +02:00
Adam Wulkiewicz
1449373a33 [strategies][within][covered_by] For Box/Box and Point/Box take into account machine epsilon. 2015-08-05 00:54:24 +02:00
Adam Wulkiewicz
121d4312d8 [touches] For Box/Box take into account machine epsilon. 2015-08-05 00:53:40 +02:00
Adam Wulkiewicz
172fff9f08 [overlaps] For Box/Box take into account machine epsilon. 2015-08-05 00:53:01 +02:00
Adam Wulkiewicz
cfbbbca0ee [disjoint] For Box/Box and Point/Box take into account machine epsilon. 2015-08-05 00:50:23 +02:00
Adam Wulkiewicz
74855a4951 [util] Add functions math::smaller_or_equals() and math::larger_or_equals(). 2015-08-05 00:33:26 +02:00
Barend Gehrels
19a88b4a17 Merge branch 'develop' into bg-prepare 2015-07-31 18:16:59 +02:00
Barend Gehrels
49add55205 [buffer] Fix assertion for cases with extreme coordinates.
In case of numerical errors, the started ring should be aborted to avoid doing
calculations with them.
2015-07-31 12:40:01 +02:00
Menelaos Karavelas
21c143e226 [algorithms][relate] modify the less functor for turns in relate so that
equality (using math::equals) for turn fractions is called before operator<;
this is done for consistency with how turns are computed in L/L set operations
and also to make sure that turns in relate are computed in a consistent way;
2015-07-28 21:37:37 +03:00
Menelaos Karavelas
c9ad6530ae [algorithms][turns] minor change (coding style) 2015-07-28 21:36:56 +03:00
Menelaos Karavelas
6e4ea5f23f [algorithms][turns] fix problem with less functor for turns;
In the previous implementation the fractions of the two turns where
compared first using operator< and then tested for equality using
math::equals; the consequence of this implementation is that it could
be possible to have two turns t1 and t2 whose fractions satisfied both
operator< and math::equals, which lead to the possibility of having both
less(t1, t2) and less(t2, t1) true; this behavior for less is wrong and
has produced failures on various compilers (especially when sorting);

The solution is to rearrange the code in the less functor so that
math::equals for the two fractions is checked first, that is before
the operator< is called; this makes the outcomes of less(t1, t2) and
less(t2, t1) always consistent with each other;
2015-07-24 10:27:04 +03:00
Menelaos Karavelas
4ce94fb33e [algorithms][turns] polish code (remove unnecessary commas in print-out) 2015-07-23 09:41:22 +03:00
Adam Wulkiewicz
5a1e553c75 [math] In the impl. of abs() for FP types use std::fabs() if possible.
This fixes the function for long double on some compilers.

For all FP types non-std fabs() was called. This function is defined
only for double. On compilers supporting long double type more precise
than double (GCC, Clang, etc.) this resulted in truncation of the result.
2015-07-22 04:41:34 +02:00
Adam Wulkiewicz
a90f9dc769 [concepts] Suppress GCC4.4 warning (unused variable). 2015-07-21 19:20:03 +02:00
Adam Wulkiewicz
1500dc3644 [algorithms][io] Explicitly specify namespaces for apply_visitor and algorithms functions. 2015-07-21 16:27:48 +02:00
Adam Wulkiewicz
39859171ce [transform] Explicitly specify namespaces to avoid ambiguities. 2015-07-20 20:40:43 +02:00
Adam Wulkiewicz
275ae8f4db [views] Suppress signed/unsigned comparison warnings in two_dimensional_view. 2015-07-20 15:43:10 +02:00
Barend Gehrels
921def4cd6 Merge branch 'develop' into bg-prepare 2015-07-19 15:11:38 +02:00
Barend Gehrels
647fedb3e2 [turns] fix conventions: no _t, line length, spurious spaces between if, missing curly braces 2015-07-18 20:16:04 +02:00
Menelaos Karavelas
eb43220e5d Merge pull request #315 from mkaravel/fix/possible_infinite_loop_in_has_spikes
Fix: possible infinite loop in has_spikes
2015-07-14 20:44:19 +03:00
Menelaos Karavelas
4e5da910af [algorithms][is_valid] rename method find_not_equal to find_different_from_first (for clarity) 2015-07-14 20:42:16 +03:00
Menelaos Karavelas
cb02dd8e8d Merge pull request #302 from mkaravel/feature/envelope_and_expand_for_spherical_cs
Envelope and expand for spherical coordinate systems
2015-07-10 07:42:16 +03:00
Menelaos Karavelas
78296da4a2 [algorithms][is_valid] replace BOOST_ASSERT by BOOST_GEOMETRY_ASSERT 2015-07-10 07:32:51 +03:00
Adam Wulkiewicz
db2a7b0afb Merge pull request #314 from awulkiew/feature/optimize_cart_intersect
[get_turns][strategies] Optimize get_turns().
2015-07-09 13:21:47 +02:00
Menelaos Karavelas
ee906b2f40 [algorithms][is_valid] avoid potential infinite loop in has_spikes
(such an infinite loop can happen if the points in the range have NaN coordinates)
2015-07-09 11:50:59 +03:00
Menelaos Karavelas
327df52ec5 [algorithms][envelope] enrich comments regarding the implementation of
envelope_multi_range_on_spheroid
2015-07-09 11:32:40 +03:00
Menelaos Karavelas
388c77cf25 [algorithms][envelope] update copyright headers to follow latest license-related wording;
rewrite envelope_multi_range and envelope_multi_range_on_spheroid algorithms in a more
clear form;
2015-07-09 11:21:53 +03:00
Menelaos Karavelas
7947be9bf5 [algorithms][expand] update copyright headers to follow latest license-related wording 2015-07-09 11:21:07 +03:00
Barend Gehrels
91ccb7e6e3 [buffer] re-enable support for no-robustness policy
Influence on polygon geometries is limited (countries also little influence)
2015-07-08 20:34:07 +02:00
Barend Gehrels
6f6fef46f4 Merge branch 'develop' into bg-prepare 2015-07-08 09:28:12 +02:00
Menelaos Karavelas
1bfae2e79e Merge pull request #313 from mkaravel/fix/sym_difference_areal
Fix/sym difference areal
2015-07-07 07:41:26 +03:00
Menelaos Karavelas
ba8bc966b1 [algorithms][envelope] merge implementation of envelope for linestrings
and multilinestrings into a single file for linear geometries
2015-07-07 04:32:30 +03:00
Menelaos Karavelas
fc7ed8f7ab [algorithms][envelope] remove Dimension and DimensionCount template parameters from bg::dispatch::envelope 2015-07-07 04:29:58 +03:00
Menelaos Karavelas
b376567de9 [algorithms][expand] remove Dimension and DimensionCount template parameters from
bg::dispatch::expand
2015-07-07 04:11:21 +03:00
Adam Wulkiewicz
db3474943b [algorithms][strategies] Simplify the geographic geodesic formulas.
Get rid of formulas objects and implement the formulas as a struct
template taking parameters enabling the formula parts (e.g. distance
and/or azimuth) with apply() static member function. This way the code is
more clear as all temporary values are created directly in the algorithms.
Furthermore there are no uninitialized values and it's not required to
keep a flag indicating if the distance or azimuth can be calculated.

Use the new implementation of formulas in geographic distance and side
strategies.

Alter the unit test.
2015-07-06 17:12:02 +02:00
Adam Wulkiewicz
eec0091bc0 [get_turns][strategies] Optimize get_turns().
The optimization is based on the fact that in the most cases the segments
handled in the TurnInfoPolicy are disjoint. For disjoint segments first
the points are rescaled, then the test for disjoint is run, next the
TurnInfoPolicy just returns and the next pair of segments is handled.
Therefore to optimze the get_turns() this commit changes two things:
1. the cart_intersect strategy may return just after the calculation of sides
   for the first segment (2 sides calculation instead of 4),
2. the points are rescaled only one time in the intersection_helper,
   already rescaled points are passed into the intersection strategy
2015-07-03 21:38:43 +02:00
Menelaos Karavelas
67c33b68bb Merge branch 'develop' of github.com:boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-07-03 02:28:13 +03:00
Menelaos Karavelas
bfe3279990 [algorithms][envelope] initialize consistently with assign_inverse() 2015-07-03 00:26:06 +03:00
Menelaos Karavelas
4bd96072bc [algorithms][sym_difference] re-factor common code 2015-07-02 20:51:36 +03:00
Adam Wulkiewicz
2e43017894 [math][policies] Rename round to rounding_cast and remove the use of boost::math::round() for performance reasons. 2015-07-02 12:02:12 +02:00
Menelaos Karavelas
8b282aeaf8 [algorithms][sym_difference] implement symmetric difference for areal geometries as follows:
* step 1: compute difference(g1, g2)
* step 2: compute difference(g2, g1)
* step 3: return the union of the two differences in previous two steps (as opposed to returning
          the concatenation of the previous two steps)
2015-07-02 00:43:38 +03:00
Adam Wulkiewicz
18ff29297e [index] Add a comment about the Box initialization in pack_create. 2015-07-01 02:55:14 +02:00
black-tomato
8be10f33a3 Without boost::geometry:: compiler try to use distance defined in my custom point class.
Microsoft Visual Studio 2008
2015-06-29 12:26:16 +03:00
barendgehrels
8dfe494f94 Merge branch 'develop' into bg-prepare
Conflicts:
	extensions/test/Jamfile.v2
	extensions/test/gis/Jamfile.v2
	extensions/test/gis/io/wkb/read_wkb.cpp
	extensions/test/gis/projections/Jamfile.v2
	extensions/test/gis/projections/projection_epsg.cpp
	extensions/test/gis/projections/projections.cpp
	include/boost/geometry/extensions/contrib/ttmath_stub.hpp
	include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp
	include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp
	include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp
	include/boost/geometry/extensions/gis/io/wkb/utility.hpp
	include/boost/geometry/extensions/gis/projections/factory.hpp
	include/boost/geometry/extensions/gis/projections/impl/aasincos.hpp
	include/boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp
	include/boost/geometry/extensions/gis/projections/impl/base_static.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_ell_set.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_fwd.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_gauss.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_inv.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_phi2.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_tsfn.hpp
	include/boost/geometry/extensions/gis/projections/impl/proj_mdist.hpp
	include/boost/geometry/extensions/gis/projections/impl/projects.hpp
	include/boost/geometry/extensions/gis/projections/proj/aea.hpp
	include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp
	include/boost/geometry/extensions/gis/projections/proj/airy.hpp
	include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp
	include/boost/geometry/extensions/gis/projections/proj/august.hpp
	include/boost/geometry/extensions/gis/projections/proj/bacon.hpp
	include/boost/geometry/extensions/gis/projections/proj/bipc.hpp
	include/boost/geometry/extensions/gis/projections/proj/boggs.hpp
	include/boost/geometry/extensions/gis/projections/proj/bonne.hpp
	include/boost/geometry/extensions/gis/projections/proj/cass.hpp
	include/boost/geometry/extensions/gis/projections/proj/cc.hpp
	include/boost/geometry/extensions/gis/projections/proj/cea.hpp
	include/boost/geometry/extensions/gis/projections/proj/chamb.hpp
	include/boost/geometry/extensions/gis/projections/proj/collg.hpp
	include/boost/geometry/extensions/gis/projections/proj/crast.hpp
	include/boost/geometry/extensions/gis/projections/proj/denoy.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck1.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck2.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck3.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck4.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck5.hpp
	include/boost/geometry/extensions/gis/projections/proj/eqc.hpp
	include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp
	include/boost/geometry/extensions/gis/projections/proj/fahey.hpp
	include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp
	include/boost/geometry/extensions/gis/projections/proj/gall.hpp
	include/boost/geometry/extensions/gis/projections/proj/geocent.hpp
	include/boost/geometry/extensions/gis/projections/proj/geos.hpp
	include/boost/geometry/extensions/gis/projections/proj/gins8.hpp
	include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp
	include/boost/geometry/extensions/gis/projections/proj/gnom.hpp
	include/boost/geometry/extensions/gis/projections/proj/goode.hpp
	include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/hammer.hpp
	include/boost/geometry/extensions/gis/projections/proj/hatano.hpp
	include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp
	include/boost/geometry/extensions/gis/projections/proj/krovak.hpp
	include/boost/geometry/extensions/gis/projections/proj/labrd.hpp
	include/boost/geometry/extensions/gis/projections/proj/laea.hpp
	include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp
	include/boost/geometry/extensions/gis/projections/proj/larr.hpp
	include/boost/geometry/extensions/gis/projections/proj/lask.hpp
	include/boost/geometry/extensions/gis/projections/proj/latlong.hpp
	include/boost/geometry/extensions/gis/projections/proj/lcc.hpp
	include/boost/geometry/extensions/gis/projections/proj/lcca.hpp
	include/boost/geometry/extensions/gis/projections/proj/loxim.hpp
	include/boost/geometry/extensions/gis/projections/proj/lsat.hpp
	include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp
	include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp
	include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp
	include/boost/geometry/extensions/gis/projections/proj/merc.hpp
	include/boost/geometry/extensions/gis/projections/proj/mill.hpp
	include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp
	include/boost/geometry/extensions/gis/projections/proj/moll.hpp
	include/boost/geometry/extensions/gis/projections/proj/natearth.hpp
	include/boost/geometry/extensions/gis/projections/proj/nell.hpp
	include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp
	include/boost/geometry/extensions/gis/projections/proj/nocol.hpp
	include/boost/geometry/extensions/gis/projections/proj/nsper.hpp
	include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp
	include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp
	include/boost/geometry/extensions/gis/projections/proj/ocea.hpp
	include/boost/geometry/extensions/gis/projections/proj/oea.hpp
	include/boost/geometry/extensions/gis/projections/proj/omerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/ortho.hpp
	include/boost/geometry/extensions/gis/projections/proj/poly.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp2.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp3.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp5.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp6.hpp
	include/boost/geometry/extensions/gis/projections/proj/robin.hpp
	include/boost/geometry/extensions/gis/projections/proj/rouss.hpp
	include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp
	include/boost/geometry/extensions/gis/projections/proj/sconics.hpp
	include/boost/geometry/extensions/gis/projections/proj/somerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/stere.hpp
	include/boost/geometry/extensions/gis/projections/proj/sterea.hpp
	include/boost/geometry/extensions/gis/projections/proj/sts.hpp
	include/boost/geometry/extensions/gis/projections/proj/tcc.hpp
	include/boost/geometry/extensions/gis/projections/proj/tcea.hpp
	include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp
	include/boost/geometry/extensions/gis/projections/proj/urm5.hpp
	include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp
	include/boost/geometry/extensions/gis/projections/proj/vandg.hpp
	include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp
	include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp
	include/boost/geometry/extensions/gis/projections/proj/wag2.hpp
	include/boost/geometry/extensions/gis/projections/proj/wag3.hpp
	include/boost/geometry/extensions/gis/projections/proj/wag7.hpp
	include/boost/geometry/extensions/gis/projections/proj/wink1.hpp
	include/boost/geometry/extensions/gis/projections/proj/wink2.hpp
	include/boost/geometry/extensions/gis/projections/project_inverse_transformer.hpp
	include/boost/geometry/extensions/gis/projections/projection.hpp
	include/boost/geometry/extensions/index/rtree/rtree.hpp
	include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp
	include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp
	include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp
2015-06-27 12:35:52 +02:00
Adam Wulkiewicz
6d0be4db61 [policies] Round to the nearest integral value during rescaling. 2015-06-24 22:50:50 +02:00
barendgehrels
16aac54944 [robustness] check for infinite numbers in calculating the factor, and
only assert when really assigned
2015-06-24 11:45:41 +02:00
Adam Wulkiewicz
dd0e360146 [io][wkt] Optimize the usage of end tokenizer::iterator.
Create and return the end iterator in initialize() function the same way how
iterator `it` is, by output function argument passed by reference. Reuse it
inside this function.
In ..._parser::apply() functions reuse the end iterator, do not create it
each time it is needed.
Consistently pass the end iterator by const reference.
2015-06-22 22:58:05 +02:00
Adam Wulkiewicz
7910be94fd [relate] Add assertion and remove unneeded condition. 2015-06-22 22:33:07 +02:00
Menelaos Karavelas
a0ca615051 Merge pull request #311 from mkaravel/fix/distance_point_box_cross_track_strategy
Fix cross_track_point_box distance strategy
2015-06-22 00:13:11 +03:00
barendgehrels
283f0a2853 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-06-21 22:59:27 +02:00
barendgehrels
88be2948f3 Three minor various details 2015-06-21 22:55:09 +02:00
barendgehrels
ed103f777e intersection calculation: fix behaviour in rare cases where IP is taken from segment
A but segment B is much shorter, and IP is also at end-point of segment B.
The arbitrary decision (robust_ra < robust_rb) is changed into another
decision, based on closeness to end-points and on segment length, which leads
to more precise results
2015-06-21 22:50:40 +02:00
Menelaos Karavelas
933ed0791d [strategies][distance][cross track point box] re-factor code and make it more readable 2015-06-19 09:37:49 +03:00
Menelaos Karavelas
23addc2c06 [strategies][distance][cross track point box] optimize the computation of the
distance when the point's longitude does not belong to the longitude range of the
box: instead of computing the distances to both meridian segments of the box, determine
which one among the two box segments the point is closest to, and compute the distance
of the point to the closest segment found
2015-06-19 01:17:46 +03:00
Menelaos Karavelas
edf943696c Merge pull request #301 from mkaravel/fix/bounding_box_computation_in_get_rescale_policy
Fix: initialize the rescale policy only if the input geometries are non-empty
2015-06-15 15:32:00 +03:00
Menelaos Karavelas
21b9226562 [strategies][spherical][distance][cross track point box] add missing includes 2015-06-13 23:57:03 +03:00
Menelaos Karavelas
12e497f394 [strategies][distance][cross track point box] update cross track point-box
strategy to work with box seen as Cartesian products of intervals
2015-06-13 01:47:44 +03:00
Adam Wulkiewicz
843ef4eac8 [is_valid] Add optimization and suppress warnings.
Replace boost::size(...) > 0 with !boost::empty(...).
Suppress unused parameter and constant conditional expression msvc
warnings.
2015-06-12 16:37:58 +02:00
Menelaos Karavelas
00424e5a6d Merge pull request #294 from mkaravel/ext/fixes_for_ttmath_big
Extensions: fixes for ttmath::Big<Exponent, Mantissa> and ttmath_big
2015-06-12 10:05:07 +03:00
Menelaos Karavelas
355a9d0cf4 Merge pull request #308 from mkaravel/fix/distance_cross_track_radius_type
[strategies][distance][cross track] expose the radius type as a typedef
2015-06-12 08:55:55 +03:00
Adam Wulkiewicz
f3b4df8c82 [index] Rename member and tparam in expandable_box for better readability. 2015-06-11 23:14:00 +02:00
Adam Wulkiewicz
81d0442c3a Merge pull request #309 from awulkiew/fix/is_valid
[is_valid] Suppress unused parameter warnings.
2015-06-11 22:12:29 +02:00
Adam Wulkiewicz
5aedf7a20a Merge pull request #310 from awulkiew/fix/types2
Replace signed_index_type with signed_size_type.
2015-06-11 18:25:35 +02:00
Adam Wulkiewicz
fb624d5712 Merge pull request #307 from awulkiew/fix/types
Replace int with more suitable type (std::size_t, signed_size_type, template parameter).
2015-06-11 18:21:17 +02:00
Adam Wulkiewicz
d88e1511d4 Merge branch 'fix/rtree_envelope' into develop 2015-06-11 18:17:46 +02:00
Adam Wulkiewicz
1cf2969cf2 [is_valid] Suppress unused parameter warnings. 2015-06-11 17:54:34 +02:00
Adam Wulkiewicz
f1313b27bc [index] Improve support for non-cartesian segments.
Use envelope() when necessary.
Remove assign_inverse() calls.
2015-06-11 16:13:25 +02:00
Menelaos Karavelas
53b5ef3dff [strategies][distance][cross track] expose the radius type as a typedef
(same as for projected_point distance strategy)
2015-06-11 01:35:30 +03:00
Menelaos Karavelas
a38f7bf60b [algorithms][envelope] make the initial box the same as that returned by assign_inverse
(for consistency with older behavior; this might change in the future)
2015-06-11 01:13:47 +03:00
Menelaos Karavelas
1a4d2504af [algorithms][envelope] change how the envelope for polygons is implemented:
for polygons with empty exterior ring, look at the interior rings
2015-06-11 01:00:42 +03:00
Menelaos Karavelas
37564000d0 [algorithms][envelope] fix compilation errors in assertions 2015-06-11 00:18:06 +03:00
Menelaos Karavelas
6470261ec2 Merge branch 'develop' of github.com:boostorg/geometry into feature/envelope_and_expand_for_spherical_cs
Conflicts:
	include/boost/geometry/algorithms/detail/envelope/linestring.hpp
	include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp
2015-06-11 00:10:31 +03:00
Menelaos Karavelas
bc70826be4 Merge pull request #299 from mkaravel/feature/intersection_areal_areal_linear
New feature: support bg::intersection(areal, areal, linear)
2015-06-10 11:43:54 +03:00
Adam Wulkiewicz
68bac52fa4 [algorithms] Replace signed_index_type with signed_size_type. 2015-06-09 17:59:39 +02:00
Adam Wulkiewicz
18de7e1251 [index] Always implement the BOOST_GEOMETRY_INDEX_ASSERT() macro (using BOOST_GEOMETRY_ASSERT_MSG). 2015-06-09 15:57:51 +02:00
Adam Wulkiewicz
c5e9b2004d [buffer][strategies] Replace int with std::size_t in join_round strategy. 2015-06-09 11:41:06 +02:00
Adam Wulkiewicz
c0e390524b [sectionalize] Replace int with signed_size_type, std::size_t or template parameter. 2015-06-09 11:39:56 +02:00
Adam Wulkiewicz
1167e510db [relate] Replace int with std::size_t. 2015-06-09 11:38:18 +02:00
Adam Wulkiewicz
a6604a49a5 [overlay][get_turns] Replace int with signed_size_type or std::size_t. 2015-06-09 11:37:32 +02:00
Adam Wulkiewicz
49369fa5cc [buffer] Replace int with signed_size_type or std::size_t. 2015-06-09 11:36:01 +02:00
Menelaos Karavelas
f23b88d314 [views][boundary view] make the deallocator take the pointer at construction time 2015-06-09 01:27:02 +03:00
Menelaos Karavelas
6e7ae868ee [views][boundary view] replace BOOST_ASSERT by BOOST_GEOMETRY_ASSERT;
use flatten_iterator to get all rings of a multipolygon as a single range;
separate initializer from num_rings computation; use operator new/operator delete
for dynamic memory allocation of views' container; use automatic deallocator helper
class instead of try/catch block;
2015-06-09 00:50:26 +03:00
Menelaos Karavelas
a23d4c97f6 Merge branch 'develop' of github.com:boostorg/geometry into feature/intersection_areal_areal_linear 2015-06-08 23:52:05 +03:00
Adam Wulkiewicz
fb978458e9 [buffer] Replace int with signed_size_type. 2015-06-08 21:26:41 +02:00
Adam Wulkiewicz
e0a436b55b Merge branch 'develop' into fix/buffer
Conflicts:
	include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
2015-06-08 21:17:10 +02:00
Adam Wulkiewicz
30beddc7a7 [buffer] Rename signed types, for turn_index and counters use size_t. 2015-06-08 21:10:35 +02:00
Adam Wulkiewicz
dc6988ff60 [util] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:57 +02:00
Adam Wulkiewicz
3fe9dafa85 [strategies] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:44 +02:00
Adam Wulkiewicz
bee76d5f1f [policies] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:32 +02:00
Adam Wulkiewicz
a0ca11b96d [iterators] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:15 +02:00
Adam Wulkiewicz
ca279e691e [index] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:39:59 +02:00
Adam Wulkiewicz
0baad86394 [geometries] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:39:34 +02:00
Adam Wulkiewicz
a5f3400a2a [extensions] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:38:59 +02:00
Adam Wulkiewicz
55b474019e [algorithms] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:38:34 +02:00
Adam Wulkiewicz
fce4263862 [core] Add BOOST_GEOMETRY_ASSERT and BOOST_GEOMETRY_ASSERT_MSG macros. 2015-06-08 13:36:39 +02:00
Menelaos Karavelas
e5ff16ddb7 [views][boundary view] change the type of the index in polygon_rings_iterator to that of the
size type of the interior rings range; refactor code for polygon and multipolygon boundary view
into a single class; make the initialization method for areal boundary safe against exceptions
thrown by constructors used inside std::uninitialized_copy;
2015-06-08 10:28:44 +03:00
Menelaos Karavelas
0bdee12041 [views][boundary view] use std::uninitialized_copy instead of placement new;
explicitly call destructors of elements of dynamically allocated array;
2015-06-07 17:34:15 +03:00
Adam Wulkiewicz
e9d0fe0ec6 [algorithms][detail] Improve single_geometry() and sub_range().
Support single geometries which are returned by non-true-reference.
Make the interface of sub_range() complete (Geometry const)
2015-06-07 12:20:41 +02:00
Menelaos Karavelas
c02761808d [views][boundary view] replace vector with dynamically allocated array and placement new 2015-06-06 12:30:40 +03:00
Menelaos Karavelas
6aa5d27754 [views][identity view][closeable view] restore them to the state previously to modifications
to make then copyable
2015-06-06 12:17:12 +03:00
Menelaos Karavelas
25cc004243 [algorithms][envelope] add missing doxygen macros; fix namespace closing comments; 2015-06-05 23:15:24 +03:00
Menelaos Karavelas
76d7f7316b [algorithms][envelope] modify implementation logic so as to always initialize the MBR 2015-06-05 23:09:30 +03:00
Adam Wulkiewicz
06c06dab25 [buffer] Replace int with signed_index_type. 2015-06-05 13:44:37 +02:00
Menelaos Karavelas
b3906f56a2 Merge branch 'develop' of github.com:boostorg/geometry into feature/envelope_and_expand_for_spherical_cs
Conflicts:
	include/boost/geometry/algorithms/detail/envelope/linestring.hpp
2015-06-03 19:55:28 +03:00
Menelaos Karavelas
3cc4ef17ca Merge pull request #304 from mkaravel/fix/replace_use_of_num_points_by_is_empty
Replace use of num_points by is_empty
2015-06-03 17:33:28 +03:00
Menelaos Karavelas
32cf691860 [policies][get_rescale_policy] replace use of num_points() by is_empty() 2015-06-03 17:31:45 +03:00
Menelaos Karavelas
5dbc792d0c Merge branch 'develop' of github.com:boostorg/geometry into fix/bounding_box_computation_in_get_rescale_policy 2015-06-03 17:24:57 +03:00
Menelaos Karavelas
45d27e9878 [geometry] replace instances of "num_points() == 0" with "is_empty()" 2015-06-03 17:07:34 +03:00
barendgehrels
d7814c160d [buffer] avoid MSVC warnings about size_t/int 2015-06-03 14:58:58 +02:00
barendgehrels
2b1dfaddb6 [buffer] use the new is_empty 2015-06-03 14:50:37 +02:00
Barend Gehrels
687997a35f Merge pull request #303 from mkaravel/feature/is_empty
New algorithm: is_empty
2015-06-03 14:46:55 +02:00
Menelaos Karavelas
f7a4546be2 [algorithms][is_empty] simplify implementation of polygon_is_empty::apply()
into a single statement
2015-06-03 15:43:50 +03:00
barendgehrels
dc576f3d32 [projections] add names 2015-06-03 14:40:36 +02:00
Menelaos Karavelas
8ce6727b89 [algorithms][is_empty] update polygon_is_empty class to check interior rings as well 2015-06-03 15:17:43 +03:00
barendgehrels
74f60c3fc0 [projections] add original function/macro plus comments, and extra comment 2015-06-03 13:22:46 +02:00
barendgehrels
bde1a3d1cd Add mpl where used and not yet included, 2015-06-03 12:11:03 +02:00
barendgehrels
0c0a870e3d Add range.hpp where used and not yet included, 2015-06-03 12:04:16 +02:00
barendgehrels
5a1255d677 [buffer] fix, if input geometry is empty, don't calculate envelope nor rescale
strategy. Just return.
2015-06-03 11:49:39 +02:00
Adam Wulkiewicz
1ef54bb437 Merge pull request #287 from awulkiew/fix/area_huiller
Fix/area huiller
2015-06-03 09:27:05 +02:00
Adam Wulkiewicz
66e27188c1 Merge pull request #201 from awulkiew/feature/geographic
Feature: New geographic distance and side strategies
2015-06-03 09:12:07 +02:00
Menelaos Karavelas
573aa372d6 [algorithms][is_empty] replace uses of boost::size() by boost::empty() 2015-06-03 01:27:25 +03:00
Menelaos Karavelas
bcf9d63568 [algorithms][is_empty] add new algorithm is_empty, which returns true if the
geometry is the empty set
2015-06-03 01:04:24 +03:00
Menelaos Karavelas
9c248b82b1 [algorithms][check_iterator_range] apply coding rules 2015-06-02 10:17:03 +03:00
Menelaos Karavelas
5b370fdeb5 [algorithms][buffer] update use of envelope_range<> (needs more template parameters) 2015-06-02 00:07:40 +03:00
Menelaos Karavelas
a8c1eeaab3 [algorithms][envelope] add range of dimensions as template parameters to dispatch::envelope<>;
update implementation to follow the design of implementing envelope wrt a range of dimensions;
2015-06-02 00:07:04 +03:00
Menelaos Karavelas
31fe43b5ef [algorithms][expand] add range of dimensions as template parameters to dispatch::expand<>;
update implementation to follow the design of implementing expand wrt a range of dimensions;
2015-06-02 00:01:52 +03:00
Menelaos Karavelas
da9b4c9939 [policies][rescale policy] apply coding rules; polish code; fix conditional expression;
add comment regarding the computation of the bounding box when the geometries are in
the spherical equatorial or geographic coordinate system;
2015-06-01 23:45:52 +03:00
barendgehrels
aca3a922fd [projections] fix healpix add brackets around min/max 2015-06-01 20:46:25 +02:00
Menelaos Karavelas
87052dceba [policies][rescale policy] compute number of points of each geometry only once 2015-06-01 16:21:27 +03:00
Menelaos Karavelas
2ecf2d393a [policies][rescale policy] initialize the rescale policy only if the input geometries are non-empty;
this fixes unit test failures (union, intersection, difference) when
BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING is enabled;
2015-06-01 13:10:45 +03:00
barendgehrels
85a0b53413 [projection] remove now redundant constants 2015-05-31 17:17:29 +02:00
barendgehrels
882be35989 [projections] replace PI variants in generated code 2015-05-31 17:17:08 +02:00
barendgehrels
5229c7a1e3 [projections] replace PI variants in impl code 2015-05-31 17:12:43 +02:00
barendgehrels
b44a01b3c2 [projections] replace HALFPI 2015-05-31 16:50:08 +02:00
barendgehrels
ad2c45132d [projections] changes in replacements of M_PI 2015-05-31 16:40:34 +02:00
barendgehrels
c2fbdd8d83 [projections] change in generation, replace DEG_TO_RAD v.v. by d2r 2015-05-31 16:25:34 +02:00
barendgehrels
f88b1376b9 [projections] add more of original comment 2015-05-31 14:54:40 +02:00
barendgehrels
52ac821bde [projections] add per-file copyright messages 2015-05-31 14:34:09 +02:00
barendgehrels
147df5988f [projections] change in generation 2015-05-31 14:22:51 +02:00
barendgehrels
c3388d7398 [projections] add healpix 2015-05-31 13:26:25 +02:00
Menelaos Karavelas
92a02108de Merge pull request #298 from mkaravel/fix/ticket_11346
Fix for Boost Trac Ticket #11346
2015-05-30 19:35:11 +03:00
Adam Wulkiewicz
f00f4b14c4 [relate] Explicitly specify relate::set<> namespace.
Suppress GCC warnings by casting mpl::size value to std::size_t.
2015-05-30 00:09:08 +02:00
Adam Wulkiewicz
76455f347b Merge branch 'develop' into feature/geographic
Conflicts:
	test/strategies/Jamfile.v2
2015-05-29 16:29:50 +02:00
Menelaos Karavelas
4a396f710f [algorithms][overlay] fix copyright years 2015-05-29 08:56:47 +03:00
Menelaos Karavelas
7cf9a968c9 [algorithms][overlay][relate][turns] propagate the robustness policy
to the computation of turns for overlays of L/L geometries
2015-05-29 01:30:01 +03:00
barendgehrels
b69d9a8203 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-28 23:20:42 +02:00
barendgehrels
40d22d5858 [projections] ad missing includes 2015-05-28 23:18:53 +02:00
barendgehrels
368849319d [projections] resolve ambiguity for older MSVC versions in sqrt(2) 2015-05-28 23:18:23 +02:00
Menelaos Karavelas
c844000d0e Merge pull request #289 from mkaravel/feature/envelope_and_expand_for_spherical_cs
New feature: envelope and expand for spherical equatorial coordinate system
2015-05-28 21:04:06 +03:00
Menelaos Karavelas
2aec831e38 [view][detail][boundary view] fix copyright year 2015-05-28 13:15:09 +03:00
Menelaos Karavelas
6765cdc670 [views][detail][boundary view] add implementation for boundary view:
for areal geometries, i.e., ring, polygon and multi-polygon,
detail::boundary_view<Geometry> provides a view of the boundary of the
geometry as a linear geometry (for rings the boundary view's geometry type
is lineatring, whereas for the other two the boundary view's geometry type
is multilinestring)
2015-05-28 12:01:06 +03:00
Menelaos Karavelas
bf2362ed52 [algorithms][inbtersection] add dispatch implementation for intersection(areal, areal, linear) 2015-05-28 11:57:34 +03:00
Menelaos Karavelas
fdfd875a55 [views][identity view][closeable view] make indentity and closeable views copyable
(by storing a reference wrapper to the range instead of a range reference)
2015-05-28 11:54:53 +03:00
barendgehrels
099652b03c Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-27 23:32:15 +02:00
barendgehrels
ac529bc710 [projections] cast aperture for power (MSVC ambiguity) 2015-05-27 23:22:06 +02:00
barendgehrels
599b7bafb7 [projections] initialize possibly uninitialized variable 2015-05-27 23:21:27 +02:00
barendgehrels
5db1c0216f [projections] initialize possibly uninitialized variable 2015-05-27 23:01:11 +02:00
barendgehrels
dc9cbf1407 [projections] ignore set but unused variable 2015-05-27 23:00:44 +02:00
barendgehrels
355c677f97 [projection] change in generation - move ignore_unused function calls 2015-05-27 22:39:07 +02:00
Adam Wulkiewicz
8730f3741e [policies] Remove obsolete de9im intersection policy. 2015-05-27 15:12:14 +02:00
Adam Wulkiewicz
62f43a5c03 [relate][strategies] Pass StaticMask as function parameter. 2015-05-27 14:04:46 +02:00
barendgehrels
49b37bf4ad [warning] Avoid warning for gcc in svg generation 2015-05-27 13:07:03 +02:00
Menelaos Karavelas
6953933c9b Merge branch 'develop' of https://github.com/boostorg/geometry into fix/ticket_11346 2015-05-27 12:01:12 +03:00
barendgehrels
d506f1645d [buffer] add missing assert 2015-05-27 10:57:07 +02:00
barendgehrels
cdf014e35d [buffer] propagate error information from strategy to buffer inserter 2015-05-27 10:56:56 +02:00
Menelaos Karavelas
585b3bca50 [iterators][segment iterator] fix for boost trac ticket #11346
Problem: segment iterator does not work with point iterators that return
a value instead of a reference when dereferenced.
Fix: check the if the reference type of the point iterator is indeed a
reference or not and use a pointing_segment or a segment as the value type
of the segment iterator, respectively.
2015-05-27 09:19:08 +03:00
Adam Wulkiewicz
593521980a Merge branch 'develop' into feature/relate
Conflicts:
	doc/release_notes.qbk
2015-05-26 17:26:38 +02:00
Adam Wulkiewicz
3893f2085b Merge branch 'feature/relate' of github.com:awulkiew/geometry into feature/relate 2015-05-26 17:19:58 +02:00
Adam Wulkiewicz
79561464bf [relate] Change the order of template parameters (Mask at the end) and remove the mask default parameter. 2015-05-26 17:15:03 +02:00
Adam Wulkiewicz
1df894c44a [centroid][test] Update copyrights. 2015-05-26 00:44:56 +02:00
Adam Wulkiewicz
a7d8da4249 [centroid][strategies] Avoid filling centroid with NaN coordinates.
Check the intermediate results using math::isfinite().

Calculate the output directly using the distance_type/calculation_type
and casting at the end, without converting intermediate results to
coordinate_type.
2015-05-25 15:19:42 +02:00
Adam Wulkiewicz
1bff0ad9e9 [math] Fix equals() for INF and -INF. 2015-05-24 14:26:53 +02:00
Adam Wulkiewicz
b9ee6f0d51 [math] Include missing header and add missing namespace. 2015-05-24 13:48:22 +02:00
barendgehrels
ad088fcf02 [buffer] stop in case of numeric errors in side strategy 2015-05-24 11:22:45 +02:00
barendgehrels
5370e2494d [buffer][math] check for inf when checking on equals
This fixes an error in buffer for geometries with extreme coordinate differences
(though the generated buffer is not correct then)
2015-05-23 23:45:24 +02:00
barendgehrels
2227c30bb4 [buffer] check return value of iterate to avoid using uninitialized points
if iterate fails (this can happen by extreme differences in coordinates)
2015-05-23 22:40:48 +02:00
Menelaos Karavelas
b0290dd8e7 [geometries][helper geometry] add comment about the specialization of default_units
for the Cartesian coordinate system
2015-05-23 00:28:44 +03:00
Menelaos Karavelas
e58f535918 [views][indexed_point_view] fix namespace issue appearing in assign unit test:
Problem: the compiler sees detail::indexed_point_view used inside the traits namespace
and looks it up in traits::detail namespace;
Fix: qualify detail::indexed_point_view with geometry namespace
2015-05-22 10:08:48 +03:00
Menelaos Karavelas
2deae95273 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-05-22 10:06:35 +03:00
Menelaos Karavelas
144fca31b8 [algorithms][envelope][expand] replace use of convert_units<> by bg::transform() 2015-05-22 09:52:24 +03:00
Menelaos Karavelas
6c77395443 [test][algorithms][envelope] rearrange and clean up code 2015-05-22 09:48:04 +03:00
Adam Wulkiewicz
3c958e4200 [buffer][strategies] Replace metafunction pow and divisions with bitwise shifts. 2015-05-20 19:27:10 +02:00
Adam Wulkiewicz
a9f1e7fc3d [buffer][strategies] Fix multiplicable_integral::operator<. 2015-05-20 17:58:53 +02:00
Adam Wulkiewicz
7ffd9d32b2 Merge pull request #297 from awulkiew/fix/buffer
Buffer fixes.
2015-05-20 17:19:23 +02:00
barendgehrels
8f46b81dfa [projections] Ignore unused static functions 2015-05-20 16:57:03 +02:00
Adam Wulkiewicz
c5dd2fd613 [buffer][strategies] Improve style and add comments to multiplicable_integral used in side_of_intersection. 2015-05-20 16:52:59 +02:00
barendgehrels
9ed1ad8445 [buffer][fix] Fix creating ring_properties which are unassigned 2015-05-20 16:28:27 +02:00
barendgehrels
106f7258f6 [Projections] Change in generation (whitespace, comments) 2015-05-20 14:31:52 +02:00
barendgehrels
6c5d7a692a [projections] fix mutable (change in generation) 2015-05-20 12:59:10 +02:00
barendgehrels
571561524a [geometry] Avoid making methods which were static inline 2015-05-20 11:18:02 +02:00
barendgehrels
401b308a83 [projections] change in generation (white space only) 2015-05-20 11:14:33 +02:00
barendgehrels
d44e09f23e [projections] extend documentation (changes in generation) 2015-05-20 11:09:44 +02:00
Menelaos Karavelas
02f6f04107 [util][math] remove convert_on_spheroid.hpp file; functionality is available
via the new algorithm detail::convert_units();
2015-05-20 11:50:06 +03:00
Menelaos Karavelas
1d5a1dd9dd [algorithms][envelope][expand] polish code to follow coding rules;
make use of new detail::normalize() and detail::convert_units() algorithms;
re-implement algorithms so that they are geometry-centric rather that coordinate-centric;
2015-05-20 11:47:29 +03:00
barendgehrels
d1bb625a41 [projections] fix d2r / r2d to new approach 2015-05-20 10:45:18 +02:00
Menelaos Karavelas
b8644092c1 [util][math] deactivate normalization for latitude (it can be activated back if the
macro BOOST_GEOMETRY_NORMALIZE_LATITUDE is defined)
2015-05-20 11:29:50 +03:00
Menelaos Karavelas
ba93049547 [algorithms][disjoint] make use of detail::normalize() algorithm to normalize spherical
and geographic coordinates; also modify algorithm for points in the spherical equatorial
and geographic coordinate systems: check for disjointness also the coordinates with index 2 and above;
2015-05-20 11:27:14 +03:00
Menelaos Karavelas
896b67047d [algorithms][convert_units] add new algorithm detail::convert_units() :
this alghorithm converts the units of points and boxes from degrees to radians
and from radians to degrees (if input and output units are the same the geometry
is not modified)
2015-05-20 11:24:57 +03:00
Menelaos Karavelas
5fa14f06bc [algorithms][normalize] add algorithm detail::normalize() :
this algorithm normalizes the spherical equatorial and geographic coordinates
of points and boxes
2015-05-20 11:23:22 +03:00
Adam Wulkiewicz
b57def597f [buffer] Suppress msvc warnings. 2015-05-20 01:00:01 +02:00
Adam Wulkiewicz
8d3e2b180f [buffer] Replace Multiprecision with temporary solution. 2015-05-20 00:54:17 +02:00
Adam Wulkiewicz
aff4443f06 [relate] Check masks characters, both compile-time and run-time.
Compile-time mask is checked using BOOST_MPL_ASSERT_MSG.
Run-time mask constructors may throw an invalid_input_exception.
2015-05-18 19:09:05 +02:00
Adam Wulkiewicz
8262ee652a [core] Add invalid_input_exception. 2015-05-18 19:05:44 +02:00
Menelaos Karavelas
465fc75ece [util][math] remove unused code 2015-05-18 15:25:22 +03:00
Barend Gehrels
7379fc5094 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-17 09:07:07 +02:00
Menelaos Karavelas
e66f255acf Merge branch 'develop' of https://github.com/boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-05-14 12:23:19 +03:00
Barend Gehrels
f9589da717 [projections] Parse more characteristics 2015-05-13 21:01:47 +02:00
Barend Gehrels
a00979eca0 [projections] fix hypot in generation 2015-05-13 20:57:14 +02:00
Menelaos Karavelas
5a0ef46981 [util][math] add missing inlines in r2d<>() and d2r<>() 2015-05-13 19:30:20 +03:00
Barend Gehrels
9d9ee614a1 Merge branch 'develop' into feature/buffer 2015-05-13 18:01:32 +02:00
Adam Wulkiewicz
605031528d [relate] Fix style according to guidelines and remove unused code/comment. 2015-05-13 17:52:42 +02:00
Adam Wulkiewicz
f94e51ebe3 Merge branch 'develop' into feature/geographic
Conflicts:
	test/strategies/vincenty.cpp
2015-05-13 15:33:46 +02:00
Adam Wulkiewicz
dd2ff33b52 Merge pull request #292 from mkaravel/fix/degree_radian_converter
Fix degree_radian_converter
2015-05-13 14:12:24 +02:00
Adam Wulkiewicz
6029a4cd1b Merge pull request #271 from mkaravel/feature/disjoint_point_point_on_spheroid
New feature: disjoint(point, point) for points on a spheroid
2015-05-13 14:11:35 +02:00
Barend Gehrels
6158064410 [buffer] performance optimization: set the center point for buffers around
(multi)points, calculate min/max radius
and (when checking turn w.r.t. piece) check turn distance to center,
in most cases leave early

Including unit test. For multipoint_b_500k this increases performance with
a factor 6 (340 seconds -> 55 seconds)

Note, this is done for buffers around points but could be done for other
geometry types too (using e.g. centroid)
2015-05-13 13:08:22 +02:00
Barend Gehrels
61d3ae6b78 [buffer] performance improvement for point-pieces:
first check if it is in range

Including adaption of unit tests
Performance goes from 24 seconds (with side_of_intersection)
or 14 seconds (without) to 10 seconds (with side_of_intersection)
2015-05-13 10:58:07 +02:00
Barend Gehrels
b546a6fa21 Merge branch 'develop' into feature/buffer 2015-05-13 10:14:10 +02:00
Barend Gehrels
784a6bcb17 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-13 10:10:44 +02:00
Barend Gehrels
0d97706ffa [projections] fix isea (M_PI) 2015-05-13 10:10:09 +02:00
Adam Wulkiewicz
be0dde6f21 Merge pull request #293 from jeremy-murphy/develop
[projections] fix project_inverse_transformer::apply
2015-05-13 04:09:50 +02:00
Adam Wulkiewicz
e5a6e90280 [relate][strategies] Improve the consistency of implementation and style.
Rename relate_base to relate_impl.
Rename base_t to base_type.
Implement all predefined static masks as metafunction taking two
Geometries (consistency).
Add comments about reasons of commenting out some parts of the code.
2015-05-12 13:53:19 +02:00
Menelaos Karavelas
99788fba57 [algorithms][intersection] update copyright header 2015-05-11 13:38:09 +03:00
Menelaos Karavelas
926bbb8005 [algorithms][intersection] propagate robust policy to
detail::intersection::clip_range_with_box; this fixes Boost Trac ticket #11268;
2015-05-11 13:37:57 +03:00
Jeremy W. Murphy
ab7a00442e [projections] fix project_inverse_transformer::apply
The call to point_to_point was using the wrong namespace and function call.
2015-05-11 14:14:32 +10:00
Menelaos Karavelas
535a7049f9 [geometry] replace uses of constants math::d2r and math::r2d by corresponding free functions 2015-05-08 12:23:23 +03:00
Menelaos Karavelas
fbc568ed51 [strategies][transform] replace constants r2d and d2r by corresponding free functions;
to do so, make sure that the type passed to r2d<>() and d2r<>() is promoted to a
floating point number
2015-05-08 12:21:35 +03:00
Menelaos Karavelas
30f980519f [core][radian access] replace use of constants d2r and r2d by the corresponding free functions 2015-05-08 12:19:18 +03:00
Menelaos Karavelas
1deb1e2097 [util][math] replace constants d2r and r2d by free functions 2015-05-08 12:17:38 +03:00
Menelaos Karavelas
fad1ce69f0 [extensions][ttmath] add missing mathematical functions for ttmath_big
and specialize detail::math::equals for ttmath_big and ttmath::Big<E, M>
2015-05-07 14:00:10 +03:00
Menelaos Karavelas
6661fadf7e [core][radian access] modify implementation of degree_radian_converter
to use conversion constants that are consistent with the coordinate type
of the geometry
2015-05-06 12:50:22 +03:00
Barend Gehrels
9ca4930e6c [projections] fix gn_sinu, remove ellipsoid models for all but sinu
because they are marked as invalid and indeed do not work correctly
2015-05-05 20:37:25 +02:00
Barend Gehrels
50ac56e885 [projections] stere, tmerc: ordered differently (alphabetically per derived projection) 2015-05-05 20:13:18 +02:00
Barend Gehrels
1a1304188c [projections][minor] added whiteline in generation 2015-05-05 20:12:08 +02:00
Barend Gehrels
23d6464615 [projections] aeqd (guam): change in conditions 2015-05-05 20:11:38 +02:00
Barend Gehrels
d460ae8eb8 [buffer] enable side_of_intersection approach by default 2015-05-05 16:43:59 +02:00
Barend Gehrels
c5ef4f912d [buffer][fix] fix errors in multi_point cases
by using side_of_intersection in point_piece
2015-05-05 16:01:08 +02:00
Barend Gehrels
034a5461f0 Merge branch 'develop' into feature/buffer 2015-05-05 10:08:49 +02:00
Barend Gehrels
80da683b77 [projections] (fix in generation) enable dynamic entries of stere,tmerc 2015-05-04 22:51:25 +02:00
Menelaos Karavelas
e8f82e62ea [util][spheroid] add utilities for converting points and boxes on the spheroid
from one unit type to another
2015-05-04 11:10:22 +03:00
Menelaos Karavelas
f224dcc4e6 [algorithms][envelope] add new dispatch struct for envelope algorithm 2015-05-04 11:09:22 +03:00
Menelaos Karavelas
2682c8a370 [algorithms][envelope] fix error in implementation for envelope(ring, mbr) 2015-05-04 11:08:25 +03:00
Menelaos Karavelas
11cb594c19 [algorithms][envelope] when checking intersection with antimeridian, consider
only segments with longitude range strictly less than pi
2015-05-04 10:21:15 +03:00
Menelaos Karavelas
feb780facc [algorithms][buffer] update call to detail:✉️:envelope_range<>() following
the new implementation for envelope
2015-05-04 10:19:27 +03:00
Menelaos Karavelas
f7f9265682 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-05-04 10:18:26 +03:00
Menelaos Karavelas
bb18c201c9 [algorithms][envelope] restore generic implementation for rings (until the implementation
is finished for the spherical equatorial coordinate system)
2015-05-04 10:12:16 +03:00
Menelaos Karavelas
4ce9883a25 [algorithms][expand] re-arrange implementation of the expand algorithm 2015-05-04 10:10:49 +03:00
Menelaos Karavelas
b34f620bc5 [algorithms][expand] move implementation for expand(box, box) to separate file
and add implementation for expand(box, box) in the spherical equatorial and
geographic coordinate systems
2015-05-04 10:09:05 +03:00
Menelaos Karavelas
b2ab23c8bc [algorithms][expand] move implementation for expand(box, segment) to separate
file and implement expand(box, segment) for segments in the spherical
equatorial coordinate system (by reducing to expand(box, box))
2015-05-04 10:06:46 +03:00
Menelaos Karavelas
4041f20114 [algorithms][expand] move implementation for indexed geometries to separate file 2015-05-04 10:06:20 +03:00
Menelaos Karavelas
4a66958b67 [algorithms][expand] move implementation for expand(box, point) to separate file
and add implementation for expand(box, point) for spherical equatorial and geographic
coordinate systems
2015-05-04 09:46:26 +03:00
Menelaos Karavelas
c196ef213c [algorithms][expand] re-implement dispatch struct for expand algorithm and
move it to algorithms/dispatch directory
2015-05-04 09:42:28 +03:00
Barend Gehrels
5e54fbc510 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-02 20:55:50 +02:00
Barend Gehrels
b126341d00 [projections] changes in generation, remove redundant empty preceding/trailing lines 2015-05-02 20:55:12 +02:00
Barend Gehrels
b7eb50c9ec [projections] add new projection igh from proj 4.9.1
including unit test in a new unit test using combined projections
2015-05-02 20:54:22 +02:00
Barend Gehrels
9befaa94e4 [projections] re-add empty lines where in original
This makes it closer to original
2015-05-02 20:37:37 +02:00
Barend Gehrels
9d6eb2befa [projections] changes in generation, remove commented fwd/inv/fac 2015-05-02 20:35:56 +02:00
Barend Gehrels
bf623b5d7c [projections] changes in generation - avoid splitting lines 2015-05-02 20:20:54 +02:00
Adam Wulkiewicz
178b0050d7 Merge pull request #257 from mkaravel/feature/set_ops_pointlike_linear
New feature: intersection and difference for pointlike/linear geometries
2015-05-02 04:05:18 +02:00
Adam Wulkiewicz
cb494c9a16 [relate] Fix run-time mask ctor taking a string and add another one.
The fix - prevent overflow.
New ctor taking zero-terminated string.
Furthermore add doxygen documentation for the matrix member functions.
2015-05-01 17:23:58 +02:00
Adam Wulkiewicz
85bcc0c51a [relate] Add relate() and relation() to geometry.hpp
Also adjust doxygen groups.
2015-05-01 02:55:25 +02:00
Adam Wulkiewicz
a461336ca2 [relate] Add variant support for relate() and relation(). 2015-05-01 02:20:30 +02:00
Adam Wulkiewicz
18cb2fe330 [relate] Divide relate() and relation() code into interface and implementation.
Separate the optional code, place it in the details.
2015-05-01 01:30:46 +02:00
Adam Wulkiewicz
7eab5672fa [relate] Move DE9IM-related code into separate file (de9im.hpp).
Move predefined static masks to namespace detail::de9im.
2015-04-30 18:50:12 +02:00
Adam Wulkiewicz
a7fee32a7e [relate] Move relate() code from details and refactor the code.
- Move relate() to geometry namespace and change its purpose slightly - always require a mask and check a relation.
- Implement relation() function returning a matrix (previously relate() did it).
- Move/rename matrix9, mask9 and static_mask to de9im::matrix, de9im::mask and de9im::static_mask respectively.
- Implement logical ORing of static masks with operator||
- Remove or comment-out unneeded code (e.g. comment out the unused de9im struct defined in overlay)
2015-04-30 16:39:37 +02:00
Barend Gehrels
42550568ee [projections] add etmerc (including unit tests) 2015-04-29 16:58:38 +02:00
Menelaos Karavelas
11f8679fb0 [algorithms][envelope] restructure file structure for the envelope algorithm 2015-04-29 17:33:08 +03:00
Adam Wulkiewicz
d2c5b03655 [strategies][huiller] Restore a comment about the subtraction of longitudes. 2015-04-29 16:31:08 +02:00
Menelaos Karavelas
02e7a6d948 [algorithms][envelope] move existing implementation for envelope(multipoint, mbr)
to new file and add implementation for envelope(multipoint, mbr) for the spherical equatorial
and geographic coordinate systems; the latter implementation is reduced to the
maximum gap problem
2015-04-29 17:29:14 +03:00
Menelaos Karavelas
55d4c0640b [algorithms][envelope][spherical] move existing implementation for
envelope(multilinestring, mbr) to new file, add dispatching for
implementation of envelope(multilinestring, mbr) for the spherical
equatorial coordinate system
2015-04-29 17:25:59 +03:00
Adam Wulkiewicz
9e005cb756 [strategy][huiller] Improve the style according to guidelines and use better names for variables. 2015-04-29 16:11:15 +02:00
Menelaos Karavelas
7b807c7b4c [algorithms][envelope][spherical] move existing implementation for
envelope(linestring, mbr) to separate file and add implementation
for envelope(linestring, mbr) for the spherical equatorial coordinate
system
2015-04-29 17:06:42 +03:00
Menelaos Karavelas
d619bd8b07 [algorithms][envelope] add implementation for finding the envelope of a
range of longitude intervals and range of boxes (needed for multi-geometries)
using the maximum gap algorithm for intervals
2015-04-29 17:00:18 +03:00
Menelaos Karavelas
aca2e0497c [algorithms][envelope] adapt old implementation of envelope for ranges
(in the new implementation assign_inverse is not used)
2015-04-29 16:54:21 +03:00
Menelaos Karavelas
ecbc99875a [algorithms][max interval gap] add implementation for the maximum gap
problem for ranges of intervals
2015-04-29 16:50:37 +03:00
Menelaos Karavelas
49fd71739f [algorithms][sweep] add generic visitor-based implementation for sweep-like algorithms 2015-04-29 16:24:39 +03:00
Menelaos Karavelas
c64404808c [algorithms][envelope][spherical] move implementation for envelope(segment, mbr)
to a different file and add implementation for envelope(segment, mbr) for the
spherical equatorial coordinate system
2015-04-29 16:20:27 +03:00
Menelaos Karavelas
ae08aac3a5 [algorithms][envelope][spherical] move existing implementation of
envelope(box, mbr) to separate file and add implementation for
envelope(box, mbr) for boxes in the spherical equatorial and geographic
coordinate systems
2015-04-29 16:10:27 +03:00
Menelaos Karavelas
0d4fb3d438 [algorithms][envelope][spherical] move existing implementation for
envelope(point, mbr) in separate file and implementation for envelope(point, mbr)
for the spherical equatorial and geographic coordinate system
2015-04-29 16:02:13 +03:00
Barend Gehrels
68eac273d3 [projections] expose error code 2015-04-29 14:56:48 +02:00
Menelaos Karavelas
3809006a6c [algorithms][envelope][spherical] implement struct that determines is a segment intersects the antimeridian 2015-04-29 15:54:11 +03:00
Menelaos Karavelas
932d2213ca [util][math][spherical][geographic][normalize] introduce free function
normalize_spheroidal_box_coordinates() that normalizes the coordinates
of a box in the spherical equatorial and geographic coordinate systems
2015-04-29 15:02:45 +03:00
Barend Gehrels
c6eb7748eb [projection] replace redundant comments 2015-04-29 13:46:26 +02:00
Barend Gehrels
2ad12a62f3 [projection] replace exit with throw 2015-04-29 13:40:54 +02:00
Barend Gehrels
c81255cf5e [projections] add new projection isa
include entry in unit test (tested with proj4.9.1)
2015-04-29 13:35:14 +02:00
Barend Gehrels
c5c4c90c87 [projections] omerc, remove now unused inlined function 2015-04-29 13:00:06 +02:00
Barend Gehrels
3937486a0f [projections] changes in white lines 2015-04-29 12:59:37 +02:00
Barend Gehrels
2d3d4780cc [projections] natearth, regeneration 2015-04-29 11:44:20 +02:00
Barend Gehrels
cc5f891b1a [projections] enable sphere for utm, which can be done if the throw
at non par.es is skipped
2015-04-29 11:07:59 +02:00
Barend Gehrels
ca9fa7260d [projections] added spheroid models skipped earlier 2015-04-29 10:51:42 +02:00
Adam Wulkiewicz
7513940369 [strategies] Fix area_huiller for polygons containing points with 0 longitude. 2015-04-29 03:22:24 +02:00
Menelaos Karavelas
a9eb7c648b [util][math][spherical] apply coding rules (put space after !) 2015-04-28 21:32:53 +03:00
Barend Gehrels
d868e4ad61 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-04-28 19:18:38 +02:00
Adam Wulkiewicz
c46eef0659 Merge pull request #284 from mkaravel/feature/add_two_pi_and_half_pi_constants
Add two-pi and half-pi constants
2015-04-28 14:00:26 +02:00
Adam Wulkiewicz
0c59d13c75 Merge pull request #285 from mkaravel/fix/use_disjoint_point_point_in_wkt_write
Reduce dependency on geometry::disjoint algorithm
2015-04-27 16:55:43 +02:00
Menelaos Karavelas
70cc7fdb47 [strategies][spherical][area][huiller] update the URL for one of the references 2015-04-27 17:47:29 +03:00
Barend Gehrels
6d3fb0f11b [projections] remove old variable warning protections 2015-04-27 15:50:18 +02:00
Barend Gehrels
a8282b5383 [projections] fix missing inline calls 2015-04-27 15:49:50 +02:00
Menelaos Karavelas
914c2e5f80 [io][wkt] reduce dependency on geometry::disjoint algorithm by calling
detail::disjoint::disjoint_point_point
2015-04-27 15:07:33 +03:00
Menelaos Karavelas
7031e84c95 [extensions][ttmath] fix wrong definition of pi and half-pi for ttmath::Big<> 2015-04-27 13:44:15 +03:00
Menelaos Karavelas
9c50c6f02c [util][math] use math::two_pi<>() and math::half_pi<>() instead of computing them from math::pi<>() 2015-04-27 12:58:35 +03:00
Menelaos Karavelas
3800cb4830 [strategies][spherical][area] use math::two_pi<>() and math::half_pi<>()
instead of computing them from math::pi<>()
2015-04-27 12:48:47 +03:00
Menelaos Karavelas
d895a12b96 [strategies][cartesian][buffer] use math::two_pi<>() instead of computing it from math::pi<>() 2015-04-27 12:48:02 +03:00
Menelaos Karavelas
1c3fba8b54 [extensions][ttmath] add specializations for define_two_pi and define_half_pi 2015-04-27 12:43:05 +03:00
Menelaos Karavelas
5c13b26592 [util][math] add free functions for recovering 2*pi and pi/2 2015-04-27 12:41:51 +03:00
Barend Gehrels
01b20f50da [projections] fixes in ignore_unused
Now checked by scanning if really (un)used
2015-04-26 23:18:15 +02:00
Barend Gehrels
eec5d4efd0 [projections] ob_tran, changes in generation 2015-04-26 18:02:35 +02:00
Barend Gehrels
0e06548aa6 [projections] small changes in generation (chamb/lcca) 2015-04-26 15:44:16 +02:00
Barend Gehrels
121f8b39c1 [projections] changes in includes, especially hypot, only necessary
in a few cases, and changes in order
2015-04-26 14:47:22 +02:00
Barend Gehrels
9f99289551 [projections] changes in mdist conform enfn/authset 2015-04-26 14:30:15 +02:00
Barend Gehrels
866aae97e0 [projections] changes in authset, conform enfn 2015-04-26 14:27:19 +02:00
Barend Gehrels
5607fa25b3 [projections] changes in generation (enfn)
result is closer to original
2015-04-26 12:36:59 +02:00
Barend Gehrels
9f9d59a515 [projections] add const (was accidentally removed in one function two commits away) 2015-04-26 10:56:15 +02:00
Barend Gehrels
e15b685a8d [projections] ONLY changes in empty lines (in generation) 2015-04-26 10:49:14 +02:00
Adam Wulkiewicz
105886e991 Merge pull request #283 from awulkiew/fix/arithmetic
Fix point arithmetic functions and centroid
2015-04-26 00:55:12 +02:00
Adam Wulkiewicz
a48df2a153 [extensions][wkb] Improve the coding style according to guidelines.
- use full names
- improve the indentation of template parameters lists
- comment-out the unused parameters names
2015-04-26 00:46:10 +02:00
Barend Gehrels
24f070a037 [projections][imw_p] changes in conversion (staying more close to original) 2015-04-25 20:58:02 +02:00
Barend Gehrels
3344766910 [projections] remove redundant return statements 2015-04-25 19:39:42 +02:00
Adam Wulkiewicz
ed7dc5f1df [arithmetic] Improve style according to guidelines.
- names
- lines length
2015-04-25 16:36:59 +02:00
Barend Gehrels
e4d49f1302 [projections] update to 4.9.1 (rest, no changes)
and removed some trailing spaces
2015-04-25 16:06:58 +02:00
Barend Gehrels
0e3ea68f54 [projections] add qsc from proj 4.9.1 2015-04-25 15:40:45 +02:00
Barend Gehrels
8c6b79b97e [projections] Upgrade to proj 4.9.1 for aeqd, geos, omerc
This does not need changes in unit tests.
2015-04-25 13:26:57 +02:00
Barend Gehrels
5c5ac136a7 [projections][aitoff] go to proj 4.9.1 which adds an invert projection for aitoff
includes unit test
2015-04-25 13:19:48 +02:00
Barend Gehrels
6877796160 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-04-25 13:16:39 +02:00
Adam Wulkiewicz
42d56f6116 [util][arithmetic] Fix a bug in point arithmetic operations.
Use more precise type for the calculation of the result.
Previously the type of the second operand was always used.
2015-04-24 17:20:15 +02:00
Adam Wulkiewicz
0f62bdc57e [extensions][wkb] Fix access to polygon rings + style changes.
Use return type (a reference) instead of copying rings.

Furthermore improve the code according to guidelines:
- put const keyword after the type
- take care about lines length
- add copyright notes
2015-04-24 13:23:24 +02:00
Adam Wulkiewicz
ed52199def [extensions][wkb] Fix GCC compilation errors and warnings. 2015-04-23 23:28:37 +02:00
Barend Gehrels
623a488abd [projections] ONLY: use boost::ignore_unused now 2015-04-23 19:42:01 +02:00
Barend Gehrels
6b3996da01 [projections] ONLY: updated copyright message 2015-04-23 19:32:17 +02:00
Barend Gehrels
0882d5adfc [projections] ONLY: fixed withspace 2015-04-23 19:27:02 +02:00
Adam Wulkiewicz
98aa98eedf Merge pull request #255 from mkaravel/feature/disjoint
Feature/disjoint: implement disjoint for multipoint/[multi]linestring
2015-04-23 17:23:05 +02:00
Adam Wulkiewicz
fbc453bb20 Merge pull request #145 from Norkart/add_wkb
Add support for writing geometries to WKB
2015-04-23 17:21:46 +02:00
Menelaos Karavelas
07b96a8f9e [algorithms][overlay P/L] replace detail::disjoint::disjoint_point_segment
by detail::disjoint::reverse_covered_by
2015-04-23 10:15:24 +03:00
Menelaos Karavelas
ee8d0ea335 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/set_ops_pointlike_linear 2015-04-23 10:13:54 +03:00
Menelaos Karavelas
7bd759dd0b [algorithms][disjoint] replace detail::disjoint::disjoint_point_segment
by detail::disjoint::reverse_covered_by
2015-04-23 10:04:50 +03:00
Menelaos Karavelas
be910c04e2 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint
Conflicts:
	doc/release_notes.qbk
2015-04-23 09:47:46 +03:00
Mats Taraldsvik
fb057e0832 [extensions][wkb] Support writing geometries to WKB format
Adds support for writing geometries to WKB format. This adds support for
writing point, linestring and polygon.
2015-04-23 08:11:28 +02:00
Mats Taraldsvik
ea22fa9540 [extensions][wkb] Change handling of wkb geometry_type to be more generic
The geometry type is changed to be more flexible
and able to handle multiple formats and different
dimensions in the future.
2015-04-23 08:11:15 +02:00
Barend Gehrels
52a27831f7 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-04-22 16:36:23 +02:00
Barend Gehrels
cb7521056f [projections] use proj4 4.8, changes in projection Robin 2015-04-22 16:36:08 +02:00
Barend Gehrels
8a66ade71a [projections] commit changes for new generation (minor code changes) 2015-04-22 15:54:04 +02:00
Barend Gehrels
aa1ec1c832 [projections] commit changes for new generation (comments only) 2015-04-22 15:53:29 +02:00
Barend Gehrels
3b79baadba [projections] commit changes for new generation (whitespace only) 2015-04-22 15:53:07 +02:00
Adam Wulkiewicz
34bdc44b10 [geometries] Rename magic names into more meaningful ones. 2015-04-22 15:19:28 +02:00
Adam Wulkiewicz
86df91ed56 [geometries] Implement detection of access to uninitialized or destroyed point/box. 2015-04-21 21:26:48 +02:00
Barend Gehrels
e5bd7daa5f Merge branch 'develop' into feature/buffer 2015-04-12 16:58:09 +02:00
Adam Wulkiewicz
34dba9be85 [geometries][doc] Add examples to descriptions of all geometries models. 2015-04-09 23:39:58 +02:00
Adam Wulkiewicz
c8d97f0528 [doc][geometries] Add example for model::box. 2015-04-09 21:48:06 +02:00
Adam Wulkiewicz
80fe541815 [geometries] Make the default ctor of non-complex geometries default function if possible. 2015-04-09 17:02:29 +02:00
Adam Wulkiewicz
bbb69c92f7 [geometries] Small compile-time check consistency improvement.
Add Point concept check to segment.
Move DimensionCount check from constructor to the body of a point class
and use MPL_ASSERT_MSG instead of STATIC_ASSERT.
2015-04-09 16:48:17 +02:00
Adam Wulkiewicz
aa58f4a022 [geometries][doc] Improve the description of constructors of non-complex geometries.
Add missing descriptions.
Unify the non-initializing default constructors descriptions.
2015-04-09 16:25:59 +02:00
Adam Wulkiewicz
e29125aff2 [geometries] Enable the support for std::initializer_list. 2015-04-09 16:15:23 +02:00
Barend Gehrels
9e69537ede [side] update side of intersection with fallback point,
and use multi_precision point to avoid large multiplications and overflow
2015-04-08 17:28:50 +02:00
Barend Gehrels
f6d6869b14 [less] add missing includes 2015-04-08 17:26:16 +02:00
Barend Gehrels
b1168415c7 [buffer] add side_of_intersection (still with conditional) 2015-04-08 17:25:53 +02:00
Adam Wulkiewicz
dcce545efb Merge pull request #277 from awulkiew/fix/sunos
Workarounds for SunOS
2015-04-08 17:23:53 +02:00
Adam Wulkiewicz
fccb4543a3 [iterators] Remove unneeded else branch in flatten_iterator. 2015-04-08 14:20:20 +02:00
Adam Wulkiewicz
65fa7653ba [algorithms][distance][is_valid] Explicitly get const iterators. 2015-04-08 14:18:40 +02:00
Barend Gehrels
0722e4ba13 [buffer][is_convex] add (non-complete) is_convex algorithm, and
convex property for buffered pieces
Including unit test.
2015-04-08 12:15:20 +02:00
Adam Wulkiewicz
3507106295 Merge pull request #244 from mkaravel/fix/make_partition_work_for_forward_ranges
Fix: make partition work for forward ranges
2015-04-06 14:12:43 +02:00
Adam Wulkiewicz
2b11233f00 Merge pull request #264 from mkaravel/fix/remove_deprecated_include_paths
Fix: remove deprecated include paths
2015-04-06 01:32:39 +02:00
Adam Wulkiewicz
6da360ee70 Merge pull request #278 from awulkiew/fix/cs
Rename occurrences of CS in extensions.
2015-04-05 02:26:27 +02:00
Adam Wulkiewicz
5a611caee2 Merge pull request #269 from mkaravel/feature/support_for_fmod
Feature : support for fmod free function from within the math namespace
2015-04-05 01:46:19 +02:00
Adam Wulkiewicz
5d714f94e2 [index][doc] Improve the description of iterator and query related functions.
Add info about the iterator category.
Add more examples.
Add missing doxygen groups for free functions.
2015-04-04 19:53:34 +02:00
Adam Wulkiewicz
34066a4796 [index] Add begin() and end() functions returning const_iterator to the rtree.
Adapt the rtree to the Boost.Range concept.
Tweek the description of functions.
2015-04-04 18:21:52 +02:00
Adam Wulkiewicz
7277f1f38b [index] Upgrade the category of query iterators to ForwardIterator. 2015-04-04 18:21:12 +02:00
Adam Wulkiewicz
5a3b023fc8 [extensions][projections] Rename CS constants to CS_ (and CN to CN_ for consistency). 2015-04-02 03:24:00 +02:00
Adam Wulkiewicz
9c7659c955 [extensions][gis][strategies] Rename CS template parameter to CoordinateSystem. 2015-04-02 03:23:11 +02:00
Adam Wulkiewicz
1113955b88 [algorithms][buffer] Explicitly get const random iterators. Use Range consistently. 2015-04-01 23:54:28 +02:00
Adam Wulkiewicz
2808beed3d [algorithm][iterator] Avoid preincrementation of temporaries. 2015-04-01 23:52:01 +02:00
Menelaos Karavelas
7658231aa4 Merge branch 'develop' of https://github.com/boostorg/geometry into fix/remove_deprecated_include_paths
Conflicts:
	test/algorithms/set_operations/difference/difference.cpp
2015-03-31 14:30:04 +03:00
Menelaos Karavelas
71f4642eb3 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint_point_point_on_spheroid
Conflicts:
	test/algorithms/relational_operations/Jamfile.v2
2015-03-31 13:39:57 +03:00
Menelaos Karavelas
ca74329345 [algorithms][disjoint] do not treat poles in a special way: normalization
of spherical coordinates takes care of that
2015-03-31 13:22:58 +03:00
Menelaos Karavelas
9eec41f53d [util][math] normalize the spherical coordinates for the north and south poles by
setting the longitude to zero; this way equality of points on the sphere/spheroid
amounts to equality of their normalized coordinates (for all points on the sphere/spheroid,
including the poles)
2015-03-31 13:20:34 +03:00
Barend Gehrels
714d01a1ea Merge branch 'develop' into bg-prepare 2015-03-30 18:24:44 +02:00
Menelaos Karavelas
494045809e [util][promote integral] guard use of int128 and uint128 by the macro
BOOST_GEOMETRY_ENABLE_INT128
2015-03-30 17:43:08 +03:00
Barend Gehrels
7f83ea6f49 Merge branch 'develop' into bg-prepare 2015-03-29 21:02:58 +02:00
Barend Gehrels
32ccdc79eb [minor] add const 2015-03-28 14:50:58 +01:00
Barend Gehrels
4be353a5e4 [minor] fix typo 2015-03-28 14:50:32 +01:00
Adam Wulkiewicz
d6ca52c90e [util] Avoid conversion of negative number to unsigned (MSVC warning). 2015-03-28 02:46:21 +01:00
Menelaos Karavelas
7b515316e7 [util][promote integral] re-implement detail::promote_integral::bit_size<>
in a more type safe way; split the implementation of promote_integral<>
for (fundamental) integral and other types (non-integral or user-defined)
so that for those types the compilation is simpler/faster;
2015-03-28 03:16:35 +02:00
Menelaos Karavelas
e169f80ad3 [util][promote integral] update inline documentation; polish code;
measure all sizes in bits rather than a mixture of bits and bytes;
2015-03-28 01:30:07 +02:00
Menelaos Karavelas
af1a3da823 [util][promote integral] add support for unsigned long long and uint128 2015-03-27 22:45:49 +02:00
Menelaos Karavelas
88009aa38b [util][promote integral] replace boost::integral_constant<std::size_t, Value>
by boost::mpl::size_t<Value> when possible (2 instances)
2015-03-27 14:18:23 +02:00
Menelaos Karavelas
74556828af [util][promote integral] re-implement the mpl::list loop using MPL list iterators;
add support for unsigned integral numbers (including a template parameter that
indicates whether they should be promoted to signed or unsigned numbers);
be more precise on the (bit) sizes required for the promoted type;
2015-03-27 11:50:38 +02:00
Menelaos Karavelas
90c2c5f288 [policies][relate][intersection points] move calls to get<> out of down-cast
of promoted type to coordinate type
2015-03-27 11:27:27 +02:00
Menelaos Karavelas
2651afa92b [util][promote integral] fix issue with boost::mpl::if_c not allowing
enum values as return types
2015-03-26 16:31:14 +02:00
Menelaos Karavelas
e0a0b8e3b1 [policies][relate][intersection_points] promote values to a larger integral
type in order to avoid overflow when computing the products:
  ratio.numerator() * dx     and     ratio.numerator() * dy
This change fixes ticket #10835
2015-03-26 08:49:18 +02:00
Menelaos Karavelas
abbb664226 [util][promote integral] add meta-function promote_integral<T> that promotes
a fundamental integral type T to another integral type with at least twice
the size of T
2015-03-26 08:44:08 +02:00
Barend Gehrels
9afda34db5 Merge branch 'develop' into bg-prepare
Conflicts:
	include/boost/geometry/extensions/contrib/ttmath_stub.hpp
2015-03-25 17:38:14 +01:00
Adam Wulkiewicz
57d55eb964 [index] Fix count() - access of destroyed temporary if convertible type passed. 2015-03-24 19:31:47 +01:00
Adam Wulkiewicz
0115da1dd3 [relate] Rename check() to more specific check_element() and check_matrix(). 2015-03-24 01:23:08 +01:00
Adam Wulkiewicz
efeb592d80 [index][doc] Improve the rtree description. 2015-03-23 17:53:08 +01:00
Adam Wulkiewicz
bd7b7da000 [index][doc] Small docs improvements. 2015-03-23 17:27:14 +01:00
Adam Wulkiewicz
a6ad1be145 Merge pull request #268 from mkaravel/ext/ttmath_support_for_fmod
Extensions: add ttmath support for fmod
2015-03-22 17:51:03 +01:00
Menelaos Karavelas
aac92cbd93 [extensions][ttmath] rename fmod() free function to mod() 2015-03-22 17:11:36 +02:00
Adam Wulkiewicz
b80a462d04 Merge pull request #270 from mkaravel/ext/define_ttmath_big_missing_arithmetic_operators
Extensions: define ttmath big missing arithmetic operators
2015-03-22 15:12:20 +01:00
Adam Wulkiewicz
e8fafc942d Merge pull request #272 from awulkiew/fix/cart_intersect2
Fix for cart_intersect and side_by_triangle - inconsistencies on MinGW and more (robustness)
2015-03-22 14:44:33 +01:00
Adam Wulkiewicz
d1358af447 Merge pull request #267 from awulkiew/fix/cart_intersect
[strategies][cart_intersect] Compare ratios denominators consistently.
2015-03-22 14:41:41 +01:00
Adam Wulkiewicz
d3f95f2cbb [index][doc] Remove manually enabled doxygen code for details since now it should be automatically generated. 2015-03-20 03:42:13 +01:00
Adam Wulkiewicz
cc4ac4599d [index][doc] Hide details in docs if DOXYGEN_NO_DETAIL is defined.
Change functions return types to unspecified.
Replace parameters defaults generated by functions/metafunctions with values.
Hide base classes.
2015-03-20 02:07:23 +01:00
Adam Wulkiewicz
b788a9e4ab [index] Rename node_auto_ptr with subtree_destroyer and auto_deallocator with scoped_dealloactor. 2015-03-19 23:39:42 +01:00
Adam Wulkiewicz
4514e325f9 [index] Move predicates and operators into detail::predicates namespace.
In order to use the operators only for predicates.
2015-03-19 23:36:32 +01:00
Adam Wulkiewicz
0f4ce76449 [index] Replace std::auto_ptr with boost::scoped_ptr in query_iterator. 2015-03-19 23:35:20 +01:00
Adam Wulkiewicz
91fb7241e5 [index] Support move_iterator in packing algorithm. 2015-03-19 01:25:34 +01:00
Adam Wulkiewicz
6eb80018c6 [index][pack_create] Fix for iterators not returning true references.
Don't dereference iterators passed by the user in the expression where a
dereferenced value is passed into the translator/indexable-getter.

Without this fix if an iterator returns non-true reference (e.g. like
segment_iterator) and this reference is adapted to the Geometry concept
(like pointing_segment returned by segment_iterator) and the default
indexable<> getter is used (which returns a true reference), then a true
reference returned by it is a dangling reference corresponding to a
destroyed temporary object.
2015-03-17 02:49:54 +01:00
Adam Wulkiewicz
062a7abce9 [strategies][cart_intersect] Modify type of factor stored in the equals policy. 2015-03-16 17:26:20 +01:00
Adam Wulkiewicz
6098d419ba [util][math] Fix equals policies return types.
To avoid returning reference to temporary object.

Add equals_factor_policy "empty" specialization for integral types.
2015-03-16 17:22:13 +01:00
Menelaos Karavelas
bf96857a46 [util][math][mod] rename math::fmod() to math::mod() (more generic and descriptive name);
fix/update inline doc and comments; add default value to IsIntegral
template parameter of modulo_for_fundamental struct;
2015-03-16 12:09:36 +02:00
Menelaos Karavelas
449e381fda [util][math][spheroid] replace calls to math::fmod() by calls to math::mod() 2015-03-16 11:55:47 +02:00
Menelaos Karavelas
4230755b07 [extensions][ttmath] fix years in copyright header 2015-03-16 10:31:45 +02:00
Menelaos Karavelas
6dff815238 [extensions][ttmath] implement binary arithmetic operators for ttmath_big as free functions 2015-03-16 10:26:34 +02:00
Adam Wulkiewicz
f59f6fface [strategies][side_by_triangle] Use equals() with policy.
Compare the floating-point results of determinant (denominators) using
the epsilon scaled by the greatest of the differences of coordinates of
the points passed into the determinant formula.
2015-03-14 04:03:02 +01:00
Adam Wulkiewicz
dbeb823fcb [strategies][cart_intersect] Use equals() with policy.
Compare the floating-point results of cramer's rule (denominators) using the epsilon
scaled by the greatest of the differences of coordinates of the segments'
endpoints (the input of the determinant formula).
2015-03-14 03:55:44 +01:00
Adam Wulkiewicz
b5887efd5e [math] Add/improve math utils.
Add the support for policy calculating epsilon factor in equals().
Add greatest() algorithm - max() equivalent taking more than 2 parameters.
Add specialization of abs() for floating-point numbers.
2015-03-14 03:52:02 +01:00
Menelaos Karavelas
7b4798231e [extensions][ttmath] add missing arithmetic operators for ttmath_big:
unary and binary +, binary *, binary /;
these operators are needed so that the result of arithmetic operations
on objects of type ttmath_big is also of type ttmath_big (instead of
ttmath:Big<1,4> which is the base class for ttmath_big);
2015-03-14 01:51:04 +02:00
Menelaos Karavelas
ac3dd83744 [util][math] function to normalize coordinates on a spheroid:
* the normalized longitude lies in the interval (-180, 180] (in degrees)
* the normalized latitude lies in the interval [-90, 90] (in degrees)
2015-03-14 01:22:23 +02:00
Menelaos Karavelas
e6275f7178 [algorithms][disjoint][spheroid] implement disjoint(point, point) for
points on a spheroid (applicable to spherical equatorial and geographic
coordinate systems)
2015-03-14 01:20:38 +02:00
Menelaos Karavelas
5de5e93780 [util][math][fmod] add support for calls to fmod: for fundamental
floating-point numbers it calls std::fmod; for fundamental integral
numbers it calls operator%; for user defined number types the free
function fmod is called (lookup is activated in the global namespace,
the std namespace and the type's namespace);
2015-03-13 12:31:07 +02:00
Menelaos Karavelas
4940d8d669 [extensions][ttmath] add support for fmod free function 2015-03-13 12:22:57 +02:00
Adam Wulkiewicz
ec6f9148cd [strategies][cart_intersect] Compare ratios denominators consistently.
Compare both ratios' potential denominators, corresponding to both
segments. Furthermore, take into account the machine epsilon.
2015-03-12 23:03:27 +01:00
Menelaos Karavelas
bfcd9594d0 [geometry][multi] make boost/geometry/multi/multi.hpp include boost/geometry/geometry.hpp;
file kept for now for backward compatibility;
2015-03-12 10:32:50 +02:00
Menelaos Karavelas
35a85e671b [geometry] remove deprecated include referring to the
include/boost/geometry/multi/ directory
2015-03-12 00:23:07 +02:00
Menelaos Karavelas
cdb25bc741 [io][svg_mapper] remove deprecated includes referring to the
include/boost/geometry/multi/ directory
2015-03-12 00:22:27 +02:00
Menelaos Karavelas
8e36f8f873 [algorithms] remove deprecated includes referring to the
include/boost/geometry/multi/ directory
2015-03-12 00:20:51 +02:00
Adam Wulkiewicz
e5c40ca188 [buffer] Fix unused variable MSVC warning in analyse_turn_wrt_point_piece. 2015-03-11 03:56:04 +01:00
Adam Wulkiewicz
6828fd5bda [policies] Fix unused parameter warnings in direction policy. 2015-03-11 03:54:42 +01:00
Menelaos Karavelas
bda35568f0 [algorithms][overlay] implement intersection and difference for
pointlike/linear geometries
2015-03-10 16:49:35 +02:00
Menelaos Karavelas
84f0e306d9 [algorithms][disjoint] apply coding rules; (add space between "template" and "<");
implement disjoint(multipoint, linear) using partition;
2015-03-09 17:45:14 +02:00
Menelaos Karavelas
3bc49457d6 [algorithms][disjoint] remove duplicate code; move template parameters inside classes
when possible; re-arrange code a bit;
2015-03-09 17:43:51 +02:00
Adam Wulkiewicz
666837bcb9 [algorithms] Fix the type of returned Range/Ring in sub_range(Polygon). 2015-03-09 16:05:29 +01:00
Adam Wulkiewicz
731ea108d7 Merge pull request #252 from sdebionne/fix/range_reference
[range] Use range_reference
2015-03-09 12:58:59 +01:00
Samuel Debionne
d7aae45daf [util][range] Use range_reference
Use range_reference to determine the return type of boost::at,
boost::front and boost::back.
2015-03-09 09:52:11 +01:00
Menelaos Karavelas
b3b95ae92b [strategies][cartesian][buffer][join_round] protect std::max with parentheses 2015-03-08 20:56:02 +02:00
Menelaos Karavelas
ca45ee76ac [strategies][cartesian][buffer][join_round] optimize expression
calculating number of interior points
2015-03-08 20:11:53 +02:00
Barend Gehrels
64ee58ed46 [buffer] Fix calculation of the number of points. For an angle of 125 or more,
no points in between were generated, which was erroneous.
Thanks to Menelaos for spotting and Adam for the calculation

This changes some of the unit test results, because in some cases a point in between
is generated now, creating a larger polygon
2015-03-08 18:08:43 +01:00
Adam Wulkiewicz
a3db6b2ad1 Merge pull request #246 from mkaravel/fix/sqrt_for_32bit_platforms
Workaround for sqrt for some 32-bit platforms
2015-03-08 15:14:30 +01:00
Barend Gehrels
4e6a319fdb Merge pull request #248 from mkaravel/feature/simplify_detail_not
Simplify detail::not_
2015-03-08 15:01:28 +01:00
Menelaos Karavelas
a3012c4beb [strategies][cartesian][buffer][join_round] rename local variable so that it is more descriptive 2015-03-08 12:54:19 +02:00
Menelaos Karavelas
4fcf879b25 [algorithms][detail][not] modify the implementation of detail::not_ by moving
the geometry template parameters inside the class; this way it is simpler to
use detail::not_ as it is not required to specify the geometries;
2015-03-08 11:42:45 +02:00
Menelaos Karavelas
3312f4a03d [algorithms][is_valid] apply coding rules (space after operator !) 2015-03-07 18:13:12 +02:00
Menelaos Karavelas
ee1e0e0899 [algorithms][detail][partition] remove the forward range(s) argument(s) 2015-03-07 17:34:17 +02:00
Menelaos Karavelas
15df0d49cf Merge branch 'develop' of https://github.com/boostorg/geometry into fix/make_partition_work_for_forward_ranges 2015-03-07 17:08:29 +02:00
Menelaos Karavelas
fc257347e2 [util][math] add comments at end of #ifdef BOOST_GEOMETRY_SQRT_CHECK_FINITENESS/#endif block 2015-03-07 16:34:19 +02:00
Menelaos Karavelas
0a6e1a6829 [util][math] guard inclusion of fpclassify.hpp by the macro
BOOST_GEOMETRY_SQRT_CHECK_FINITENESS
2015-03-07 09:33:45 +02:00
Menelaos Karavelas
adb8dfa023 [algorithms][partition] modify partition to work for forward ranges 2015-03-06 10:56:42 +02:00
Menelaos Karavelas
b0a78785b7 [iterators][point iterator] add missing const in constructor 2015-03-06 08:29:33 +02:00
Adam Wulkiewicz
2e18afacce Merge pull request #239 from sdebionne/fix/iterators
Fix point_iterator with raw pointer base
2015-03-06 06:17:08 +01:00
Menelaos Karavelas
0efb49d054 [algorithms][is_valid] fix comment 2015-03-05 15:12:22 +02:00
Menelaos Karavelas
75c3590aef [util][math] implement workaround for 32-bit platforms for which sqrt(nan)
returns a finite value; workaround is activated by defining the macro
BOOST_GEOMETRY_SQRT_CHECK_FINITENESS;
2015-03-05 11:27:59 +02:00
Barend Gehrels
2c8deea1cd Merge branch 'develop' into bg-prepare
Conflicts:
	test/algorithms/buffer/multi_point_buffer.cpp
2015-03-04 13:21:20 +01:00
Barend Gehrels
e80ec0babf [buffer][doc] Make miter limit more clear in documentation 2015-03-04 12:26:49 +01:00
Barend Gehrels
ed2f52a16d [buffer] Fix end caps with odd number of points, they were not closed
Including unit test. Issue was found by Oracle/MySQL testing
2015-03-04 11:40:44 +01:00
Menelaos Karavelas
90bb9a8a4f [strategies][cartesian][buffer][join_round] revert change in strategy 2015-03-04 12:09:56 +02:00
Samuel Debionne
73a9a47598 [iterators] Use base_type from boost::iterator_adaptor
Use base_type from boost::iterator_adaptor. Remove base type definition
that clash with the base() function of boost::iterator_adaptor. Reformat
to follow coding guidelines.
2015-03-04 10:10:02 +01:00
Samuel Debionne
84463ae8ba [iterators] Fix point_iterator with raw pointer base
Fix point_iterator (and adapt reverse_point_iterator to the fix) to
support curves implemented with raw pointer as iterator. The fix uses
boost::iterator_adaptor that implements base() a synonyme of base_ptr()
that consequently has been removed. The operators are also redondant and
removed.
2015-03-03 15:46:54 +01:00
Menelaos Karavelas
ac1a78f1cd [strategies][cartesian][buffer][join_round] move the max outside the static cast 2015-03-03 16:04:32 +02:00
Menelaos Karavelas
a6a448f429 [strategies][cartesian][buffer][join_round] make sure that at least one
interior point is generated
2015-03-03 09:50:46 +02:00
Menelaos Karavelas
38fc1224c7 [strategies][cartesian][buffer][end_round] fix internal point count
for small input values (less than 4): when the input point count is less
than 4, set the internal point count to 4; for values less than 4 the
generated ends do not look round;
2015-03-02 21:11:40 +02:00
Adam Wulkiewicz
6bf022bedb Merge pull request #236 from sdebionne/fix/range
Fix range back() function
2015-03-02 14:15:26 +01:00
Samuel Debionne
d9f95e6952 [algorithms][within] Use geometry::range
Make use of geometry::range algorithms to get front and back values of
Linestring (rather than Boost.Range begin() and front()).
2015-03-02 10:59:42 +01:00
Samuel Debionne
cae3bab2fe [util][range] Fix back()
*(--boost::end(rng)); is not valid for range with pointer as iterators.
since the range is supposed to be BidirectionalRange, use rbegin
instead.
2015-03-02 10:59:32 +01:00
Barend Gehrels
f74180b084 [buffer] Enhance turn-in-piece for pieces around points. They now
make use of monotonic sections, and get special treatment because there
are no helper segments, basically the whole procedure is different

This can make buffers around points 3 times faster (if the buffered ring contains many points)
2015-03-01 14:08:16 +01:00
Barend Gehrels
cf167f9a36 [sectionalize] support sections in vector (so sections_type is redundant) 2015-03-01 13:57:39 +01:00
Barend Gehrels
f45df767d5 [buffer] remove obsolete file 2015-03-01 11:25:13 +01:00
Barend Gehrels
c244debf53 [buffer] calculate turns: use monotonic properties in two dimensions
(does not give improvements for circles, however it might do for ellipses
longer in y dimension)
2015-02-28 12:58:51 +01:00
Barend Gehrels
483c373cf5 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-27 22:15:39 +01:00
Barend Gehrels
a6d10d610c [turns] use preceding/exceeding from headerfile 2015-02-27 22:15:08 +01:00
Barend Gehrels
6afc5a464a [buffer] performance: use monotonic properties of monotonic sections to limit
quadratic iterations within two overlapping sections
This can improve performance with about 25%
2015-02-27 22:11:50 +01:00
Menelaos Karavelas
d31cabb067 [strategies][cartesian][buffer][point_circle] fix internal point count
for small input values (less than 3): when the input point count is less
than 3, set the internal point count to 3; this is important for generating
valid polygons;
2015-02-26 17:30:24 +02:00
Barend Gehrels
5a62cccd5d Merge branch 'develop' into bg-prepare 2015-02-25 18:42:44 +01:00
Barend Gehrels
230be833e2 Merge pull request #231 from mkaravel/doc/is_valid_with_failure
Doc/is valid with failure
2015-02-25 18:06:12 +01:00
Barend Gehrels
f1fc6eaa59 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-25 17:54:26 +01:00
Barend Gehrels
979fd3cf96 [buffer] change model::box by already existing type 2015-02-25 17:53:45 +01:00
Barend Gehrels
3a5e2c20c4 [buffer] improve performance for multi_point with many generated points
by now using monotonic sections and calculate turns over overlapping sections only
2015-02-25 17:50:25 +01:00
Barend Gehrels
015953ce42 [sectionalize] add static assert for if ...part is used out of sectionalize 2015-02-25 17:33:43 +01:00
Barend Gehrels
a18c0c2ad1 [sectionalize] let sectionalize_part make use of iterators instead of range,
for next commit where that is used for buffer, and range is inconvenient
2015-02-25 17:33:16 +01:00
Barend Gehrels
e45fd0ef29 [get_turns] move two policies to separate headerfile 2015-02-25 17:28:09 +01:00
Menelaos Karavelas
040dd2a3a4 [doc][algorithms][validity_failure_type] add inline documentation 2015-02-25 15:06:54 +02:00
Menelaos Karavelas
5c8e300ba2 [doc][algorithms][is_valid] update inline documentation for the
various is_valid overloads; add documentation for the overload that
takes a reference to validity_failure_type;
2015-02-25 15:05:29 +02:00
Menelaos Karavelas
296e36a19d [geometry] remove non-existent #include (file has been deleted) 2015-02-25 12:55:30 +02:00
Barend Gehrels
a7b82e7dd0 Merge pull request #229 from mkaravel/feature/is_valid_reason
New algorithm: is valid with reason
2015-02-25 09:26:30 +01:00
Menelaos Karavelas
191764170a [policies][is_valid] output detailed information about the invalid turn found 2015-02-24 17:45:33 +02:00
Menelaos Karavelas
d88b359393 [algorithms][is_valid] apply coding guidelines 2015-02-24 17:44:50 +02:00
Menelaos Karavelas
8dac6ef10f [algorithms][is_valid] remove the AllowSpikes dispatch-level template parameter;
the corresponding functionality is not handled by the visitor;
2015-02-24 15:56:21 +02:00
Menelaos Karavelas
20fcec220a [algorithms][is_valid_reason] remove algorithm and corresponding file 2015-02-24 15:48:55 +02:00
Menelaos Karavelas
0f739a7e0f [algorithms][is_valid] make the template parameter AllowSpikes default to false;
the policy passed to is_valid is now responsible for the handling of spikes;
2015-02-24 15:46:27 +02:00
Menelaos Karavelas
6bf0289186 [algorithm][is_valid] remove used code (the is_simple algorithm now passes
an appropriate policy to has_spikes and has_duplicates)
2015-02-24 15:44:37 +02:00
Menelaos Karavelas
deae2e2a63 [algorithms][is_simple] modify calls to has_spikes and has_duplicates by
providing a policy that is appropriate for simplicity testing
2015-02-24 15:43:39 +02:00
Menelaos Karavelas
1ca384d933 [algorithms][is_simple] add policy for is_simple algorithm to be used
with has_spikes and has_duplicates
2015-02-24 15:42:17 +02:00
Menelaos Karavelas
e4ad786f10 [policies][is_valid] add new policy, the failure_type_policy, used to keep
track of the failure type; this policy is used to implement the free function
bool is_valid(geometry, failure_value&);
the policy is templated by two boolean parameters that indicate how to handle
spikes for linear geometries, and duplicate points for areal geometries;
2015-02-24 15:34:03 +02:00
Menelaos Karavelas
6cc9be2206 [policies][is_valid] templatize the failing_reason_policy by a boolean
template parameter associated with how to handle spikes for linear geometries
2015-02-24 15:32:59 +02:00
Menelaos Karavelas
ff04ef6e78 [policies][is_valid] add a boolean template parameter, associated with
the handling of spikes, to the default policy; the policy decided how
to handle spikes using this template parameter;
2015-02-24 15:31:04 +02:00
Menelaos Karavelas
f646ee786c [algorithms][is_valid] add the following free functions:
* bool is_valid(geometry, string)
* bool is_valid(geometry, visitor)
* bool is_valid(geometry, failure value)
2015-02-24 15:28:03 +02:00
Menelaos Karavelas
f70d234426 [algorithms][is_valid] pass to the policy a boolean value indicating whether
the geometry is linear or not (if not linear, it is an areal geometry)
2015-02-24 15:26:51 +02:00
Menelaos Karavelas
e7dedcfbfe [algorithms][is_valid] remove AllowDuplicates template parameter at dispatch level
(the visitor is now responsible to determining the behavior)
2015-02-24 01:54:31 +02:00
Menelaos Karavelas
3e8a56cae0 [policies][is_valid] rename is_valid_null_policy to is_valid_default_policy;
change file name with the definition of default policy from null_policy.hpp
to default_policy.hpp;
2015-02-24 01:23:15 +02:00
Menelaos Karavelas
279177756a [algorithms][is_valid] change default value for dispatch boolean template
parameter regarding allowance of duplicates to false (the behavior is now
determined by the visitor)
2015-02-24 01:04:03 +02:00
Menelaos Karavelas
7571989baf [algorithms][is_valid_reason] update declaration of policy (it is now a template class) 2015-02-24 01:02:10 +02:00
Menelaos Karavelas
03399ad3c0 [policies][is_valid] modify the is_valid policies' apply methods to return a boolean value;
templatize policies with a boolean that controls whether duplicate points are to be allowed or not
(by default they are allowed);
2015-02-24 00:58:53 +02:00
Menelaos Karavelas
ecdf20b1a4 [algorithms][is_valid] use as return value whatever the policy returns 2015-02-24 00:57:56 +02:00
Menelaos Karavelas
ef32b1085a [policies][is_valid] update enum value names as per the previous commit;
update failure messages accordingly;
2015-02-21 20:27:43 +02:00
Menelaos Karavelas
004b5af7fc [algorithms][is_valid] replace validity failure enumeration value names as follows:
failure_holes_outside -> failure_interior_rings_outside
failure_nested_holes -> failure_nested_interior_rings
2015-02-21 20:24:42 +02:00
Menelaos Karavelas
5a475319ef [algorithms][is_valid] replace "holes", in debug message, by "interior rings" 2015-02-21 20:23:23 +02:00
Menelaos Karavelas
667d5eabc4 [policies][is_valid] update failure value failure_wrong_dimension by
failure_wrong_topological dimension; update corresponding message;
2015-02-21 16:32:12 +02:00
Menelaos Karavelas
9357d092d8 [algorithms][is_valid] rename failure type value from failure_wrong_dimension
to failure_wrong_topological_dimension
2015-02-21 16:29:53 +02:00
Menelaos Karavelas
c098f89e51 [algorithms][is_valid_reason] add missing #include; rename variable "sstr" to "stream"; 2015-02-21 16:20:32 +02:00
Menelaos Karavelas
acc774640a [algorithms][is_valid] ring validity: update description of validity checking steps;
check explicitly that the ring has enough distinct points; remove commented code;
2015-02-20 10:33:56 +02:00
Menelaos Karavelas
bce9868365 [policies][is_valid] update validity failure type value name;
add message for new value related to boxes;
2015-02-20 09:58:43 +02:00
Menelaos Karavelas
0f2789323a [algorithms][is_valid] update validity failure type value name 2015-02-20 09:57:52 +02:00
Menelaos Karavelas
42e74f6019 [algorithms][is_valid] distinguish between the cases where the box has lower
than expected dimension, and when the corners are not given in correct order
2015-02-20 09:56:47 +02:00
Menelaos Karavelas
5ce6a05918 [algorithms][is_valid] change values and names for validity failure types;
add one more failure type related to boxes;
2015-02-20 09:56:12 +02:00
Adam Wulkiewicz
b15f790052 Merge pull request #225 from awulkiew/fix/cart_intersect
Fix/cart intersect
2015-02-20 00:53:51 +01:00
Menelaos Karavelas
50487af848 [algorithms][is_valid_reason] add in-line documentation 2015-02-19 23:31:35 +02:00
Menelaos Karavelas
4aa73822f8 [geometry] add the is_valid_reason algorithm 2015-02-19 23:18:31 +02:00
Menelaos Karavelas
8f2a535a49 [algorithms][is_valid_reason] implement the is_valid_reason algorithm
by passing the failing_reason_policy as the visit policy in the is_valid
algorithm and then returning the message recorded by the policy;
2015-02-19 23:16:13 +02:00
Menelaos Karavelas
2930d649ae [policies][is_valid] add a new visit policy for the is_valid algorithm:
the failing_reason_policy policy; this policy is useful for detecting the
reason for which is_valid fails, as well as for having a convenient message
describing the type of failure and, possibly, information related to the failure;
this policy can be used to implement the is_valid_reason algorithm;
2015-02-19 23:13:09 +02:00
Menelaos Karavelas
bf00fd45bf [policies][is_valid] add a new visit policy for the is_valid algorithm:
the is_valid_null_policy policy, that does nothing
2015-02-19 23:10:39 +02:00
Menelaos Karavelas
b2ff6d51c5 [algorithms][is_valid] add support for visit policy; add one more
boolean template parameter at the dispatch level that controls if
empty multi-geometries are valid (the default value is true, i.e.,
empty multi-geometries are considered as valid);
2015-02-19 23:08:31 +02:00
Barend Gehrels
873a59aa82 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-19 22:05:21 +01:00
Menelaos Karavelas
a071453652 [algorithms][is_valid] add enumeration type for the validity failure types 2015-02-19 23:05:09 +02:00
Barend Gehrels
2373882a2e [buffer] remove now unused type 2015-02-19 22:05:05 +01:00
Adam Wulkiewicz
81d3d14578 Merge pull request #219 from sdebionne/feature/variant-over-sequence
Fix point_type traits for variant over MPL sequence
2015-02-19 17:37:50 +01:00
Adam Wulkiewicz
89b8186674 [strategies][policies] Improve the robustness of opposite flag calculation in cart_intersect.
Calculate it only once, in the strategy, using the coordinates of the
endpoints (not ratios). Pass it into the Policy::segments_collinear().
2015-02-19 17:10:27 +01:00
Barend Gehrels
504854859a Merge branch 'develop' into bg-prepare 2015-02-18 17:24:42 +01:00
Barend Gehrels
b0fdfc5d7a [buffer] fix erroneous rings for deflated interior rings which are untouched 2015-02-18 15:10:06 +01:00
Barend Gehrels
18d6103abd [disjoint] add disjoint_point_box like there is also disjoint_box_box to
avoid calling dispatch from buffer
2015-02-18 15:04:22 +01:00
Barend Gehrels
2201ebf86e [buffer] fix the case where a side was skipped because detected as equal, followed
by an end-cap. This caused further problems. Detection of empty sides is now delegated
to the strategy
2015-02-18 12:20:05 +01:00
Barend Gehrels
6c5cb48211 [buffer][fix] avoid false detection of turn in piece: turns cannot be located
in flat end pieces or in concave pieces
2015-02-18 10:20:26 +01:00
Adam Wulkiewicz
2d3bfc296c [buffer] Add assertions checking segments indexes >= 0 in buffered_piece_collection. 2015-02-16 18:12:06 +01:00
Adam Wulkiewicz
076d1077c5 [strategies][policies] Increase robustness of collinear segments intersection.
Do not use the ratios when checking the relation of endpoints and the
other segment. The ratios depend on segment lengths and if one of the
segments was a lot longer than the other one the direction and intersection
results were inconsistent. E.g. the endpoints of one segment was detected
inside/outside the longer segment and in the same time (using different
check) both endpoints was detected equal to one of the endpoints of the
longer segment. Then depending on the order of the segments 2 intersection
points were generated or 1 which could cause an assertion failure in turn handler.
2015-02-13 21:25:30 +01:00
Barend Gehrels
d9d14ce71b Merge pull request #224 from mkaravel/fix/buffer_accessing_front_element_of_rings
Fix: replace access method for accessing the front element of rings
2015-02-13 16:21:45 +01:00
Menelaos Karavelas
2f5d497885 [algorithms][buffer] replace call to .empty() method by call to boost::empty();
replace call to .back() method by call to range::back();
2015-02-13 16:18:26 +02:00
Adam Wulkiewicz
d942d49114 Merge pull request #223 from mkaravel/fix/qualify_mpl_namespace_by_boost
[geometry] qualify mpl:: namespace by boost:: (namespace external to the
2015-02-13 14:31:43 +01:00
Menelaos Karavelas
a2d1365326 [algorithms][buffer] replace access of front range element using the .front()
method by the range::front BG utility function
2015-02-13 15:19:57 +02:00
Barend Gehrels
729c5d2c37 Minor: fix spacing according to conventions 2015-02-13 13:25:59 +01:00
Barend Gehrels
3afb29f41e [buffer][fix] Assure first point of next piece equals last point of previous piece 2015-02-13 12:59:14 +01:00
Barend Gehrels
f24b4a24fb [buffer] some minor code layout changes 2015-02-13 12:26:55 +01:00
Barend Gehrels
d21145952f [buffer][fix] make sure that, per ring, closing point is the starting point.
It can be off due to numerical instability
2015-02-13 12:23:58 +01:00
Menelaos Karavelas
8b12ba92b6 [geometry] qualify mpl:: namespace by boost:: (namespace external to the
Boost.Geometry library); fix long lines produced by the addition of "boost::"
2015-02-13 11:41:16 +02:00
Menelaos Karavelas
4097d8e74b [policies][robustness][get_rescale_policy] fix wrong name of free function 2015-02-13 10:12:03 +02:00
Menelaos Karavelas
75e3115708 [policies][robustness][get_rescale_policy] factor-out common code 2015-02-13 09:48:29 +02:00
Samuel Debionne
e73e9486ab Add boost:: namespace for variant, mpl
External (to Boost.Geometry) libraries used in Boost.Geometry code
should be qualified with boost::.
2015-02-12 09:32:13 +01:00
Adam Wulkiewicz
cff2ee9d6c [util] Add comments about the BOOST_GEOMETRY_CONDITION() implementation. 2015-02-11 20:29:47 +01:00
Adam Wulkiewicz
b3b3687426 [algorithms] Remove unwanted spaces from condition statements. 2015-02-11 20:20:35 +01:00
Adam Wulkiewicz
88d67541a8 [util] Fix the macro name in an #endif comment. 2015-02-11 19:26:48 +01:00
Samuel Debionne
241a541e83 Fix point_type traits for variant over MPL sequence
When variant types are generated from MPL sequences the actual variant
type is
boost::variant<over_sequence<Sequence...
and thus T0 is over_sequence<>. This fix use the first bounded type
instead of T0.
2015-02-11 17:12:40 +01:00
Adam Wulkiewicz
4f2fc67bd6 Merge branch 'develop' into fix/warnings 2015-02-11 15:55:31 +01:00
Adam Wulkiewicz
60226ea697 [strategies] Use BOOST_GEOMETRY_CONDITION macro for constant conditions. 2015-02-11 15:53:24 +01:00
Adam Wulkiewicz
aec04ff75b [algorithms] Use BOOST_GEOMETRY_CONDITION macro for constant conditions. 2015-02-11 15:52:55 +01:00
Adam Wulkiewicz
60856a5986 [util] Add BOOST_GEOMETRY_CONDITION macro to allow suppressing of MSVC constant condition warning. 2015-02-11 15:51:10 +01:00
Adam Wulkiewicz
c197206f2c Merge pull request #213 from mkaravel/fix/replace_assertion_by_exception
Fix: replace assertion by exception
2015-02-11 14:04:36 +01:00
Adam Wulkiewicz
6d2e0418e2 Merge pull request #216 from mkaravel/fix/refactor_debug_code_for_turns
[algorithms][turns] re-factor debug code for printing turns
2015-02-11 14:01:41 +01:00
Adam Wulkiewicz
65de0b893a Merge pull request #217 from mkaravel/fix/templatize_relare_turns_by_rescale_policy
Fix/templatize relare turns by rescale policy
2015-02-11 14:00:54 +01:00
Menelaos Karavelas
70ca59637b [algorithms][relate][get_turns] add missing include for get_rescale_policy 2015-02-11 13:10:00 +02:00
Menelaos Karavelas
ba68aa8555 [algorithms][relate][get_turns] templatize relate::get_turns by robustness policy;
by default it is set to detail::no_rescale_policy;
2015-02-11 10:27:51 +02:00
Menelaos Karavelas
503b5a1e03 [algorithms][turns] re-factor debug code for printing turns 2015-02-11 09:53:03 +02:00
Menelaos Karavelas
0a385a61b5 [strategies][cartesian][side by triangle] fix MSVC error regarding
undiscovered function equals_point_point: MSVC thinks that that the detail::equals
namespace qualifying the call to equals_point_point is a nested namespace inside
boost::geometry::strategy::side; fix: qualify the call to equals_point_point by
geometry::detail::equals;
2015-02-11 09:33:54 +02:00
Menelaos Karavelas
44830fb134 [algorithms][overlay L/L] remove member variable in inconsistent_turns_exception class 2015-02-09 22:55:31 +02:00
Adam Wulkiewicz
82c8c483f3 Merge pull request #206 from awulkiew/fix/warnings
Fix/warnings
2015-02-09 17:10:56 +01:00
Adam Wulkiewicz
09d1a2e16d Merge pull request #212 from mkaravel/fix/comparable_distance_strategy_in_douglas_peucker
Fix/comparable distance strategy in douglas peucker
2015-02-09 17:08:46 +01:00
Adam Wulkiewicz
40cd6946d1 Merge pull request #207 from mkaravel/fix/make_side_by_triangle_permutation_invariant
Fix/make side by triangle permutation invariant
2015-02-09 17:07:10 +01:00
Menelaos Karavelas
5d5be4ceac [algorithms][overlay L/L] replace assertion by exception: the assertion
failure indicates that something went wrong in the turns' computation, and
more precisely that the turns computed are not consistent; such a case should
better be handled by throwing an exception rather than an assertion;
2015-02-09 15:51:30 +02:00
Menelaos Karavelas
a7c6ce5431 [strategies][agnostic][simplify douglas peucker] modify strategy to use
comparable distances and strategies internally; update copyright headers;
clean-up code; change debug macro to have the BOOST_GEOMETRY prefix;
2015-02-05 14:13:17 +02:00
Menelaos Karavelas
bbd755350b [algorithms][simplify] update copyright dates and add missing include 2015-02-05 14:09:27 +02:00
Menelaos Karavelas
07399029da [strategies][cartesian][side by triangle] optimize computation for fundamental
integral number types: no need to check for equality of points and perform
lexicographical sorting
2015-02-04 09:18:24 +02:00
Menelaos Karavelas
8ce627968d [strategies][cartesian][side by triangle] add comments explaining why
the lexicographical ordering is done
2015-02-04 02:47:22 +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
Menelaos Karavelas
98babd71c6 [strategies][cartesian][side by triangle] optimize the number of
calls to less
2015-02-03 21:40:59 +02:00
Menelaos Karavelas
5354bba720 [strategies][cartesian][side by triangle] make the side_by_triangle strategy
cyclic-permutation invariant by always choosing the lexicographically smallest
point as the first argument in the computations
2015-02-03 21:33:01 +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
a4a8bded15 Merge branch 'develop' into bg-prepare 2015-02-03 12:47:17 +01:00
Barend Gehrels
2bd4be27c8 Merge branch 'feature/buffer' into develop 2015-02-03 12:30:33 +01:00
Adam Wulkiewicz
a9ff279098 [algorithms] Fix unused parameter warnings. 2015-02-03 12:13:26 +01:00
Adam Wulkiewicz
548af19903 [get_turns] Fix signed indexes types, replace ints. 2015-02-03 12:07:37 +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
c8c5de27ab [io][wkt] Fix integral conversion warning. 2015-02-02 19:41:27 +01:00
Adam Wulkiewicz
0d025a9328 [policies] Fix integral conversion warnings in intersection_points. 2015-02-02 19:40:16 +01:00
Adam Wulkiewicz
e4c3658de8 [iterators] Fix integral conversion warnings. 2015-02-02 19:38:37 +01:00
Adam Wulkiewicz
9ed70b402a [algorithms] Fix integral conversion warnings. 2015-02-02 19:37:12 +01:00
Adam Wulkiewicz
622b9602e8 [util][range] Add pos() function returning iterator to element. 2015-02-02 19:29:49 +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
Barend Gehrels
953182c3d0 Merge branch 'develop' into bg-prepare 2015-01-27 19:35:07 +01:00
Adam Wulkiewicz
0d5c51080b [strategies] Add geographic side strategies based on azimuths calculation.
Three strategies added: andoyer, thomas and vincenty.
The strategies use inverse formulas for azimuths calculation.
Azimuths are compared to check the side.

The agnostic side_by_azimuth strategy was removed/replaced.
The code was moved into the geographic directory, into the details.
After some modifications it's used as a base of the geographic side strategies.
2015-01-27 15:30:33 +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
124e3a3011 [strategies] Improve andoyer_inverse and thomas_inverse implementation style.
Prefix members with m_.
Add braces and spaces.
2015-01-25 22:51:33 +01:00
Adam Wulkiewicz
bf79b25af8 [strategies] Add thomas distance strategy. 2015-01-25 19:55:42 +01:00
Adam Wulkiewicz
4520fbc373 [algorithms] Improve the robustness of thomas_inverse formula.
For lat equal to pi/2 or -pi/2 avoid calculating "infinite" tangent result.
2015-01-25 19:49:44 +01:00
Adam Wulkiewicz
8c04a59076 [algorithms][strategies][test] Unify the geographic inverse formulas interface.
Rename vincenty_inverse azimuth12() to azimuth() and comment out the azimuth21().
Modify the test accordingly.
2015-01-25 18:53:27 +01:00
Adam Wulkiewicz
e233bf9542 [algorithms] Add thomas_inverse formula - Andoyer-Lambert type approx. with second order. 2015-01-25 04:21:35 +01:00
Adam Wulkiewicz
da38bca2d2 [algorithms] Add andoyer_inverse formula. 2015-01-25 04:20:28 +01:00
Barend Gehrels
5a51a2a1c2 [strategies] Move andoyer and vincenty distance strategies from extensions.
Conflicts:

	extensions/test/gis/latlong/Jamfile.v2
	include/boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp
	include/boost/geometry/strategies/geographic/andoyer.hpp
	include/boost/geometry/strategies/geographic/distance_vincenty.hpp
	include/boost/geometry/strategies/geographic/vincenty.hpp
	include/boost/geometry/strategies/strategies.hpp
	test/strategies/andoyer.cpp
	test/strategies/vincenty.cpp
2015-01-24 15:26:29 +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
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
Barend Gehrels
c4ca3eef2f [buffer] use monotonic sections for checking point-in-original
This can enhance performance with 20%
2014-12-21 19:07:37 +01:00
Barend Gehrels
083b402447 [buffer] create vertical monotonic sections per original, and walk through original ring 2014-12-21 18:04:56 +01:00
Barend Gehrels
55fbcf1b30 [sectionalize] add same-type assertion 2014-12-21 18:02:37 +01:00
Barend Gehrels
17347fe47f remove redundant typename keywod 2014-12-21 17:31:37 +01:00
Barend Gehrels
2b26aa20fb [self_turn_points] fix section box type which should be same as robust point type 2014-12-21 17:30:56 +01:00
Barend Gehrels
6ef8c5a57d [sectionalize] fix call for sectionalize 2014-12-21 16:15:23 +01:00
Barend Gehrels
8ac3a127a7 [sectionalize] add static assertion 2014-12-21 15:58:03 +01:00
Barend Gehrels
0478b5e082 [sectionalize] pass dimension vector as template argument
Test for vertical now also tests y-dimension
2014-12-21 15:48:22 +01:00
Barend Gehrels
042090c2ba [sectionalize] remove commented type, fix indentation 2014-12-21 15:09:47 +01:00
Barend Gehrels
8d6418a5f7 [sectionalize] use an mpl vector to specify dimensions for sectionalize 2014-12-21 15:09:20 +01:00
Barend Gehrels
d6210cdcd0 [sectionalize] rename Dimension/DimensionCount to Index/Count
preparing to use sectionalize for y-axis only
2014-12-21 13:38:15 +01:00
Barend Gehrels
91150690be [sectionalize] pass max_count as argument 2014-12-21 13:14:12 +01:00
Barend Gehrels
7cc700a0e7 [sectionalize] avoid calculating robust points 3 times
It was calculated per segment which moved over a range. It is now done per point
(saving one calculation) which is also used for expand (saving another one)
2014-12-21 12:50:50 +01:00
Barend Gehrels
0d56247d6d [sectionalize] indentation / make consistent within this file 2014-12-21 12:25:17 +01:00
Barend Gehrels
110e178f77 [sectionalize] remove specific unit-test free function 2014-12-21 11:53:16 +01:00
Adam Wulkiewicz
f014a12399 [algorithms][assign] Fix static assert checks on older compilers.
Revert the change done previously but use static keyword.
2014-12-21 01:04:42 +01:00
Barend Gehrels
7825f28c50 [sectionalize] remove unused id 2014-12-20 15:56:56 +01:00
Barend Gehrels
40a6525bb2 [sectionalize] remove effectively unused parameter enlarge_section_boxes:
It was used inconsistently in two places. If necessary, library code
can call enlarge_sections explicitly afterwards.
It was erroneous (if not enlarge then enlarge).
In case of robust policies it was redundant.
2014-12-20 15:53:51 +01:00
Barend Gehrels
a1b76e4017 [sectionalize] fix indendation 2014-12-20 15:50:26 +01:00
Barend Gehrels
4d9f64b215 [sectionalize] remove unused parameter make_rescaled_boxes 2014-12-20 15:50:12 +01:00
Barend Gehrels
43ba70c8e1 [partition][buffer] add extra policy for inclusion. This gives opportunity
to filter items early, they are skipped for all partitions. This avoids
the need making an extra copy to select only turns with location_ok status, for buffer.
It can increase performance with 20%
2014-12-20 14:47:57 +01:00
Barend Gehrels
7fa407d4d0 [buffer] make two functions static 2014-12-20 13:15:44 +01:00
Barend Gehrels
3c0b2dedd8 [buffer] use partition for checking if a turn is inside an original.
Originals are split such that also interior rings are partitioned.
This removes quadratic behaviour so can give performance improvements of
factor 10 or much more (many_rings robustness test still to be committed)
2014-12-20 13:14:19 +01:00
Adam Wulkiewicz
795da1e33a [algorithms][relate] Fix relate for Linear/MultiPolygon (related to sorting of turns and handling of the last LS endpoint). 2014-12-19 15:33:41 +01:00
Adam Wulkiewicz
c651ce726b [algorithms] Fix msvc warnings in centroid (unused variable, unreachable code). 2014-12-19 15:25:16 +01:00
Adam Wulkiewicz
c6b3a253e3 [algorithms] Fix static assert check in assign. 2014-12-19 15:24:13 +01:00
Adam Wulkiewicz
5fad5e3b7d [algorithms] Replace A and B BOOST_VARIANT_ENUM_PARAMS parameters with T1 and T2 respectively. 2014-12-15 23:27:43 +01:00
Adam Wulkiewicz
4a9ccaf819 [geometry] Fix the order of Boost.Variant includes.
variant_fwd.hpp must be included before other Boost.Variant headers
because it contains config used in other parts of this library.
2014-12-15 19:12:11 +01:00
Adam Wulkiewicz
824715a7ce Merge branch 'develop' into feature/geographic 2014-12-15 03:06:33 +01:00
Adam Wulkiewicz
102f66d32c [algorithms] Fix unused parameter warning in is_valid for MultiPoint. 2014-12-15 03:06:15 +01:00
Adam Wulkiewicz
b4356a57fc [strategy] In mapping_ssf instantiate mapper::apply<>() explicitly passing calculation_type. 2014-12-13 16:54:16 +01:00
Adam Wulkiewicz
8fa9a25270 [strategies] In mapping_ssf create mapper object once and store it in the strategy.
This way the mapper musn't be created each time strategy apply() is called.

The fraction in the mapper is stored using Spheroid's radius type promoted
to double if necessary.
2014-12-13 16:37:00 +01:00
Adam Wulkiewicz
15a7a5639b [strategies][test] Fix mapping_ssf for integral types (rounding).
During the mapping FP was converted to INT again. To avoid explicit
rounding mapped coordinates are used directly in the SSF. For this purpose
the formula part was extracted from SSF strategy and placed in
side::detail namespace.

Furthermore slightly refactor SSF.
Reenable disabled test for int coordinates.
2014-12-13 16:17:20 +01:00
Adam Wulkiewicz
2e969553fc [strategies] In mapping_ssf properly map latitude using radians. 2014-12-13 15:55:51 +01:00
Adam Wulkiewicz
6f7d9878e3 [strategies] In mapping_ssf strategy use the Mapping correctly.
Use more meaningful types and variables names.
2014-12-13 13:49:21 +01:00
Adam Wulkiewicz
4811c641a9 Merge branch 'develop' into feature/geographic 2014-12-13 12:31:21 +01:00
Adam Wulkiewicz
7d89139b51 [strategy][test] Update copyright notes. 2014-12-13 12:30:47 +01:00
Adam Wulkiewicz
62ac3685ce [strategies] In side_by_cross_track use calc_t promoted in necessary instead of double. 2014-12-13 04:17:52 +01:00
Adam Wulkiewicz
75377a2741 [strategies] In haversine strategy add explicit conversion to calculation type (for user-defined types). 2014-12-13 02:48:08 +01:00
Adam Wulkiewicz
53b4feadfd [algorithms] In vincenty_direct add explicit number conversion to calculation type (for user-defined types). 2014-12-13 02:43:51 +01:00
Barend Gehrels
bef3d6c869 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-12-12 19:19:03 +01:00
Barend Gehrels
073d157dd6 [partition] enhance performance of partition where substantial part of one
or both collections are exceeding the separation line. Formerly they were
always handled quadraticly. Now they are partitioned as well.
2014-12-12 19:18:07 +01:00
Barend Gehrels
bd6852a89e [partition] add condition in handle-functions for future improvements (next commits) 2014-12-12 18:20:14 +01:00
Barend Gehrels
0c5ca25444 [partition] remove unused types, make level size_t 2014-12-12 18:14:32 +01:00
Barend Gehrels
f857930f18 [partition] fix divide_box free function which was not inline... 2014-12-12 11:29:25 +01:00
Adam Wulkiewicz
518e94913d Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-12-11 23:01:38 +01:00
Adam Wulkiewicz
936d52db27 [index][test] Fix storing of pairs and tuples containing pointers to Geometries. 2014-12-11 22:59:52 +01:00
Adam Wulkiewicz
0d8c46efe7 [algorithms][test] Add vincenty_direct formula algorithm. 2014-12-11 15:40:15 +01:00
Adam Wulkiewicz
52bb4e36bc [strategies] In mapping_ssf remove :: to allow ADL for math functions. 2014-12-11 01:41:32 +01:00
Adam Wulkiewicz
9169673d90 [algorithms] Add description of azimuth. 2014-12-11 01:38:13 +01:00
Adam Wulkiewicz
de3187f180 [strategies][test] Add distance_ prefix to andoyer and vincenty file names. 2014-12-10 00:22:05 +01:00
Adam Wulkiewicz
a8f7e294fd Merge pull request #182 from mkaravel/feature/new_cross_track_strategy
Feature/new cross track strategy
2014-12-09 23:49:42 +01:00
Adam Wulkiewicz
24e71bd8c5 [algorithms] Fix unused parameter warning in flattening for sphere. 2014-12-08 23:35:42 +01:00
Adam Wulkiewicz
e6d58d9463 [strategies] Fix GCC errors and warnings in mapping_ssf strategy. 2014-12-08 23:33:18 +01:00
Adam Wulkiewicz
0802c21421 [strategies] Fix unused variable warning in mapping_ssf strategy and add default ctors. 2014-12-08 21:51:18 +01:00
Adam Wulkiewicz
d4435fe4ac [strategies] Add mapping_ssf geographic strategy. 2014-12-08 21:39:47 +01:00
Adam Wulkiewicz
8529293db2 [strategies] Use new select_calculation_type in side_by_azimuth strategy. 2014-12-08 21:39:09 +01:00
Adam Wulkiewicz
0959c1fba4 [util] Support additional input types in select_coordinate, select_most_precise and select_calculation_type. 2014-12-08 21:38:01 +01:00
Adam Wulkiewicz
75b045d1a3 [strategies] Fix the description of tparam of andoyer strategy. 2014-12-08 19:32:27 +01:00
Adam Wulkiewicz
ece229983f [algorithms] Add iterations counter to vincenty_inverse for robustness. 2014-12-06 19:34:56 +01:00
Adam Wulkiewicz
78796e3959 Merge pull request #184 from mkaravel/fix/validity_of_empty_multigeometries
Fix/validity of empty multigeometries
2014-12-05 20:32:54 +01:00
Menelaos Karavelas
ab0ad5a597 [doc][algorithms][is_valid] update doc to reflect that empty multi-geometries
are considered as valid
2014-12-05 17:21:09 +02:00
Menelaos Karavelas
667849d0af [algorithms][is_valid] accept a multi-point with no elements as valid 2014-12-05 17:20:41 +02:00
Menelaos Karavelas
8b0804b58e [algorithms][is_valid] accept a multi-polygon with no elements as valid 2014-12-05 17:20:11 +02:00
Menelaos Karavelas
3092e6ae11 [algorithms][is_valid] accept a multi-linestring with no elements as valid 2014-12-05 17:19:37 +02:00
Menelaos Karavelas
e9af992513 [strategies][distance][spherical][cross track] modify computation of point-to-segment
distance to be numerically robust (this applies to the case where the point projects
inside the segment)
2014-12-05 10:58:21 +02:00
Barend Gehrels
9534f17138 [buffer] avoid calculating the box if not necessary 2014-12-01 21:59:37 +01:00
Barend Gehrels
3de56d98ac [buffer] fix typo in comment 2014-12-01 21:30:42 +01:00
Barend Gehrels
4295d35069 [buffer] use monotonic properties to analyse monotonic-offsets more efficiently
(it does not increase performance in country_buffer testcase)
2014-12-01 21:30:07 +01:00
Barend Gehrels
f6098b0f7e [buffer] add monotonic properties per piece 2014-12-01 21:06:53 +01:00
Barend Gehrels
359f062166 [buffer] move skipping neighbours to separate method 2014-12-01 20:56:01 +01:00
Barend Gehrels
49dd4dad67 [partition] small change, resize vector and assign, instead of pushing back 2014-11-29 14:48:10 +01:00
Barend Gehrels
39399f326d [buffer] remove now unused neighbour variable and remove now non-used code,
now that analysis is done more early
2014-11-29 14:46:18 +01:00
Barend Gehrels
0a948ad2f8 [buffer] Skip pieces not used for turn-in-piece in a more early phase in
partition. This can in some cases enhance performance more than 40%
2014-11-29 14:41:40 +01:00
Adam Wulkiewicz
e3a7bce127 [strategies] Add side_by_azimuth agnostic strategy. 2014-11-25 01:14:00 +01:00
Adam Wulkiewicz
bf60a40dfd [algorithms] Add bg::detail::azimuth() algorithm. 2014-11-25 01:13:13 +01:00
Adam Wulkiewicz
545c58a824 [strategies] Move andoyer and vincenty distance strategies from extensions. 2014-11-24 22:51:58 +01:00
Barend Gehrels
899f308890 [buffer] add cheap check using the new robust_offsetted_envelope
This safes about 1% performance
It is only applicable for convex joins, we will add this distinction later
(currently all joins are convex)
2014-11-23 12:57:50 +01:00
Barend Gehrels
bbc8c605e6 [buffer] add specific robust bounding box for offsetted part.
This gains in some cases more than 10% performance

This gives two small changes in expected areas for country buffer deflate-5, which are not
visible and not detectable using other tools (spent quite some time to try)
2014-11-23 12:25:48 +01:00
Barend Gehrels
367c29bd8c [buffer][fix] oops, use geometry instead of bg 2014-11-23 11:12:46 +01:00
Barend Gehrels
56fc166435 [buffer] extend piece analyses, check helper-segments for on-offsetted, on-original,
disjointness. This removes the workaround w.r.t. has_concave
2014-11-22 19:15:17 +01:00
Barend Gehrels
6be98196ed [buffer] Piece visitor, remove unused types and we still need to check on geometry_code 2014-11-22 14:32:20 +01:00
Barend Gehrels
0c34c58e5e Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-11-22 12:51:25 +01:00
Barend Gehrels
fc2652323b [buffer] refactor analysis of piece into shorter and slightly more efficient (few %) code.
It is now one function. In later commits we will extend this by checking helper
segments separately, which should also be more efficient.

It changes one test-case, probably because ofn ear_offsetted. The change is not visible
and the result is probably more correct. SQL Server reports this polygon as invalid.
2014-11-22 12:50:31 +01:00
Adam Wulkiewicz
f1eb897615 [extensions][test] Fix reverse azimuth calculation and tests for vincenty strategy and vincenty_inverse.
Enable tests for reverse azimuth.
Add more tests.
2014-11-21 01:18:25 +01:00
Adam Wulkiewicz
e2f2a90054 [extensions] Tweak a formula calculating u^2 in vincenty inverse.
Use lesser number of operations, theoretically it should also be more precise.
Modify tests to expect units used in spheroid, not always kilometers.
2014-11-20 17:21:59 +01:00
Adam Wulkiewicz
4a45d0eef6 [extensions] Optimize part of vincenty_inverse and add more tests.
Replace trigonometric functions (6 calls) with identity using sqrt (2
calls).

One new test is failing. The tests for azimuth21 are still disabled.
2014-11-20 16:26:24 +01:00
Adam Wulkiewicz
c71d80d950 [io] Fix reference to reference issue for older MSVC. 2014-11-20 13:03:58 +01:00
Adam Wulkiewicz
96153340a5 [extensions] Add tests for vincenty inverse formula azimuths calculation (only 1->2 enabled for now). 2014-11-20 04:37:45 +01:00
Adam Wulkiewicz
b18ba98934 [extensions] Rewrite vincenty formula algorithm to allow calculation of azimuths.
Enclose the formula in vincenty_inverse class, calculate the common part in the ctor, allow calculating of distance and azimuths using member functions.

Use this new implementation in vincenty distance strategy.
2014-11-20 01:42:07 +01:00
Adam Wulkiewicz
2ce1e45ed6 [extensions] Move vincenty inverse formula (distance) algorithm into separate file. 2014-11-20 00:36:48 +01:00
Menelaos Karavelas
f952c15fbc [strategies][distance][spherical][cross track] fix typo 2014-11-20 00:44:02 +02:00
Menelaos Karavelas
a780ad0f0b [strategies][distance][spherical][cross track] fix typo 2014-11-19 23:55:11 +02:00
Menelaos Karavelas
43d7f82491 [strategies][distance][spherical][cross track] update comments' section and make it
a stand-alone explanatory document; polish code; remove old code; fix header includes;
fix long lines;
2014-11-19 23:52:59 +02:00
Adam Wulkiewicz
11d627808a Merge pull request #160 from awulkiew/fix/read_wkt
Fix/read wkt
2014-11-19 17:57:48 +01:00
Adam Wulkiewicz
fa0986c1b3 Merge pull request #181 from awulkiew/feature/geographic
Feature/geographic
2014-11-19 17:49:28 +01:00
Adam Wulkiewicz
8de33edb16 [core] Replace radius access 1-character tparams names with meaningful words. 2014-11-19 17:48:36 +01:00
Adam Wulkiewicz
202a9939f1 [core] Move spheroid and sphere from cs::model to srs namespace.
Change reference_sphere_tag and reference_spheroid_tag to srs_sphere_tag
and srs_spheroid_tag respectively.
Adapt algorithms, strategies and tests to the new namespace and tags.
2014-11-19 16:21:51 +01:00
Barend Gehrels
e24bede36a [warn] avoid unused variable warning in distance concept 2014-11-19 15:22:07 +01:00
Barend Gehrels
43c19312a3 [buffer][overlay][fix] Fix order in tangencies iu/iu case 2014-11-19 15:21:30 +01:00
Barend Gehrels
3ca0aa80fe [overlay] change default_order using index instead of address 2014-11-19 15:19:29 +01:00
Barend Gehrels
c37a66419c Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-11-19 13:07:07 +01:00
Barend Gehrels
d71a67d93c [buffer] Performance boost: added trivial check which in some cases
can speed up the buffer process 50%
2014-11-19 13:06:56 +01:00
Adam Wulkiewicz
78a890efdd [index] Replace struct with class keyword in specialization of allocators<> for variant-based static-size node. 2014-11-19 02:33:31 +01:00
Menelaos Karavelas
fb580aff9c Merge branch 'develop' of https://github.com/boostorg/geometry into feature/new_cross_track_strategy 2014-11-18 08:28:15 +02:00
Adam Wulkiewicz
d36f40b6b3 [algorithms][extensions] Add detail flattening() algorithm and use it in andoyer and vincenty strategies. 2014-11-17 20:03:39 +01:00
Adam Wulkiewicz
1d4b7d7102 [core] In spheroid, replace if with ?: operator. 2014-11-17 19:35:23 +01:00
Adam Wulkiewicz
17f4453330 [index] Remove unneeded create_node<> specializations. 2014-11-17 15:50:01 +01:00
Adam Wulkiewicz
8ff9d6fd5d [index] Remove unneeded file. 2014-11-17 14:30:42 +01:00
Adam Wulkiewicz
2b1d7e3767 [extensions] Use Spheroid in andoyer and vincenty strategies.
Replace RadiusType template parameter of those strategies with Spheroid.
Replace member function radius() with model() and typedef radius_type with
model_type.
Use get_radius(), calculate flattening "manually".
Tweek calculations (conversion warnings, common multiplier).
Remove detail::ellipsoid<>.
2014-11-17 02:27:47 +01:00
Adam Wulkiewicz
694aaa9d31 [core] Add sphere and spheroid reference models.
Add new tags for reference sphere/spheroid concepts.
Add cs::model::sphere<> and cs::model::spheroid<>.
Add get_radius(), set_radius() and radius_type<> functions/metafunctions.

Add tests.

Refactor [extensions] nsphere to use the official functions.
2014-11-16 18:26:48 +01:00
Menelaos Karavelas
cf2bb9d9c7 [strategies][distance][spherical][cross_track] remove duplicate word in comments section 2014-11-14 01:11:27 +02:00
Menelaos Karavelas
fd956ff683 [strategies][distance][spherical][cross_track] add a missing space 2014-11-14 01:07:16 +02:00
Menelaos Karavelas
90b47a2b16 [strategies][distance][spherical][cross_track] prototype implementation
for the new cross_track strategy; the new strategy defines a comparable
counterpart which is then used to compute the cross track distance;
the old code is kept for now (guarded by the macro
BOOST_GEOMETRY_USE_OLD_CROSS_TRACK_STRATEGY);
2014-11-14 01:00:28 +02:00
Barend Gehrels
9a9e16f936 [buffer] major fix: we now create concave helper-pieces differently
In the past there was one with a straight line going from one piece to the next.
Now there are two, going from one piece to the point on the geometry, and the
second going from the point on the geomety to the next piece.
They are now zero-volume.
They fix:
1) crossings of sides with flat-ends (unit-test cases curve, field_sprayer, bend_near_start)
2) joins with limited number of points (unit-test cases concave_b_rough, italy_part, nl_part)
3) joins with large distances
4) many self-intersections on remaining aimes-cases
2014-11-12 13:59:29 +01:00
Barend Gehrels
1fcdbc7c54 [buffer] small change, use Piece i.o. typename .... 2014-11-12 13:43:54 +01:00
Barend Gehrels
36f47c4638 [buffer] fix error in comment 2014-11-12 13:40:19 +01:00
Barend Gehrels
37519ab36a Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-11-12 13:36:13 +01:00
Adam Wulkiewicz
226272833b [extensions] Remove unneeded constructors from andoyer strategy and ellipsoid. 2014-11-12 11:46:24 +01:00
Adam Wulkiewicz
2fbe01ae46 [extensions] Fix ellipsoid one-argument ctor. 2014-11-12 01:10:15 +01:00
Barend Gehrels
472346704d [buffer] reverse negative rings if necessary (for concave pieces and
one-sided buffers)
2014-11-09 17:01:31 +01:00
Barend Gehrels
a62e2d2e84 [buffer][performance] add boolean to indicate concave rings:
in non concave rings, no turn calculation is necessary
2014-11-09 17:00:56 +01:00
Menelaos Karavelas
6defb7643a [strategies][concepts][distance strategies] polish code in various places;
add missing checks in point-segment distance strategy concept;
add BOOST_MPL_ASSERTs to check for the possible value(s) of the strategy tags;
2014-11-07 12:35:42 +02:00
Menelaos Karavelas
ffb90fcc48 [strategies][spherical][cross_track] fix return type in result_from_distance meta-struct 2014-11-07 12:34:03 +02:00
Barend Gehrels
8c75d81fff [overlay] fix behaviour of u/u turns for difference. This fixes
the assemble unit test which broke in earlier commits today
2014-11-06 18:54:55 +01:00
Barend Gehrels
16fb689217 [overlay] fix indexing in range which was wrong for open polygons (ticket #10719) 2014-11-06 16:49:51 +01:00
Barend Gehrels
4bb18c982e [overlay] ticket #10719 add safety checks 2014-11-06 16:36:54 +01:00
Barend Gehrels
c5417f6f43 [overlay] fix ticket #10108: rings only touching should check for u/u turns
and don't call point_on_border because that might be located on the border of the
other geometry. This also avoids passing the mid_point boolean, and including
within_code in ring_properties
2014-11-06 14:29:35 +01:00
Barend Gehrels
552ff581d4 [overlay] 'fix' wrong name Code to Properties 2014-11-06 11:13:23 +01:00
Barend Gehrels
d6201ef573 [overlay] refactor counting turns
This prepares next phase where we handle uu separately
2014-11-06 11:02:39 +01:00
Barend Gehrels
a758552c5d [overlay] rename variables in selection map 2014-11-05 22:41:53 +01:00
Barend Gehrels
347eaa580c [extensions][dissolve] use rescaling for dissolve, see ticket 10713 2014-11-05 13:59:08 +01:00
Barend Gehrels
690427a135 [buffer] re-add count which is still used if occupation info is used 2014-11-05 13:39:57 +01:00
Barend Gehrels
448040613d [overlay][fix] fix rescaling when coordinate-differences are larger than recaling range,
which is unfortunately slipped through. This fixes ticket #10747
2014-11-05 13:38:12 +01:00
Menelaos Karavelas
8daa62a3be [strategies][cartesian][cart_intersect] update copyright notice 2014-11-05 08:50:40 +02:00
Adam Wulkiewicz
f0c5554190 Merge pull request #129 from mkaravel/feature/disjoint-1.57
Feature/disjoint 1.57
2014-11-04 22:25:35 +01:00
Menelaos Karavelas
b2683f48f2 [strategies][cartesian][cart_intersect] fix bug in Cartesian segment-segment
intersection strategy;
Bug: when exactly one segment degenerates to a point and is collinear with
the other segment, the strategy always sets the intersection count to 1;
Fix: check if the degenerate segment lies within the non-degenerate one
before setting the intersection count; if the point is outside the non-degenerate
segment declare the two segments as disjoint;
2014-11-04 22:02:47 +02:00
Menelaos Karavelas
7b3ced0c6a Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint-1.57 2014-11-04 15:16:42 +02:00
Adam Wulkiewicz
5daeae927a Merge pull request #174 from mkaravel/fix/distance
Fix/distance
2014-11-03 22:53:50 +01:00
Menelaos Karavelas
9c0528340b [iterators][flatten_iterator] change statement layout to be nicer 2014-11-03 21:08:31 +02:00
Adam Wulkiewicz
9cbedc03b3 Merge branch 'develop' into feature/initializer_list
Conflicts:
	include/boost/geometry/geometries/point.hpp
2014-11-03 20:06:20 +01:00
Menelaos Karavelas
2c975a7b50 [algorithms][distance] fix bug in multipoint to areal geometry computation 2014-11-03 20:58:12 +02:00
Adam Wulkiewicz
ae9c2953d0 Merge branch 'develop' into fix/read_wkt 2014-11-03 19:55:39 +01:00
Menelaos Karavelas
0d8f6074c9 [iterators][flatten_iterator] re-write line in less than 80 characters;
remove templated assignment operator (it is not really needed since the assignment
operator defined and the templated constructor, combined, do what this assignment
operator does)
2014-11-03 16:14:59 +02:00
Menelaos Karavelas
7ae9d20ba0 [iterators][segment_iterator] remove templated assignment operator from
range_segment_iterator class (it is not really needed since the compiler
constructed assignment operator and the templated constructor, combined,
do what this assignment operator does)
2014-11-03 16:01:50 +02:00
Menelaos Karavelas
44a7dfe7dc [iterators][concate_iterator] remove templated assignment operator (it is not
really needed since the compiler constructed assignment operator and the
templated constructor, combined, do what this assignment operator does)
2014-11-03 15:45:54 +02:00
Menelaos Karavelas
545f53f4b2 [iterators][ever_circling_iterator] remove assignment operator (it is
the same as what the compiler would generate, so no need to provide it)
2014-11-03 15:37:49 +02:00
Menelaos Karavelas
6e84a7f5f0 [iterators][closing_iterator] remove assignment operator (it is the
same as what the compiler would generate, so not need to provide it)
2014-11-03 15:36:35 +02:00
Adam Wulkiewicz
dbcbdb6b2b [iterators] Fix return types of templated assignment operators. 2014-11-01 23:34:07 +01:00
Adam Wulkiewicz
6796525e13 [iterators] Avoid assigning an iterator having singular value (uninitialized) in flatten_iterator assignment operators.
Explicitly define flatten_iterator copy assignment operator.
2014-11-01 12:44:55 +01:00
Adam Wulkiewicz
e99f5b9d20 Merge pull request #171 from mkaravel/fix/strong_type_checking_for_cs_template_parameter
Fix/strong type checking for cs template parameter
2014-10-31 14:21:38 +01:00
Adam Wulkiewicz
3efcef5f17 Merge pull request #168 from mkaravel/fix/increment_operator_for_point_and_segment_iterator
Fix/increment operator for point and segment iterator
2014-10-31 14:21:27 +01:00
Menelaos Karavelas
0d34dc4156 [geometries][concepts][point concept] update the ConstPoint concept
to use the enum instead of the typedef to the coordinate system units
2014-10-31 09:53:32 +02:00
Menelaos Karavelas
46c9d3dbfa [geometries][concepts] remove no longer used file/class 2014-10-31 09:48:40 +02:00
Menelaos Karavelas
c9769e1624 [geometries][concepts][point concept] replace typedef to units of
coordinate system by enum storing the size of the coordinate system class
2014-10-31 09:48:05 +02:00
Menelaos Karavelas
d0058108a6 [geometries][point] replace typedef to units of coordinate system by enum storing
the size of the coordinate system class
2014-10-31 09:47:07 +02:00
Menelaos Karavelas
bd11e5f3f9 [core][cs] replace complicated conditional expression with "false"
(the coordinate_system_units class is never supposed to be instantiated
with template parameter value other than bg::degree or bg::radian)
2014-10-30 15:47:12 +02:00
Menelaos Karavelas
43ff56611e [geometries][concepts] add helper class that provides the type of the
units for non-Cartesian coordinate systems, and sets this type to void
for Cartesian ones (used for type checking in the point class and the
point concept);
2014-10-30 01:45:36 +02:00
Menelaos Karavelas
0b3378ce75 [geometries][concepts][point concept] replace boost::ignore_unused_variable_warning()
by boost::ignore_unused(); add typedef for the units of the coordinate system (this
enables a static check for the units type used in non-Cartesian coordinate systems);
2014-10-30 01:43:13 +02:00
Menelaos Karavelas
2550a5d040 [geometries][point] update copyright header; replace derivation from CoordinateSystem
by a private typedef (this provides the necessary type checking for the units for
non-Cartesian coordinate systems);
2014-10-30 01:40:52 +02:00
Menelaos Karavelas
2027c9a905 [core][cs] update copyright header; make coordinate_system_units a struct; 2014-10-30 01:39:26 +02:00
Barend Gehrels
c6fc633cdb Merge branch 'develop-1.57' into develop 2014-10-29 22:43:40 +01:00
Barend Gehrels
87cc28a312 Merge branch 'develop-1.57' into prepare 2014-10-29 22:34:00 +01:00
Barend Gehrels
47811c4248 [buffer] fix symmetric distance strategy for deflate 2014-10-29 22:17:12 +01:00
Menelaos Karavelas
6beccce25f [core][cs] change namespace core_dispatch to namespace core_detail;
for non-Cartesian CS's do not derive from core_detail::coordinate_system_units,
but rather use core_detail::coordinate_system_units to define the units type;
2014-10-29 19:43:13 +02:00
Barend Gehrels
254999addd [buffer] Fix case for square with buffer-distance = half the size, IP's
are on border of original and should be discarded for both inflate/deflate
This fixes the cases added to unit tests before
2014-10-29 17:26:43 +01:00
Menelaos Karavelas
c71e09d389 [geometries][point] make the point derive privately from the
coordinate system; the advantage of that is that a non-Cartesian point defined
with bg::cs::spherical<T>, bg::cs::geographic<T>, etc., where T is neither
bg::degree not bg::radian cannot even be instantiated given the stronger
type checking implemented in core/cs.hpp for the non-Cartesian coordinate
systems;
2014-10-29 13:40:50 +02:00
Menelaos Karavelas
7a001fbbc1 [core][cs] add stronger type checking for template parameter of bg::cs::spherical,
bg::cs::polar, bg::cs::spherical_equatorial and bg::cs::geographic; the only
allowed values for this template parameter are bg::degree and bg::radian;
2014-10-29 13:38:30 +02:00
Barend Gehrels
9a089831f8 [buffer] remove redundant bracket 2014-10-29 10:04:04 +01:00
Adam Wulkiewicz
b35bead009 [buffer] Suppress MSVC unused parameters warnings. 2014-10-28 15:07:01 +01:00
Barend Gehrels
84a4963df5 [buffer] use math::pi instead of M_PI 2014-10-27 23:31:00 +01:00
Barend Gehrels
daa9d3fcd0 [buffer][fix] fix round join strategy, it should not use acos for non-normalized
dot product. Now we use atan2 to calculate the angles
2014-10-27 23:27:31 +01:00
Barend Gehrels
cda05b592e [buffer] Fix last_segment_index if range (outputted by join strategy) is empty 2014-10-27 23:26:01 +01:00
Barend Gehrels
e7abda8667 Merge branch 'develop-1.57' into prepare 2014-10-24 19:39:38 +02:00
Barend Gehrels
a5b9cfe0bc [buffer][fix] fix for open input of 3 points 2014-10-24 19:39:01 +02:00
Barend Gehrels
095f4c6798 Merge branch 'develop-1.57' into prepare 2014-10-24 15:58:05 +02:00
Barend Gehrels
0f72af95f0 [buffer] fix simplify which should work on input ringtype
and added unit test which tests different input/output types w.r.t. point order
(different point types are not yet supported)
2014-10-24 15:52:05 +02:00
Barend Gehrels
bd4de457d8 [buffer][fix] fixes counter clockwise polygons 2014-10-24 15:02:55 +02:00
Barend Gehrels
6280a2b67e [buffer] support buffer for degenerate polygons (pointlike, not enough points) 2014-10-24 13:12:10 +02:00
Barend Gehrels
a57e8ffe7f [buffer] make constant local variables const 2014-10-24 12:36:44 +02:00
Barend Gehrels
fd75d83fd1 [buffer][fix] fix output for generated linestrings with two equal points only
It now simplifies first and removes second point if necessary. Also it is
defensive such that generation is stopped if length is 0.
Including unit tests.
2014-10-24 12:36:22 +02:00
Barend Gehrels
e4cd46ac5d [buffer] support degenerate linestrings containing one point. In that
case point-buffer is applied. Including updated unit tests
2014-10-24 11:21:32 +02:00
Menelaos Karavelas
de6f9577bd [iterators][segment_iterator] fix grammar in the comment about the
iterator category of the segment iterator
2014-10-24 01:08:14 +03:00
Menelaos Karavelas
6d76b922c7 [iterators][segment_iterator] fix the segment_iterator's iterator category
to be std::bidirectional_iterator_tag
2014-10-23 14:42:58 +03:00
Menelaos Karavelas
cc63ad105a [algorithms][closest_feature] write for-loop the proper way (i.e., so
that it is a local variable to the for-loop)
2014-10-22 10:01:10 +03:00
Menelaos Karavelas
81abf6c4fe [iterators][segment_iterator] define increment/decrement operators for the
segment_iterator class; these operators are needed so that expressions like
     segment_iterator it = ++other_it;
do not result in compilation errors;
2014-10-22 09:59:50 +03:00
Menelaos Karavelas
e9c7f8169b [iterators][point_iterator] define increment/decrement operators for the
point_iterator class; these operators are needed so that expressions like
    point_iterator it = ++other_it;
do not result in compilation errors;
2014-10-22 09:57:36 +03:00
Barend Gehrels
ac4bf34329 Merge branch 'develop' into prepare
Conflicts:
	include/boost/geometry/extensions/nsphere/algorithms/num_points.hpp
	include/boost/geometry/extensions/nsphere/index/detail/rtree/rstar/redistribute_elements.hpp
2014-10-20 19:44:24 +02:00
Adam Wulkiewicz
153276fbb3 [geometries] Fix unused parameter warning in ring_proxy 2014-10-20 16:07:15 +02:00
Adam Wulkiewicz
ac6744fa89 [algorithms] Fix unused parameter warning in throw_on_empty_input() 2014-10-20 16:06:41 +02:00
Adam Wulkiewicz
8ad3bd8188 [strategies] Fix conversion in intersection_result.hpp 2014-10-20 15:27:15 +02:00
Adam Wulkiewicz
d067f7b21b [algorithms][index] Remove extra semicolons. 2014-10-19 23:05:08 +02:00
Adam Wulkiewicz
b1d3bb9665 Merge pull request #161 from mkaravel/feature/distance
Re-factoring of bg::distance
2014-10-19 22:13:46 +02:00
Adam Wulkiewicz
1808886487 Merge pull request #155 from awulkiew/fix/centroid
Fix/centroid
2014-10-18 17:35:29 +02:00
Adam Wulkiewicz
eee5b9e6ea [centroid] Move translating_transformer to separate file.
Add ctor taking Geometry to transformer.
This allows to encapsulate the origin-retrieving-logic inside the transformer.
Remove assign_origin() function.
2014-10-18 17:27:52 +02:00
Adam Wulkiewicz
1a2bb4f72e Merge pull request #132 from awulkiew/fix/distance_spherical
Fix/distance spherical
2014-10-18 13:40:25 +02:00
Adam Wulkiewicz
cc9b1292a6 Merge pull request #152 from awulkiew/fix/convex_hull
Fix/convex hull
2014-10-18 13:38:16 +02:00
Adam Wulkiewicz
b56727c606 Merge pull request #163 from awulkiew/fix/disjoint
Fix/disjoint
2014-10-18 13:28:02 +02:00
Adam Wulkiewicz
fba1b5607f [disjoint] Update a comment about point on border. 2014-10-18 12:07:15 +02:00
Adam Wulkiewicz
34fb6d82ef [disjoint] Replace has_within with not_disjoint and set it instead of checking conditions. 2014-10-18 11:58:53 +02:00
Adam Wulkiewicz
a87ace4c58 [nsphere][index][rstar] Fix compilation errors. 2014-10-18 03:45:25 +02:00
Adam Wulkiewicz
1f0d7393fb [nsphere][num_points] Fix compilation errors. 2014-10-18 03:45:06 +02:00
Adam Wulkiewicz
ed649b3b73 [disjoint] Fix A/A by replacing point_on_surface with point_on_boundary and changing relation check. 2014-10-18 03:06:38 +02:00
Menelaos Karavelas
978b38ab62 [algorithms][disjoint] add missing include; replace for-loop by call
to check_iterator_range<...>::apply;
2014-10-18 02:02:58 +03:00
Adam Wulkiewicz
441ef15657 [relate] Fix uninitialized const object error. 2014-10-17 02:43:56 +02:00
Menelaos Karavelas
688fc8fda2 [algorithms][distance] rename the file "geometry_to_geometry_rtree.hpp"
to "range_to_geometry.hpp"
2014-10-16 18:25:36 +03:00
Menelaos Karavelas
c3dc9d0083 [algorithms][distance] remove the geometry_to_geometry_rtree class
(not used anymore); rename "cf" to "closest_features" (more descriptive);
fix header includes;
2014-10-16 18:22:00 +03:00
Menelaos Karavelas
5590da0d13 [algorithms][distance] remove the UseRTreeOfSegments template parameter
and the specialization when the value of this parameter was false
2014-10-16 18:20:47 +03:00
Menelaos Karavelas
e2eeebc3b7 [algorithms][closest_feature] for each intermediate distance result
add test against zero, and return if needed
2014-10-16 18:19:24 +03:00
Adam Wulkiewicz
f98ec5b2c3 [read_wkt] Remove unnecessary remove_reference usage. 2014-10-16 16:48:42 +02:00
Adam Wulkiewicz
3aa580909f Merge branch 'develop' into fix/read_wkt 2014-10-16 16:44:53 +02:00
Adam Wulkiewicz
4ff5fc787b [core] Use bare_type in closure and point_order. 2014-10-16 16:43:16 +02:00
Adam Wulkiewicz
d1eb1add3e Merge branch 'develop' into fix/read_wkt 2014-10-16 16:03:27 +02:00
Adam Wulkiewicz
a757dc8fef [util][core] remove_reference in bare_type. 2014-10-16 16:01:45 +02:00
Menelaos Karavelas
87e56dd875 [algorithms][distance] remove unused variables 2014-10-15 19:34:35 +03:00
Menelaos Karavelas
146a17467f [algorithms][distance] replace the default value for the boolean template
parameter CheckCoveredBy to the correct one
2014-10-15 19:31:49 +03:00
Menelaos Karavelas
2221746e42 [algorithms][distance] change calls to bg::within by the more stable
bg::covered_by; rename template parameter in partial specialization of
point_to_multigeometry to reflect the actual geometry for which it is
called;
2014-10-15 19:25:51 +03:00
Adam Wulkiewicz
49f677cca9 [index][intersection_content] Add a condition to make the code more robust and silence GCC 4.9.x warning about uninitialized variable. 2014-10-15 17:06:11 +02:00
Adam Wulkiewicz
5125c518b7 [distance][strategy] (spherical) Cosmetic changes - comment, lines length. 2014-10-15 16:32:30 +02:00
Matt Amos
5b47fb3188 [extreme_points] s/kludge/factor/ when flipping side tests. 2014-10-15 14:29:44 +02:00
Matt Amos
deb9d08914 [extreme_points] Kludge to flip side strategy for CCW polygons and their inners. 2014-10-15 13:55:32 +02:00
Matt Amos
786aac69b7 [point_on_surface] Do multiply & divide as separate steps to preserve as much precision as possible when using integer coordinates. 2014-10-15 13:55:05 +02:00
Barend Gehrels
8528423314 Merge branch 'develop' into feature/buffer 2014-10-15 13:08:39 +02:00
Barend Gehrels
70b722436b [buffer] Fix rt_u13 but that fix is still commented because causes other issues.
get_left_turns/occupation_info are revised
2014-10-15 11:59:01 +02:00
Menelaos Karavelas
54a969212c [algorithms][closest_feature] follow coding guidelines regarding "if (expr)" statements 2014-10-15 12:22:19 +03:00
Menelaos Karavelas
ba80bae681 [algorithms][distance] follow coding guidelines regarding "if (expr)" statements 2014-10-15 12:20:13 +03:00
Adam Wulkiewicz
47d18eda0b [from_wkt] Add default template parameters to parsing_assigner. 2014-10-15 03:05:28 +02:00
Adam Wulkiewicz
ce726833f8 [from_wkt] Move the appending logic outside container_appender and dispatch by closure. 2014-10-15 01:19:15 +02:00
Menelaos Karavelas
f58f6a8255 [algorithms][distance] rename beyond to last 2014-10-14 23:38:55 +03:00
Menelaos Karavelas
423ba3d47c [algorithms][disjoint] remove partition related code 2014-10-14 23:18:13 +03:00
Menelaos Karavelas
5dc90b1ffe [algorithms][disjoint] factor-out common functionality in disjoint_multirange_segment_or_box
and multipoint_constant_size_geometry; simplify implementation of disjoint_segment_areal;
2014-10-14 17:02:06 +03:00
Menelaos Karavelas
ecd30f48b6 [algorithms][closest_feature] add assertion against an empty range 2014-10-14 15:46:21 +03:00
Menelaos Karavelas
b7367b76a9 [algorithms][closest_feature] rename beyond to last 2014-10-14 15:44:57 +03:00
Menelaos Karavelas
1139ca97f7 [algorithms][distance] modify the various classes to do not inherit
from closest feature classes, but rather call their public (instead
of protected) interface; optimize the computation of comparable
distances by not re-computing them from closest features
2014-10-14 11:19:18 +03:00
Menelaos Karavelas
d6b9ee59a5 [algorithms][distance] add a boolean metafunction that returns whether
a strategy is comparable or not
2014-10-14 11:16:31 +03:00
Menelaos Karavelas
419a5eadd1 [algorithms][closest_feature] modify the public interface to include
a version of the apply methods that returns (via a reference) the
minimum distance
2014-10-14 11:15:34 +03:00
Adam Wulkiewicz
2278e697d0 [read_wkt] Don't append duplicated, closing Points in open Rings/Polygons.
Note that Points are still appended if there is not enough Points in the input, i.e. the number is < 3 for open Rings.
2014-10-14 01:34:39 +02:00
Menelaos Karavelas
511845ac94 [algorithms][distance] delete obsolete files; code in these files
are to be moved to other files, or replaces by more generic functionality;
2014-10-13 15:24:02 +03:00
Menelaos Karavelas
76132d8737 [algorithms][distance] update the algorithms/detail/distance/implementation.hpp
file to reflect the new/updated files
2014-10-13 15:23:00 +03:00
Menelaos Karavelas
efd60133dc [algorithms][distance] update backward compatibility code according to
the new design rationale
2014-10-13 15:22:13 +03:00
Menelaos Karavelas
0daeabbe57 [algorithms][distance] re-factor the point range-to-geometry and
geometry-to-geometry distance computations: instead of computing distances
directly, first compute the closest features and then compute the distance
as the distance to the closest features; rewrite point range-to-geometry
distance computation so that the range passed can be a range of segments
of the geometry; remove all dispatch code (moved to other more appropriate files,
or replaced by more compact dispatch code);
2014-10-13 15:18:28 +03:00
Menelaos Karavelas
e74accfab9 [algorithms][distance] re-factor point-to-geometry distance computations;
include in point_to_geometry.hpp implementation of point-to-multigeometry
distance computations and dispatches; compute, whenever applicable, the closest
feature of the goemetry to the point, and then compute the distance as the
distance of this closest feature to the point; optimize the performance of
point-to-ring and point-to-polygon by not computing both containment and distance
to the boundary: compute the distance to the boundary only if the containment
test fails;
2014-10-13 15:14:23 +03:00
Menelaos Karavelas
e206352d12 [algorithms][distance] modify segment_to_box generic distance computation
to compute first the point-segment pair that realizes the minimum comparable
distance, and then use this pair to compute the actual distance; for the
cartesian-specific approach modify the code to work correctly and efficiently
for both comparable and non-comparable strategies, without calling
distance_comparable_to_regular;
2014-10-13 13:48:16 +03:00
Menelaos Karavelas
f660c3e6ab [algorithms][distance] modify segment_to_segment distance computation
to compute first the point-segment pair that realizes the minimum comparable
distance, and then use this pair to compute the actual distance
2014-10-13 13:45:44 +03:00
Menelaos Karavelas
a472441749 [algorithms][distance] add new implementation for computing the distance
between a multipoint and a geometry
2014-10-13 12:21:36 +03:00
Menelaos Karavelas
ce57784e1a [algorithms][distance] add generic implementation for computing the
distance between a geometry (linestring, ring, polygon, multipoint,
multilinestring, multipolygon) and a segment or box
2014-10-13 12:18:02 +03:00
Menelaos Karavelas
a3d5fed181 [algorithms][distance] add generic implementation for distance
computation between a linear and a linear/areal geometry
2014-10-13 12:16:56 +03:00
Menelaos Karavelas
f0a8086912 [strategies][distance] eliminate the distance_comparable_to_regular class 2014-10-13 12:16:07 +03:00
Menelaos Karavelas
d8bc8c98b3 [algorithms][distance] modify the dispatch mechanism to cast the
geometry tag to segment, box, liear and areal
2014-10-13 12:14:36 +03:00
Menelaos Karavelas
547a76a611 [algorithms][distance] add generic R-Tree based implementation for
the distance of two linear geometries: there are two versions implemented,
that differ on the type of objects stored in the R-Tree:
* the points of the geometry are stored in the R-Tree, in which case
  the two geometries are first checked for intersection, and then,
  using the R-Tree we compute the distances of the points of one geometry
  to the segments of the other, and vice versa
* the segments of one geometry are stored in the R-Tree and then the
  R-Tree is queried with the segments of the second geometry
The second approach is currently the default.
2014-10-13 11:12:49 +03:00
Menelaos Karavelas
5cdec7ddc8 [algorithms][distance] add a utility class that defines an iterator type
based on the type of the geometry:
* returns a point iterator for multipoints
* returns a segment iterator for linestrings, rings, polygons,
  multilinestrings and multipolygons
the utility class also provides static begin and end methods for accessing
the first and beyond elements of the iterator type it defines
2014-10-13 11:09:48 +03:00
Menelaos Karavelas
cb6686f4b9 [algorithms][closest_feature] add algorithm for computing the element
in a range that is closest to a given geometry
2014-10-13 11:07:51 +03:00
Menelaos Karavelas
7d0313ded8 [algorithms][closest_feature] add algorithm for computing the pair of
closest features between two ranges, using the R-Tree
2014-10-13 11:07:00 +03:00
Menelaos Karavelas
f07af4a8de [algorithms][closest_feature] add algorithm for computing the closest
feature between a point and an open/closed range of segments (represented
as a range of points
2014-10-13 10:56:22 +03:00
Menelaos Karavelas
d0b424bde2 [algorithms][distance] replace ignore_unused_variable_warning by ignore_unused 2014-10-13 10:38:18 +03:00
Adam Wulkiewicz
95b3fb45d3 [centroid] Disable translation for non-areal Geometries. 2014-10-11 11:57:49 +02:00
Adam Wulkiewicz
5e3656a09a [centroid] Disable error-reducing translation for other coordinate systems than cartesian.
Remove undefined namespace.
Add missing headers.
Add a note about other coordinate systems.
Add copyright info.
2014-10-11 01:42:20 +02:00
Adam Wulkiewicz
d7722e190a [centroid] Reduce numerical errors by translating the Geometry closer to 0 and then the result back.
The first Point of the Geometry is used as the new origin.
During the centroid calculation each Point is translated by subtracting the origin.
At the end the resulting point is translated back by adding the origin.
2014-10-11 00:14:36 +02:00
Adam Wulkiewicz
45029d6cb5 [point_on_surface] Remove unneeded function. 2014-10-10 20:38:17 +02:00
Adam Wulkiewicz
72c838c16d Merge pull request #153 from awulkiew/feature/refactor_turns
Overlay/Turns refactorization
2014-10-10 20:32:55 +02:00
Adam Wulkiewicz
776cc4c731 [point_on_surface] Use arithmetic mean instead of centroid(bashein-detmer). 2014-10-10 13:04:20 +02:00
Adam Wulkiewicz
e539a09278 [overlay] Move signed_index_type to separate file. Clean headers in ring_ and segment_identifier.hpp. 2014-10-09 01:07:14 +02:00
Adam Wulkiewicz
7cf47bb1e5 [overlay][is_valid] Replace int with signed_index_type for segments indexes. 2014-10-08 23:50:16 +02:00
Adam Wulkiewicz
296f137d85 [overlay][relate][is_valid][buffer] Remove other_id from turn_operation. 2014-10-08 20:23:42 +02:00
Adam Wulkiewicz
795bda6abe [index] Fix unused parameters warnings. 2014-10-08 00:08:40 +02:00
Adam Wulkiewicz
4c192c76ae [index] Increase readability of redistribute_elements-related code.
Convert struct to functions templates (pick_seeds() functions).
Move template parameters from struct level to method level.
Both for automatic type deduction.
2014-10-07 23:37:09 +02:00
Adam Wulkiewicz
b98df446e4 [index] Use in-memory (std::allocator) temporary containers in redistribute_elements. 2014-10-07 23:04:58 +02:00
Adam Wulkiewicz
8e4bc68ed5 [index] Rename "static" nodes to "variant" nodes (it is more clear). 2014-10-05 16:19:18 +02:00
Adam Wulkiewicz
9d7ed2962e [index] Remove polymorphic nodes. Add the implementation of weak nodes, not included/used yet.
The rationale to remove polymorphic nodes:
1. such nodes can't work properly if stored in shared memory due to the way how addresses are calculated (using offsets).
2. the rtree using Variant-based nodes has similar performance and takes less memory.
3. the rtree using newly added weak_nodes (not supported/enabled yet) will be even faster and smaller.

This is the first step to entirely drop the support for polymorphic nodes. After this it should be not needed to explicitly specify the Nodes types in visitors, therefore it should be possible to dispatch the nodes types statically more conveniently, simplify templates by removal of unneeded parameters, write simpler and more maintainable code, etc.
2014-10-05 15:36:50 +02:00
Adam Wulkiewicz
22bd0ea747 [test][index] Change throwing nodes from polymorphic to variant-based. 2014-10-05 14:40:43 +02:00
Adam Wulkiewicz
5531315d98 [index] Move elements-access-related code to separate file, not mixing it with nodes definition. 2014-10-05 12:29:28 +02:00
Adam Wulkiewicz
0db47437f2 [index] Replace levels type size_t with size_types in R*-tree insert visitor. 2014-10-04 01:40:40 +02:00
Adam Wulkiewicz
3069084c15 [index] Replace levels type size_t with size_types in rtree insert visitor. 2014-10-04 01:29:04 +02:00
Adam Wulkiewicz
1f1f663a12 [index] Replace size_t with proper size_types in rtree remove visitor. 2014-10-04 00:59:06 +02:00
Adam Wulkiewicz
6b8aeabbdf [index] Cosmetic changes.
Remove unneeded typedefs in nodes.
Change the order of template parameters in bgidr::get(dynamic_node<>&)
2014-10-04 00:06:21 +02:00
Adam Wulkiewicz
fa7cd296d3 [index] Refactor count rtree visitor.
Remove specialization of count visitor for value_type, don't duplicate the same algorithm in 2 places.
Move Value/Indexable-aware parts into smaller helper struct and specialize it.
2014-10-02 23:40:53 +02:00
Adam Wulkiewicz
a9ac57dc8f [index] Support objects of type convertible to value_type in rtree::count(). 2014-10-02 23:37:32 +02:00
Adam Wulkiewicz
d331bf262a [index] Tweak type, variable names and description of member and free rtree insert() and remove() functions. 2014-10-02 21:44:18 +02:00
Adam Wulkiewicz
d32066530c [index] Support objects of type convertible to value_type in insert() and remove().
In previous implementation such objects was falling into the overload taking Range.
2014-10-02 21:22:32 +02:00
Adam Wulkiewicz
ff98b648ee [index] Update copyrights info. 2014-10-02 21:22:11 +02:00
Adam Wulkiewicz
3abe3e0b79 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-10-02 20:08:19 +02:00
Adam Wulkiewicz
eabb17b7e4 [index] Replace uses of traits:xxx with geometry::xxx metafunctions. 2014-10-02 20:06:02 +02:00
Adam Wulkiewicz
b2dfd7f0c8 [index] Use default Dimension templ. params in content() and margin() algorithms.
Replace traits::dimension<> with geometry::dimension<>.
2014-10-02 19:57:20 +02:00
Adam Wulkiewicz
e6331558a5 Merge pull request #150 from mkaravel/fix/for_each-alternate
[algorithms][for_each] Alternative fix
2014-10-02 12:33:47 +02:00
Adam Wulkiewicz
091ddae7db [convex_hull] Generate "proper" number of Points also when invalid Output is generated.
E.g. for 1- or 2-Point MultiPoint input the Output is a 0-area Ring (Point-like or Segment-like respectively). After this change it should contain "proper" number of Points (3 for open, 4 for closed). The additional Point is added by duplication of the first one.
2014-10-01 22:11:52 +02:00
Adam Wulkiewicz
5c582c6aa5 [convex_hull] Generate consistent results for closed and open Geometries.
The result differ only for the last Point duplicated for closed.
This code should be faster than the original since any condition isn't checked inside a copying loop and the end iterators are created only once.
2014-10-01 21:48:38 +02:00
Adam Wulkiewicz
44f3408139 [convex_hull] Fix invalid number of Points generated for open OutputGeometry. 2014-10-01 18:31:31 +02:00
Adam Wulkiewicz
add58fec8c [iterators] Fix the description of closing_iterator<>. 2014-10-01 16:58:29 +02:00
Adam Wulkiewicz
39802e7923 [core] Add MPL_ASSERT for coordinate dimension > 0 2014-10-01 16:49:49 +02:00
Adam Wulkiewicz
1e968c3590 [index] Add default template parameters in the implementation of is_valid. Remove MPL assert 2014-10-01 16:28:15 +02:00
Barend Gehrels
bf7ca70687 Merge branch 'develop' into feature/buffer 2014-10-01 10:26:21 +02:00
Barend Gehrels
cfb66e85b3 [debug] extend operator<< of segment_ratio, now displaying the real value too 2014-10-01 10:24:21 +02:00
Barend Gehrels
5d93d7a116 [debug] fix operator<< of segment_identifier, now using os 2014-10-01 10:23:39 +02:00
Menelaos Karavelas
6e52b356e7 [algorithms][for_each] fix bug in for_each_segment for open geometries
without using the closeable_view (so that mutable geometries can also
be supported)
2014-10-01 09:26:46 +03:00
Adam Wulkiewicz
f1ec0715ee Merge pull request #147 from mkaravel/fix/for_each
[algorithms][for_each] fix bug with for_each_segment for open geometries
2014-09-30 17:53:51 +02:00
Menelaos Karavelas
ac32f9dd58 [algorithms][for_each] fix bug with for_each_segment for open geometries:
for_each_segment was not considering the last implicit segment of open
geometries; the patch fixes this;
2014-09-30 17:08:15 +03:00
Menelaos Karavelas
f3ee1dedcd [algorithms][distance] qualify point_iterator by geometry namespace
(needed because of the changes in the point_iterator class, namely
the introduction of the bg::detail::point_iterator namespace)
2014-09-30 17:04:34 +03:00
Menelaos Karavelas
fb35d9db7a [iterators][segment_iterator] update segment_iterator implementation
following the changes in the point_iterator implementation design
and file/directory layout
2014-09-30 15:04:10 +03:00
Menelaos Karavelas
60f184e3ce [iterators][point_iterator] change file/directory structure for
point iterator; use detail::point_iterator namespace for the
implementation details of the point iterator;
2014-09-30 15:02:20 +03:00
Menelaos Karavelas
b9c496a1d8 [iterators][point_reverse_iterator] mark methods and constructors as inline 2014-09-30 15:00:42 +03:00
Adam Wulkiewicz
f76671507a Merge pull request #141 from mkaravel/feature/segment_iterator
Feature/segment iterator
2014-09-30 12:45:57 +02:00
Menelaos Karavelas
10ce79898a [iterators][segment_iterator] update implementation of segment_iterator
due to the change of namespace and name of the segment_iterator_type class;
make constructors of bg::segment_iterator class inline; change the return type
of segments_begin and segments_end to be segment_iterator<Geometry const>;
2014-09-30 09:50:47 +03:00
Menelaos Karavelas
404ca1cbe6 [iterators][segment_iterator] move implementation of bg::segment_iterator_type
to bg::detail::segment_iterator namespace; rename the class segment_iterator_type
to iterator_type;
2014-09-30 09:49:26 +03:00
Menelaos Karavelas
029cb92952 [iterators][segment_iterator] fix file-inclusion guarding macro to
reflect true file path
2014-09-29 17:15:23 +03:00
Menelaos Karavelas
67e418e705 [iterators][segment_iterator] move range_segment_iterator class to
detail::segment_iterator namespace; move bg::segment_iterator_value_type
to bg::detail::segment_iterator::value_type;
2014-09-29 17:10:24 +03:00
Menelaos Karavelas
2a0dceece9 [iterators][segment_iterator] correct comments; fix code length to be
at most 80 characters;
2014-09-29 17:06:41 +03:00
Menelaos Karavelas
84b54af205 [iterators][segment_iterator] correct comments 2014-09-29 17:05:35 +03:00
Menelaos Karavelas
bffac4a108 [geometries][pointing_segment] initialize member variables in
default constructor with NULL; in get/set access methods check
that the pointers of the segment are not NULL (via assertion);
remove copy constructor and assignment operator: they are the
same as those the compiler would produce automatically;
2014-09-27 14:04:35 +03:00
Menelaos Karavelas
6388a43089 [iterators][segment_iterator] change the value type of the segment iterator
from referring_segment to pointing_segment
2014-09-26 11:41:20 +03:00
Menelaos Karavelas
8fc8bd9773 [geometries][pointing_segment] introduce a new segment class called
pointing segment; this segment is default constructible, copy constructible
and assignable; it stores pointers to points instead of the points themselves
(for efficiency); this segment class is meant to be the value type of the
segment iterator;
2014-09-26 10:07:20 +03:00
Menelaos Karavelas
039f8f7a48 [algorithms][turns] add missing include that causes compilation error
when -DBOOST_GEOMETRY_TEST_DEBUG is defined, and re-arrange order of includes
2014-09-26 09:44:21 +03:00
Barend Gehrels
2c84bb4d49 [buffer] block turns instead of discarding them
This fixes case rt_u11
New result of recursive_polygons_buffer: 2 errors out of 510372
2014-09-24 10:36:15 +02:00
Menelaos Karavelas
d2be8d47a3 [iterators][segment_iterator] add implementation for the segment_iterator
class, as well as for the free functions segments_begin and segments_end
2014-09-24 08:49:19 +03:00
Menelaos Karavelas
6dea5fca84 [iterators][segment_iterator] add implementation for the underlying
segment_iterator type
2014-09-24 08:48:43 +03:00
Menelaos Karavelas
3739d79140 [iterators][segment_iterator] add implementation for an iterator over
the segments of a range
2014-09-24 08:48:09 +03:00
Menelaos Karavelas
e9aee61734 [iterators][segment_iterator] add basic dispatch definitions for the
segment_iterator and segment_iterator_type classes
2014-09-24 08:45:02 +03:00
Menelaos Karavelas
73ec339f7b [iterators][concatenate_iterator] add one more template parameter for
the reference type (previously it was defaulted to Value&)
2014-09-24 08:43:21 +03:00
Menelaos Karavelas
49af3c4c87 [iterators][flatten_iterator] add one more template parameter for the
reference type (previously it was defaulted to Value&)
2014-09-24 08:41:42 +03:00
Menelaos Karavelas
6c6c31d1b2 [iterators][point_iterator] add missing include for interior_type 2014-09-24 08:39:45 +03:00
Patrick J. LoPresti
ff24c271a7 [core] Fix signed/unsigned comparison warnings 2014-09-22 14:13:14 -07:00
Adam Wulkiewicz
0f23d2317a [index] Fix signed/unsigned comparison in is_valid (MPL_ASSERT). 2014-09-22 00:30:08 +02:00
Barend Gehrels
8643a35da3 Merge branch 'develop' into feature/buffer 2014-09-17 16:33:32 +02:00
Barend Gehrels
c55e000eef [buffer] small changes in comments/test svg 2014-09-17 16:32:25 +02:00
Barend Gehrels
9298ac2a2c [buffer] fix intersection points on border, equal points should not be checked
and correct order in call to side strategy
This fixes case rt_u10
2014-09-17 16:30:03 +02:00
Mario Lang
29006dc748 Fix missing include. 2014-09-17 10:29:25 +02:00
Adam Wulkiewicz
cc1cfbda01 Merge pull request #136 from awulkiew/fix/winding_spherical
Fix/winding spherical
2014-09-12 14:58:20 +08:00
Adam Wulkiewicz
585d59fce4 [within] Fix winding strategy MSVC compilation error. Remove the typename keyword from a type definition without dependent type. 2014-09-12 14:57:22 +08:00
Adam Wulkiewicz
f68659ba33 [relate] Fix unused variable warnings 2014-09-11 10:24:00 +08:00
Barend Gehrels
2b9ff190a8 [buffer] add comments 2014-09-10 15:34:30 +02:00
Barend Gehrels
e6043d9a5c [buffer] fix cases where intersection point falls between robust piece
and non-robust original. We now check robust representions of originals
where this cannot happen
This fixes rt_u9
This obsoletes turn_in_input
2014-09-10 15:33:44 +02:00
Barend Gehrels
fcd0c5b768 [buffer] helper_points (formerly called helper_segments) are now optional
and we rescale/finish the piece on the fly and not in a separate call
2014-09-10 13:05:13 +02:00
Barend Gehrels
8f0e0fdcb1 [buffer] fix adding piece for side with a range, the intermediate range points were
not added (there is not yet a strategy doing this). Share functionality for adding
a range
2014-09-10 12:10:49 +02:00
Barend Gehrels
2cd418167d Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-09-10 11:12:06 +02:00
Barend Gehrels
834be28e27 [overlay] change comment 2014-09-10 11:10:42 +02:00
Barend Gehrels
9a69055b6c Merge branch 'develop' into feature/buffer 2014-09-10 11:07:53 +02:00
Barend Gehrels
a1f5f50f15 Merge pull request #134 from awulkiew/fix/winding_spherical
Fix/winding spherical
2014-09-10 10:55:57 +02:00
Adam Wulkiewicz
8ad3f134b2 [within] Fix non-cartesian points handling in winding strategy, case when Point's latitude is between Segment's Points latitudes. 2014-09-08 22:13:12 +08:00
Menelaos Karavelas
61c33ca109 [algorithms][num_points] remove check for starting-ending point in range_count 2014-09-05 10:19:08 +03:00
Barend Gehrels
e00d204218 [buffer] remove situation_map because for these sides, rescaling does not give added value and
can cause rounding errors
2014-09-03 18:09:35 +02:00
Barend Gehrels
95d794e218 [buffer] fix order when multiple turns are colocated on the same point.
This replaces get_relative_order which was not effectively used anymore and
(most probably) get_left_turns.
This fixes case rt_u7
2014-09-03 17:53:21 +02:00
Barend Gehrels
c271df6a8b Merge branch 'feature/buffer' into develop
Conflicts:
	test/algorithms/buffer/polygon_buffer.cpp
2014-09-03 11:42:30 +02:00
Adam Wulkiewicz
6dafef017e [distance] Fix compilation error in get_comparable<> specialization for distance_cross_track_point_box<> 2014-08-30 16:33:05 +02:00
Adam Wulkiewicz
6c4c340934 [distance] Optimize cross_track_point_box - calculate courses only once, do not use other strategies than PP 2014-08-30 13:24:48 +02:00
Adam Wulkiewicz
f29f3a821a [strategies] Add move course() to algorithms/detail and use it in spherical side and distance strategies. 2014-08-30 03:18:58 +02:00
Adam Wulkiewicz
4fa9f38825 [distance] Add preliminary version of Pt/Box spherical strategy. 2014-08-29 23:42:01 +02:00
Adam Wulkiewicz
ee798cdbc6 [distance] Do not use cartesian default strategy for non-cartesian Pt/Box and Box/Box 2014-08-29 22:33:34 +02:00
Adam Wulkiewicz
0c2d526faa [num_geometries] Add missing includes, variant-related 2014-08-27 13:09:04 +02:00
Barend Gehrels
02ae40805c [buffer] remove now redundant member m_last_piece_index 2014-08-27 12:28:44 +02:00
Barend Gehrels
c42aeb4447 [buffer][fix] fix neighbour check in calculating turns. This fixes ticket 10398 2014-08-27 12:27:57 +02:00
Barend Gehrels
12b61c6a0f Merge branch 'develop' into feature/buffer 2014-08-27 11:34:07 +02:00
Adam Wulkiewicz
b51444a928 [num_segments] Add parentheses to suppress the warning about the operators precedence 2014-08-27 02:25:19 +02:00
Adam Wulkiewicz
98900f3ecf [math] Replace simple rounding with boost::math::round().
Due to a recent fix in Boost.Math for corner cases.
PR: https://github.com/boostorg/math/pull/8
Commit: fb835eb029
2014-08-27 02:05:55 +02:00
Adam Wulkiewicz
3560ae1c93 [index] fix varray const rbegin() and rend().
non-const reverse iterator type was used internally.
2014-08-25 13:25:46 +02:00
Adam Wulkiewicz
be637c0929 Merge pull request #128 from mkaravel/feature/counting-algorithms
Feature/counting algorithms
2014-08-14 12:57:48 +02:00
Menelaos Karavelas
05a0f16ad5 [doc][algorithms][num_segments] remove add_for_open argument from
doxygne documentation; update qbk documentataion to reflect that there
is only one argument to the free function
2014-08-14 00:42:17 +03:00
Menelaos Karavelas
fab29b52e2 [algorithms][num_points] in the range_count class, include the test for n == 0
inside the same if as AddForOpen (much like the previous implementation for this
class)
2014-08-12 00:33:03 +03:00
Adam Wulkiewicz
f2cad14377 Merge pull request #124 from mkaravel/feature/is_valid
Feature/is valid
2014-08-11 20:19:56 +02:00
Adam Wulkiewicz
5654a36552 [overlay] Fix unused variable warnings (with NDEBUG defined) by removal of unneeded asserts. 2014-08-11 15:42:32 +02:00
Adam Wulkiewicz
a4159a2883 [relate] Fix unused variable warning (with NDEBUG defined). 2014-08-11 15:27:54 +02:00
Menelaos Karavelas
c218f32242 [algorithms][distance] add a comment about the usage of boost::ignore_unused 2014-08-11 14:24:25 +03:00
Menelaos Karavelas
d572ee54e0 [algorithms][distance] fix unused variable warning when boost is compiled in release mode 2014-08-11 13:41:27 +03:00
Barend Gehrels
446b4494cf [buffer] remove taxicab distance, comparable distance is OK 2014-08-11 12:25:05 +02:00
Menelaos Karavelas
e472d4b439 [algorithms][num_points] re-write the num_points code so that the add_for_open
boolean argument is passed at the dispatch level as a template parameter; this
enables the firther simplification of the code in detail::counting namespace
2014-08-11 13:20:07 +03:00
Barend Gehrels
024b131f1e [buffer] removed wrong comments 2014-08-11 12:19:33 +02:00
Menelaos Karavelas
ebedefc1da [algorithms][num_segments] remove the boolean argument: num_segments
will always return the true number of segments of the geometry
2014-08-11 13:19:25 +03:00
Menelaos Karavelas
77f5a5b136 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/counting-algorithms 2014-08-11 13:12:30 +03:00
Barend Gehrels
bcc2273e1c [overlay][enrich] rename index to turn_index and make indices std::size_t 2014-08-11 11:38:01 +02:00
Barend Gehrels
61d8cb20f6 [overlay][enrich] avoid copies of operation/ids by using const* 2014-08-11 11:34:03 +02:00
Barend Gehrels
d227658122 [overlay] use seg_id instead of other_id in enrich phase 2014-08-11 10:59:34 +02:00
Menelaos Karavelas
01043518b3 [algorithms][num_segments] simplify the computation of num_segments for boxes 2014-08-11 01:45:45 +03:00
Menelaos Karavelas
9bcdfa8c49 [algorithms][num_points] simplify the computation of num_points for boxes 2014-08-11 01:45:12 +03:00
Menelaos Karavelas
43df5efe96 [test,algorithms][util] remove ipower and its unit test 2014-08-11 01:43:37 +03:00
Bruno Lalande
40229f12e6 [union] Remove another unjustified intermediate function 2014-08-10 22:50:33 +01:00
Bruno Lalande
1221b71fc7 [union] Remove unjustified intermediate function 2014-08-10 22:50:27 +01:00
Adam Wulkiewicz
7d58d1d6a0 [index] Add alternative ABL handling - using heap instead of sorted container
Code is commented out, left "for the record" as a result of a quick test.
Add some comments about possible improvements.
2014-08-10 18:27:58 +02:00
Adam Wulkiewicz
313408d114 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-08-10 16:21:00 +02:00
Adam Wulkiewicz
8e387e853b [index] Remove unneeded pushable_array container 2014-08-10 16:20:48 +02:00
Adam Wulkiewicz
70e6700690 [index] Fix unused type warnings in experimental serialization code 2014-08-10 16:15:11 +02:00
Adam Wulkiewicz
17fd9c6fdb [index] Remove/modify some comments 2014-08-10 16:08:54 +02:00
Barend Gehrels
a7764c1b9e [buffer][fix] use taxicab distance instead of comparable distance
This is faster and avoids overflows. This fixes rt_u6
2014-08-10 15:32:07 +02:00
Barend Gehrels
31abd20829 [buffer][fix] Distinguish between "within" and "within_near_offsetted"
The last one might be offsetted by 1 due to integer rounding. It is not
selectable as a starting point but may be used for traversal
2014-08-10 14:15:04 +02:00
Barend Gehrels
6df7738d3a [buffer][fix] Fix turns which were only on helper-segments, they can be discarded.
This fixes rt_u3 and rt_u4 where a false interior ring was generated
2014-08-10 12:49:37 +02:00
Barend Gehrels
b469509bd0 [buffer][fix] Fix accidental removal of == 0 2014-08-10 12:48:22 +02:00
Barend Gehrels
a46e2603d8 [buffer][fix] In rare cases an extra ring was traversed and created. Fixed, that ring is
discarded now. This fixes behaviour of assign_parents with positive-rings in positive-rings (when
check_for_orientation is true; normally (for overlay) it is false)

It also reverses a negative-only ring so fixes a linestring_buffer testcase.

For multi-polygon it fixes new testcase rt_u2 found by recursive-polygon-buffer test
2014-08-09 23:51:42 +02:00
Barend Gehrels
bdcdb5717e [buffer] don't check neighbor for on-border 2014-08-09 23:18:48 +02:00
Barend Gehrels
536f6a6974 [buffer] remove unused variable 2014-08-09 23:06:15 +02:00
Barend Gehrels
9df6901a87 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-08-09 22:56:59 +02:00
Barend Gehrels
f41b90f166 Merge branch 'feature/buffer' into develop 2014-08-09 22:56:36 +02:00
Menelaos Karavelas
50d6739c62 [algorithms][disjoint] rename struct multipoint_geometry to
multipoint_constant_size_geometry
2014-08-09 01:14:03 +03:00
Menelaos Karavelas
03705c3df7 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint-1.57 2014-08-09 01:03:41 +03:00
Menelaos Karavelas
3ecdfc4886 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_valid 2014-08-09 00:48:33 +03:00
Menelaos Karavelas
eaf3634509 [algorithms][num_geometries][num_interior_rings][num_points][num_segments]
move concept checking from free function to struct calling the dispatch
class (i.e., after the variant resolution is done)
2014-08-08 23:31:55 +03:00
Menelaos Karavelas
b0c06af00b [algorithms][num_segments] replace unnecessary "typename" by "inline" 2014-08-08 20:50:51 +03:00
Menelaos Karavelas
66a06a20c4 [algorithms][num_points][num_geometries][num_interior_rings] replace
unnecessaty "typename" by "inline"
2014-08-08 20:48:09 +03:00
Menelaos Karavelas
e14c0aa350 [algorithms][num_points][num_interior_rings][num_geometries]
coding style change: move curly brace at beginning of next line
2014-08-08 20:43:25 +03:00
Barend Gehrels
b9c3c45902 Merge pull request #127 from mkaravel/fix/buffer-include-header
[algorithms][buffer] fix header for inclusion of disjoint
2014-08-08 19:39:27 +02:00
Adam Wulkiewicz
34c0c8940f [views] Fix compilation error in box_view caused by the change of a detail::assign_box_corners_oriented() body.
This function requires Range but was using operator[] which isn't a part of Range concept.
And box_view passed a raw pointer into this function.
So now a temporary range std::pair<> is created and passed, this might be changed if point_view stored boost:array<>.
It could be directly passed into the assign_box_corners_oriented.
2014-08-08 18:17:15 +02:00
Adam Wulkiewicz
0c78ad8489 [assign_box_corners] Fix Range concept usage. 2014-08-08 17:21:14 +02:00
Adam Wulkiewicz
800f174e28 [convert] Fix Range concept usage. 2014-08-08 17:18:06 +02:00
Adam Wulkiewicz
0101ba37c5 [append] Fix interior rings and multi Range concept usage. 2014-08-08 17:15:17 +02:00
Adam Wulkiewicz
daf4c5ac2b [index] Fix compilation error - invalid variable name in assert. 2014-08-08 17:00:56 +02:00
Adam Wulkiewicz
bd4a66ddd3 [range_by_section] Fix Range concepts conformance for interior rings and multi ranges. 2014-08-08 16:59:21 +02:00
Adam Wulkiewicz
6df273f5e7 [convert] Replace index type to unsigned 2014-08-08 16:54:34 +02:00
Adam Wulkiewicz
4089337045 [overlay] Fix Range concepts conformance for interior rings and multi ranges. 2014-08-08 16:46:27 +02:00
Adam Wulkiewicz
183124057e [index] Update copyright info 2014-08-08 15:04:10 +02:00
Adam Wulkiewicz
f24430c300 [index] Optimize R* choose_next_node - remove sort() and cleanup 2014-08-08 14:59:15 +02:00
Menelaos Karavelas
4444dd1824 [algorithms][multi][num_points] move code from multi/algorithms/ directory
to algorithms/ directory
2014-08-08 13:23:04 +03:00
Menelaos Karavelas
ba5e60fd25 [algorithms][num_segments]
* move code common to other counting algorithms in namespace
  detail::counting (in file algorithms/detail/counting.hpp)
* implement algorithm for boxes of any dimension
2014-08-08 13:20:48 +03:00
Menelaos Karavelas
d2e7bc17e8 [algorithms][num_points]
* move code common to other counting algorithms in namespace
  detail::counting (in file algorithms/detail/counting.hpp)
* implement detail::range_count using detail::num_segments::range_count
* implement algorithm for boxes of any dimension
2014-08-08 13:17:26 +03:00
Menelaos Karavelas
c6c2b1a1bd [algorithms][num_geometries]
* add variant support
* use common functionality in namespace detail::counting for implementing this free function
2014-08-08 13:03:31 +03:00
Menelaos Karavelas
34273f2dea [algorithms][num_interior_rings]
* add variant support
* add concept checking for the geometry
* use code in geometry::detail::counting for implementing this function
2014-08-08 13:01:29 +03:00
Menelaos Karavelas
c94443d3d4 [util] add compile-time Boost.MPL-based implementation for computing
the power of an integral constant; this is used for computing (at
compile-time) the number of points and segments of a box in any dimension;
2014-08-08 12:54:08 +03:00
Menelaos Karavelas
f49f321700 [algorithms][detail][counting algorithms] move common functionality of
all counting algorithms in one place and in new namespace:
geometry::detail::counting
2014-08-08 12:51:42 +03:00
Menelaos Karavelas
ac4dd2c2f7 [algorithms][buffer] fix header for inclusion of disjoint: it is
the point-box and not the box-box version that is needed; also
the call to disjoint is not done via the free function but rather
using the disjoint dispatch struct
2014-08-08 12:25:31 +03:00
Adam Wulkiewicz
8d7b70c3e0 [index] Change the condition and asserts in R*-tree redistribute_elements nth_element 2014-08-08 02:06:26 +02:00
Adam Wulkiewicz
34dcb881d1 [index] Replace partial_sort() with nth_element() in R*-tree redistribute_elements. 2014-08-08 01:38:39 +02:00
Adam Wulkiewicz
5e5044c9d3 [index] Optimize R*-tree choose_next_node by nearly minimum overlap cost - replace partial_sort() with nth_element() and sort() 2014-08-08 00:54:27 +02:00
Adam Wulkiewicz
0728c799dc [follow] Fix msvc size_t to int conversion warnings 2014-08-07 00:52:40 +02:00
Adam Wulkiewicz
df40ef3bc7 [follow] Fix msvc size_t to int conversion warnings 2014-08-07 00:34:00 +02:00
Adam Wulkiewicz
74a38b84dd Merge pull request #126 from mkaravel/feature/num_segments
Feature/num segments
2014-08-06 23:10:35 +02:00
Adam Wulkiewicz
3148a3bda5 [intersection] Move from multi directory. 2014-08-06 20:29:35 +02:00
Adam Wulkiewicz
64f6eac9b5 [num_interior_rings] Move from multi directory. 2014-08-06 19:39:49 +02:00
Adam Wulkiewicz
9796c27b8a [append] Move the code from multi directory 2014-08-06 19:22:06 +02:00
Barend Gehrels
e1fc427e30 [buffer][fix] Mark points in buffered areas as not startable instead of discarding them
Within can have in rare cases a rounding issue. We don't discard this
point, so it can be used to continue started rings in traversal. But
will never start a new ring from this type of points.

This fixes p17
2014-08-06 13:27:52 +02:00
Menelaos Karavelas
c81e8ac430 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/num_segments 2014-08-06 14:13:46 +03:00
Menelaos Karavelas
c9b5e09fff [algorithms][convert, extreme_points] add missing typename 2014-08-06 14:08:46 +03:00
Menelaos Karavelas
be586b5947 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/num_segments 2014-08-06 14:02:26 +03:00
Menelaos Karavelas
f4aeb4f7c6 [algorithms][is_valid] use bg::partition to test whether polygons
(not associated with any turns) do not intersect/overlap each other
2014-08-06 13:37:08 +03:00
Menelaos Karavelas
9641372738 [algorithms][is_valid] make the visitor for partition more generic
(semantically) so that it fits the semantics of the visitor needed
for partition in the multipolygon case
2014-08-06 13:35:35 +03:00
Menelaos Karavelas
5cf1371594 [algorithms][is_valid] fix bug in collecting ring iterators not
associated with turns; rename overlaps_ring to overlaps_box;
rewrite expand_box and overlaps_box in a more generic way (the
arguments are considered now as generic iterators, not necessarily
iterators or rings);
2014-08-06 13:17:28 +03:00
MarekKurdej
a65a94afbc Fix warnings about narrowing conversions on 64-bit systems with 32-bit int. 2014-08-06 11:55:31 +02:00
Menelaos Karavelas
94ebb3bf72 [algorithms][is_valid] use bg::partition to check whether the interior
rings of a polygon (that are disjoint from each other and from the
exterior ring) do not overlap with each other
2014-08-06 12:36:20 +03:00
Adam Wulkiewicz
15fa1ed063 [distance] Fix unused variable MSVC warning in segment/box and replace ignore_unused_variable_warning() with ignore_unused(). 2014-08-01 18:04:57 +02:00
Menelaos Karavelas
9c96fc5e94 [algorithms][disjoint] add alternate implementation for
disjoint(multipoint, multipoint) that uses BG's partition;
2014-07-31 15:40:58 +03:00
Menelaos Karavelas
7cceafa252 [algorithms][disjoint] implement disjoint for the following combinations:
* multipoint / point
* multipoint / segment
* multipoint / box
* multipoint / multipoint
2014-07-31 11:41:00 +03:00
Barend Gehrels
df5326b5ad [partition] changed wrong assert 2014-07-30 15:06:27 +02:00
Barend Gehrels
41a20cd657 Merge pull request #119 from mkaravel/fix/set_tp-point-types
[algorithms][get_turn_info] fix bug reported by Jeremy Murphy on the boost mailing list
2014-07-30 10:46:30 +02:00
Menelaos Karavelas
2d96f3ced9 [algorithms][get_turn_info] fix bug reported by Jeremy Murphy on
the boost mailing list; in collinear_opposite the set_tp method
was assuming that all point types passed to it are the same; this
is not the case: there are two different point types; the problem
appeared when using point_xy in rtree and running intersects queries;
in this case get_turn_info was instantiated with two different point types,
the one used by the user and the one used by the rtree to store boxes,
which were different.
2014-07-30 11:20:39 +03:00
Menelaos Karavelas
e1dfe2e594 [algorithms][intersects] change robustness policy to no_rescale_policy 2014-07-29 15:20:59 +03:00
Adam Wulkiewicz
a73a1c4a1f [strategies] Add missing include to point_in_poly_winding 2014-07-29 00:17:23 +02:00
Menelaos Karavelas
e98bfaca4a Merge branch 'develop' of https://github.com/boostorg/geometry into feature/num_segments 2014-07-29 00:34:33 +03:00
Barend Gehrels
25c1f722a7 Merge branch 'develop' into prepare
Conflicts:
	extensions/test/gis/projections/projection_epsg.cpp
	include/boost/geometry/extensions/gis/projections/impl/pj_ell_set.hpp
	include/boost/geometry/extensions/gis/projections/proj/lcca.hpp
2014-07-28 22:48:16 +02:00
Barend Gehrels
d892855b79 [fix] For the approximation in segment_ratio, change int to double 2014-07-28 22:43:25 +02:00
Adam Wulkiewicz
ce98415c26 [geometry] Change the order of io and views includes - alphabetical asc 2014-07-28 18:29:25 +02:00
Adam Wulkiewicz
b2c71e5694 Merge pull request #117 from mkaravel/doc/include-headers
[doc][include headers] add a few more headers in geometry.hpp
2014-07-28 18:11:19 +02:00
Adam Wulkiewicz
93f64b2ae4 [index] redistribute_elements - use temporary container differently (R*) and add some comments 2014-07-28 18:05:30 +02:00
Menelaos Karavelas
9a2c6d3a43 [doc][include headers] add a few more headers in geometry.hpp
so that the documentation lists boost/geometry.hpp as an alternative
include header for the corresponding functionality; these headers
are related to some core functionality, views and i/o
2014-07-28 11:12:48 +03:00
Adam Wulkiewicz
3ee120efce [index] Add some notes about exceptions. 2014-07-28 00:37:07 +02:00
Barend Gehrels
8a29842df2 [buffer][fix] Don't add piece if strategy returns false 2014-07-27 18:47:49 +02:00
Barend Gehrels
76bebeee6c [buffer][fix] don't check within concave helper pieces 2014-07-27 18:12:04 +02:00
Barend Gehrels
d99d6edfa6 [buffer][fix] Avoid check neighbors on the border for inside, that
should not be the case (but might, by rounding errors)
2014-07-27 17:41:32 +02:00
Barend Gehrels
9467d5d060 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-07-27 17:13:13 +02:00
Barend Gehrels
60e6456c52 [side] removed unused method 2014-07-27 17:09:14 +02:00
Barend Gehrels
cb4b5dafe0 [comments] fixed typos 2014-07-27 17:08:55 +02:00
Barend Gehrels
feccd380ee [buffer][fix] Fix limit for consideration as continue, as it was too high
(for Aimes test or in general cases using lat long)
Including addition of unit test (aimes181)
2014-07-27 17:07:32 +02:00
Adam Wulkiewicz
289645037d [get_turns] Remove unneeded condition in get_turn_info_helpers 2014-07-26 17:46:45 +02:00
Barend Gehrels
dd3c59272f Merge pull request #111 from mkaravel/doc/assign
Fix header includes for assign_values documentation
2014-07-25 18:02:19 +02:00
Adam Wulkiewicz
940bef67dc [algorithms] Remove extra semicolons in check_iterator_range 2014-07-25 16:27:15 +02:00
Adam Wulkiewicz
b7c855022d [extensions][proj] Remove unused variable in lcca 2014-07-25 15:30:12 +02:00
Adam Wulkiewicz
c4e442fffe [extensions][proj] Fix compilation error 2014-07-25 15:04:20 +02:00
Menelaos Karavelas
ef6598e7d5 [algorithms][assign] move assign_values free functions from
detail/assign_values.hpp to assign.hpp; done in order to have the
documentation for assign_values in the assign.hpp file;
2014-07-25 12:59:35 +03:00
Barend Gehrels
f4203db687 [buffer][fix] syntax of defines 2014-07-23 17:41:38 +02:00
Barend Gehrels
1fa87bcbba [buffer][fix] to get a proper rescale policy, the buffer distance must be added 2014-07-23 15:13:16 +02:00
Barend Gehrels
f09387fabb [buffer][fix] Fixed detection of difference spike/continue 2014-07-23 13:32:24 +02:00
Barend Gehrels
b83bd46243 [buffer] use promoted types in buffer_join_round 2014-07-23 13:16:40 +02:00
Barend Gehrels
c863a0dfca [buffer][fix] remove unintended minus signes uncatched earlier
(they come from a git gui copy/paste)
This is quite a difference (in the aimes_test case)
2014-07-23 12:52:37 +02:00
Menelaos Karavelas
8704854033 [algorithms][relate] add missing includes; qualify binary_search with std:: namespace 2014-07-22 15:16:42 +03:00
Barend Gehrels
573c21f933 Merge branch 'develop' into prepare
Conflicts:
	extensions/example/gis/io/shapelib/shapelib.cpp
	include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp
	include/boost/geometry/extensions/algorithms/offset.hpp
	include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_ell_set.hpp
2014-07-21 22:58:40 +02:00
Barend Gehrels
5e99fb4987 [point_in_geometry] remove todo item - it should stay -1, 0, 1, these
numbers can be used in calculations
2014-07-20 16:55:57 +02:00
Barend Gehrels
d66b7a0ee1 [buffer] remove obsolete todo items 2014-07-20 16:55:09 +02:00
Barend Gehrels
2cd7615435 [buffer] side_straight strategy, promote type 2014-07-20 16:52:26 +02:00
Barend Gehrels
77b2723935 [buffer] make miter_limit flexibel and correct IP to exactly that limit 2014-07-20 16:38:32 +02:00
Barend Gehrels
804fea10e3 [buffer][fix] avoid warning 2014-07-20 15:58:20 +02:00
Barend Gehrels
384632c572 [buffer] change default constructors for round strategies and
changed corresponding samples (often omitting the number for non relevant
strategies)
2014-07-20 15:51:49 +02:00
Barend Gehrels
487609b233 [buffer][doc] Enhance doc 2014-07-20 13:45:58 +02:00
Barend Gehrels
d945001bbf [buffer][doc] Add documentation for side_straight, extended doc for buffer with strategies 2014-07-20 13:29:07 +02:00
Barend Gehrels
6100b695be [buffer][doc] Enhancements, cross-links, doc-fixes 2014-07-20 11:32:02 +02:00
Barend Gehrels
0e77ef5342 [buffer] rename buffer_side to side_straight to make it consistent with other buffer strategies
and buffer is already part of the namespace
2014-07-20 10:52:48 +02:00
Barend Gehrels
0b635e342d [buffer] rename buffer_circle to point_circle to have it consistent with other strategies,
and buffer is already in the namespace. same for buffer_square -> point_square
2014-07-20 10:38:40 +02:00
Barend Gehrels
62c821297e [buffer][doc] Avoid having apply and other buffer-strategy members in the doc
They are not relevant for the user. They should only be relevant for users developing
their own strategies, but that should be documented in the (upcoming) strategy concepts
2014-07-20 10:13:32 +02:00
Barend Gehrels
c12701bb40 [buffer] documentation of 6 distance strategies 2014-07-19 23:05:45 +02:00
Barend Gehrels
46068123b9 [buffer] create documentation about PointStrategy (buffer_circle)
add buffer_square as alternative
2014-07-19 14:36:39 +02:00
Barend Gehrels
bfa80944ec [buffer] avoid compiler warnings 2014-07-18 21:56:11 +02:00
Barend Gehrels
e4d40a2287 [buffer] rename CircleStrategy template argument to PointStrategy because
it might also generate squares etc.
2014-07-18 21:29:59 +02:00
Barend Gehrels
d3b135a939 [buffer] use promoted type and made variables const 2014-07-18 20:57:56 +02:00
Menelaos Karavelas
42e16b463f Merge branch 'develop' of https://github.com/boostorg/geometry into feature/num_segments 2014-07-17 09:28:56 +03:00
Adam Wulkiewicz
6ea0517b38 Merge pull request #96 from mkaravel/feature/distance
Optimize distance computations for multi-to-multi and single-to-multi
2014-07-17 02:38:57 +02:00
Menelaos Karavelas
428e010146 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/num_segments 2014-07-17 03:29:16 +03:00
Menelaos Karavelas
1a266ba996 [geometry] include algorithm num_segments 2014-07-17 03:02:30 +03:00
Menelaos Karavelas
3fe14e1df5 [algorithms][num_segments] add doxy/qbk documentation 2014-07-17 03:01:33 +03:00
Menelaos Karavelas
fa203789db [algorithms][distance] check distance against 0 only when the minimum
distance is updated
2014-07-17 02:30:21 +03:00
Adam Wulkiewicz
9dfc90f151 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-07-16 20:50:12 +02:00
Adam Wulkiewicz
36da684609 [winding] Add winding_side_equal optimized for cartesian CS. 2014-07-16 20:44:07 +02:00
Barend Gehrels
5df31ddd0e [buffer] add documentation for buffer with 5 strategies 2014-07-16 17:01:50 +02:00
Barend Gehrels
97fd8f5332 [buffer] move buffer_inserter to namespace detail::buffer, add overload using 5 strategies 2014-07-16 16:58:02 +02:00
Menelaos Karavelas
2e8e6d6f4a [algorithms][num_segments] add num_segments algorithm: computes
the number of segments in a geometry (including geometry variants)
2014-07-16 17:36:35 +03:00
Barend Gehrels
038253e8f5 [buffer] remove end_skip strategy 2014-07-16 15:21:11 +02:00
Barend Gehrels
61ed918240 [buffer] add side/circle strategies to include 2014-07-16 15:12:52 +02:00
Barend Gehrels
bac1ac66af [buffer] avoid having point types in strategies which can be deferred 2014-07-16 15:11:55 +02:00
Barend Gehrels
4966ff5359 [buffer] removed many unnecessary includes from buffer_side 2014-07-16 11:39:13 +02:00
Barend Gehrels
fc0819b8ae [buffer] removed non-used phase parameter 2014-07-16 11:36:06 +02:00
Barend Gehrels
2bdca94e52 [buffer] changed comments 2014-07-16 11:35:29 +02:00
Barend Gehrels
0f027b5ff9 [buffer] add buffer_circle strategy for points and multi-points, and pass
it all the way through the dispatches
2014-07-16 11:31:35 +02:00
Barend Gehrels
57854c2765 [buffer] optionally simplify using ax strategy 2014-07-16 10:45:14 +02:00
Barend Gehrels
dc46575175 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-07-15 22:37:41 +02:00
Adam Wulkiewicz
e3f778511b Merge pull request #95 from awulkiew/feature/point_in_geometry
Fix for within() - ticket https://svn.boost.org/trac/boost/ticket/9628
2014-07-14 23:20:16 +02:00
Adam Wulkiewicz
2ba3e9a95b [strategies][winding] Replace Points creation using copy-ctors with default-ctors + set<>()
Also add some comments about what's going on in the code.
2014-07-14 23:17:09 +02:00
Barend Gehrels
9ed4d83441 [extensions][offset] Let offset compile again.
Note: it does not generate correct offsets!
2014-07-14 22:00:57 +02:00
Barend Gehrels
c5241dd8ee [distance] added missing include file 2014-07-14 21:54:01 +02:00
Adam Wulkiewicz
edf2c00db6 [within][winding] Add more robust calculation of sides in winding strategy.
This commit fixes the ticket https://svn.boost.org/trac/boost/ticket/9628.
The side is calculated always WRT the vertical segment if the p<1> is "equal" to one of the segment endpoint's <1>.
For more information see the comment in the code.
2014-07-14 16:05:26 +02:00
Menelaos Karavelas
9164a5bc0c [multi][algorithms][num_points] add include for std::size_t;
qualify with std:: an occurrence of unqualified size_t;
2014-07-14 14:44:22 +03:00
Adam Wulkiewicz
3e9f1296c5 [relate] Add 'const' keyword to declarations of not modified variables. 2014-07-13 01:16:19 +02:00
Marcel Raad
ca96640521 Fix MSVC compiler warnings
This removes unused variables and redundant re-declarations to silence
warnings about variable shadowing. Tested on MSVC 14 CTP2.
2014-07-12 13:18:47 +02:00
Barend Gehrels
96d8f53fbc [buffer] Avoid accessing pieces if no pieces were added 2014-07-12 11:42:27 +02:00
Menelaos Karavelas
350ca25ccd [algorithms][distance] add dispatch for the three multigeometry-to-ring combinations 2014-07-11 17:10:14 +03:00
Menelaos Karavelas
8df21c677e [algorithms][distance] add dispatch for the ring/ring combination 2014-07-11 17:09:15 +03:00
Adam Wulkiewicz
2a6da93c85 [core][doc] Improve template parameter name and add the description. 2014-07-11 02:44:55 +02:00
Adam Wulkiewicz
03a1fbc91b [arithmetic][doc] Improve functions parameters types names and their description. 2014-07-11 02:41:54 +02:00
Adam Wulkiewicz
bd76327102 Merge pull request #84 from mkaravel/feature/distance
Feature/distance
2014-07-10 23:35:37 +02:00
Adam Wulkiewicz
fbe09296fb Merge pull request #86 from mkaravel/feature/length_perimeter_result
Feature/length perimeter result
2014-07-10 23:35:26 +02:00
Adam Wulkiewicz
b9fecf0887 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-07-10 16:41:50 +02:00
Adam Wulkiewicz
02cfd55510 [centroid][doc] Add description for centroid_exception member functions. 2014-07-10 16:40:45 +02:00
Menelaos Karavelas
b37ea9c8b4 [algorithms][comparable distance] implement variant support as in
all other algorithms
2014-07-10 11:30:47 +03:00
Menelaos Karavelas
9dff7bae4b [algorithms][distance] polish code (among other things, keep lines
up to 80 characters long)
2014-07-10 11:29:58 +03:00
Menelaos Karavelas
a3d1f1ce73 [strategies][comparable distance (result)] implement comparable distance
result variant support as in all other algorithms
2014-07-10 11:28:29 +03:00
Menelaos Karavelas
ac30cfc6f5 [strategies][distance (result)] eliminate default_comparable_strategy;
qualify variant by boost:: namespace;
2014-07-10 11:26:20 +03:00
Menelaos Karavelas
5640586f39 [algorithms][perimeter] replace result_of::length by default_length_result 2014-07-10 10:10:19 +03:00
Menelaos Karavelas
dacff470ee [algorithms][length] replace result_of::length by default_length_result 2014-07-10 10:09:46 +03:00
Menelaos Karavelas
927cbc9f01 [strategies][length (result)] eliminate result_of namespaces 2014-07-10 10:09:07 +03:00
Adam Wulkiewicz
2912e1b199 [strategies] Add more robust check in projected_point_ax_less 2014-07-09 17:30:38 +02:00
Menelaos Karavelas
e1093bc4a3 [strategies][distance (result)] add missing include 2014-07-09 15:02:33 +03:00
Adam Wulkiewicz
a6ed7d86ea Merge branch 'develop' into feature/projected_point 2014-07-09 13:59:23 +02:00
Adam Wulkiewicz
8c20242948 [strategies] Modify handling of 0-length segments in projected_point_ax.
For 0-length segments assume that the segment is perpendicular to the Pt->ProjPt vector.
In other words ATD = 0.
2014-07-09 13:37:29 +02:00
Adam Wulkiewicz
c55cee5dd3 [strategies] Fix projected_point_ax+douglass_peucker compilation errors.
Add again operator< for projected_point_ax_result needed to compare the distance with 0 (explicitly converted into the same type).
Remove template parameter from projected_point_ax_less::operator().
Add tests for simplify() and detail::simplify_insert().
2014-07-09 12:58:02 +02:00
Barend Gehrels
64f0380591 [buffer] move simplify call to separate function to apply using ax-strategy 2014-07-09 12:26:32 +02:00
Barend Gehrels
0315125492 [simplify] fix double, replaced by template parameter 2014-07-09 11:21:40 +02:00
Adam Wulkiewicz
e49434ec6c [strategies] Add less-comparator for projected_point_ax result in detail::douglas_peucker 2014-07-08 21:16:18 +02:00
Adam Wulkiewicz
282a2536a3 [strategies] Add douglas_peucker version taking LessCompare 2014-07-08 20:52:11 +02:00
Menelaos Karavelas
8820e7e266 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/distance 2014-07-08 12:44:32 +03:00
Menelaos Karavelas
f33e90b916 [strategies][comaprable distance] add default_comparable_strategy:
this is a placeholder for comparable distance strategies used for
resolving strategies during the resolve variant stages
2014-07-08 12:40:53 +03:00
Menelaos Karavelas
77e4f4b472 [strategies][comparable distance (result)] implement variant-aware
comparable distance result
2014-07-08 12:39:36 +03:00
Menelaos Karavelas
325dbe203b [strategies][distance (result)] polish code a bit;
eliminate result_of namespaces; replace result_of::distance by
distance_result; add support for comparable distances (i.e., add
specializations for default_comparable_strategy);
qualify occurences of variant with boost:: ;
fix bug: when resolving strategies, pass actual geometries instead
of their point types (important in order to return the actual/correct
strategy return type);
2014-07-08 12:34:56 +03:00
Menelaos Karavelas
6681aefa22 [algorithms][comparable distance] make comparable distance algorithm
variant-aware
2014-07-08 12:32:00 +03:00
Menelaos Karavelas
3d17b42a12 [algorithms][distance] eliminate result_of namespaces; replace
result_of::distance by distance_result;
2014-07-08 12:26:29 +03:00
Adam Wulkiewicz
f20303af2f [buffer][test] Fix bugs in get_left_turns and some in the robustness test 2014-07-08 02:57:29 +02:00
Adam Wulkiewicz
869cff7004 [is_simple][is_valid] Remove non-ASCII characters 2014-07-08 02:01:46 +02:00
Adam Wulkiewicz
78ac419c2a [extensions][gis] Replace assert with BOOST_ASSERT 2014-07-08 01:49:30 +02:00
Barend Gehrels
b6b49f5308 [buffer] fix check of buffer_flat_end for inside 2014-07-06 20:22:04 +02:00
Adam Wulkiewicz
0b677ae1aa [strategies] projected_point_ax strategy relocated to separate file 2014-07-05 19:57:41 +02:00
Adam Wulkiewicz
0170ebe9ca [strategies] Remove inconsistent (and for now not needed) operators in projected_point_ax_result 2014-07-04 19:04:04 +02:00
Adam Wulkiewicz
3855610e05 Add projected_point_ax cartesian distance strategy. 2014-07-04 17:14:15 +02:00
Barend Gehrels
da1323716a [buffer] Pass side strategy 2014-07-03 19:59:28 +02:00
Adam Wulkiewicz
4c2e23611e Merge pull request #87 from mkaravel/feature/is_simple
[algorithms][is_valid] declare debug_complement_graph as inline
2014-07-03 14:54:38 +02:00
Menelaos Karavelas
be9a9ea8f5 [algorithms][is_valid] declare debug_complement_graph as inline
(should fix clang-darwin-{asan,asan11,tot,tot11} errors in
develop regression matrix)
2014-07-03 13:03:17 +03:00
Menelaos Karavelas
4b013a12d3 [algorithms][perimeter] change perimeter return type to default_length_result<...>::type 2014-07-03 01:41:19 +03:00
Menelaos Karavelas
28806c9095 [algorithms][length] change length return type to default_length_result<...>::type 2014-07-03 01:40:08 +03:00
Menelaos Karavelas
244d11da3f [strategies][length] make the default length result variant aware 2014-07-03 01:39:36 +03:00
Menelaos Karavelas
2a16d6a554 [strategies][distance] replace variant.hpp include by variant_fwd.hpp 2014-07-03 01:12:10 +03:00
Menelaos Karavelas
730213814c [strategies][distance] simplify implementation of distance_result 2014-07-03 00:51:20 +03:00
Menelaos Karavelas
79b4dd94d4 [util][compress variant] fix a typo in the comments 2014-07-03 00:34:27 +03:00
Menelaos Karavelas
8f4de21822 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/distance 2014-07-02 23:44:23 +03:00
Menelaos Karavelas
55a7922e1a [algorithms][distance] polish includes; move code in resolve_strategy::result_of
and resolve_variant::result_of namespaces to strategies/distance_result.hpp;
change return type for the distance free function to distance_result<...>::type
or default_distance_result<...>::type (depending on whether a strategy is
passed or not, respectively)
2014-07-02 23:32:22 +03:00
Menelaos Karavelas
efd21367ab [algorithms][comparable distance] change the return type of
comparable_distance to comparable_distance_result<...>::type
2014-07-02 23:30:20 +03:00
Menelaos Karavelas
baf0be47da [strategies][comparable distance] re-implement default_comparable_distance_result
using comparable_distance_result
2014-07-02 23:29:04 +03:00
Menelaos Karavelas
8e22379623 [strategies][distance] re-implement default_distance_result using
distance_result
2014-07-02 23:28:34 +03:00
Menelaos Karavelas
f7cfb6a259 [strategies][comparable distance] implement the class
comparable_distance_result
2014-07-02 23:28:03 +03:00
Menelaos Karavelas
86c96deaaf [strategies][distance] implement the class distance_result 2014-07-02 23:26:56 +03:00
Barend Gehrels
7727ce921e Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-07-02 14:21:12 +02:00
Barend Gehrels
5a008767ae [buffer] restructure buffer_range such that tag is not necessary
and behaviour per geometry-type is done in the dispatch itself.
This also avoids generating side on perpendicular side for linestrings once
(the second one cannot easily be avoided in the current structure)
2014-07-02 14:20:02 +02:00
Barend Gehrels
c9880fbdff [buffer] use range instead of two points as output for buffer_side strategy 2014-07-02 13:04:16 +02:00
Barend Gehrels
c94d6d469d [buffer] use strategy buffer_side instead of generate_side 2014-07-02 12:45:57 +02:00
Barend Gehrels
f933be730d [buffer] move buffer_side to strategies 2014-07-02 12:33:04 +02:00
Barend Gehrels
01151cacf5 [buffer] copy inserter to buffer_side 2014-07-02 12:29:34 +02:00
Adam Wulkiewicz
6e673af06f Merge pull request #81 from mkaravel/feature/is_simple
Feature/is simple
2014-07-02 11:50:58 +02:00
Menelaos Karavelas
a87c68b62f [algorithms][is_valid] remove obsolete comment 2014-07-02 11:53:49 +03:00
Menelaos Karavelas
a1710c2bd3 [doc][algorithms] add documentation for the comparable_distance free
function that takes a strategy
2014-07-02 11:50:04 +03:00
Menelaos Karavelas
bda78a8153 [algorithms][is_valid] fix bug in initialization of DFS data for
detecting cycles
2014-07-02 02:30:24 +03:00
Adam Wulkiewicz
e9178b6a80 Merge pull request #75 from mkaravel/feature/is_simple
Feature/is simple
2014-07-01 17:27:01 +02:00
Menelaos Karavelas
fc14209d5f [algorithms][is_valid] replace TurnPoint const& by TurnPoint const*
in complement graph vertex
2014-07-01 17:50:25 +03:00
Menelaos Karavelas
104aafd05d [algorithms][is_valid] make the complement graph vertex id an unsigned
integer (to avoid conversion warnings)
2014-07-01 09:57:55 +03:00
Menelaos Karavelas
df3da8aa66 [algorithms][is_valid] re-design the complement graph: store neighbors
in the graph instead of at each vertex; store DFS data for detecting
cycles outside the vertices;
2014-07-01 00:05:02 +03:00
Barend Gehrels
bc2edc4eea Merge branch 'develop' into prepare 2014-06-30 21:08:59 +02:00
Barend Gehrels
9fc3b36d25 Merge pull request #77 from mkaravel/feature/doc-strategies
Feature/doc strategies
2014-06-30 21:04:44 +02:00
Barend Gehrels
000979883d Merge branch 'develop' into prepare 2014-06-30 20:55:45 +02:00
Barend Gehrels
a1bde8e927 Merge pull request #72 from mkaravel/fix/graham_andrew
[strategies][agnostic] fix bug in Graham-Andrew strategy:
2014-06-30 20:51:11 +02:00
Barend Gehrels
0b2cc3a1ae Merge branch 'develop' into prepare 2014-06-30 19:31:26 +02:00
Menelaos Karavelas
5e94f07ec0 [iterators][point_iterator] remove free functions points_front and points_back 2014-06-30 12:18:03 +03:00
Menelaos Karavelas
31361135dc [algorithms][is_valid] re-structure and polish code a bit;
check relative containment of rings only for rings that are not
associated with turns
2014-06-27 13:36:48 +03:00
Menelaos Karavelas
9930615207 [strategies][distance] update doxygen documentation for pythagoras
point-box and box-box strategies
2014-06-27 03:35:31 +03:00
Menelaos Karavelas
ac17fdcbdc [algorithms][is_simple,is_valid] add doxygen documentation for is_simple and is_valid 2014-06-27 02:38:21 +03:00
Menelaos Karavelas
7ec752d5ea [geometry] add is_simple and is_valid algorithms in geometry.hpp 2014-06-27 02:28:17 +03:00
Menelaos Karavelas
274c64c5d8 [algorithms][is_simple] add missing include 2014-06-27 02:27:28 +03:00
Menelaos Karavelas
f0f037df2b Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-26 22:52:43 +03:00
Barend Gehrels
7baf1a29e5 [buffer] We have to simplify the ring before to avoid very small-scaled
features in the original (convex/concave/convex) being enlarged
in a very large scale and causing issues (IP's within pieces).
This might be reconsidered later. Simplifying with a very small
distance will never be visible in the result,
if it is using round joins. For miter joins they are even more
sensitive to small scale input features, however the result will
look better.

A distance strategy can change behaviour (make larger - set simplify
distance to 0.0 to avoid simplification)

This fixes the parcel issue(s)
2014-06-25 13:32:42 +02:00
Menelaos Karavelas
15773cbf93 [algorithms][is_valid] fix some wrong usages of std::size_t (should
have been int)
2014-06-25 09:34:53 +03:00
Menelaos Karavelas
bcaf4a374a Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-25 01:54:15 +03:00
Barend Gehrels
7f3b509fb5 [buffer] use endcap strategy for spikes. Check jointype also (again)
for line-line intersection because it is based on buffered segments.
2014-06-24 22:48:04 +02:00
Menelaos Karavelas
9059f73d54 [algorithms][is_valid] remove USE_INTERRUPT_POLICY macro 2014-06-24 19:43:32 +03:00
Menelaos Karavelas
ec2417f701 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-24 14:08:06 +03:00
Menelaos Karavelas
e3d0b1e6e4 [algorithm][is_valid] Re-design complement graph implementation:
* complement graph is now templated by turn points rather than vertices
* vertices get the vertex_handle type from the graph now
* simplify DFS algorithm to use only parent vertex id instead of parent
  vertex (only the parent id is really needed)
The last change also solves incomplete type compilation errors on
darwin/linux clang++, when -stdlib=libc++ is set.
2014-06-24 12:29:04 +03:00
Menelaos Karavelas
5a316f6c7e [algorithms][is_valid] include is_valid for multi-polygons (coming
from a separate file now)
2014-06-24 12:19:42 +03:00
Menelaos Karavelas
69594408ad [algorithms][is_valid] move multi-polygon implementation to separate file 2014-06-24 12:19:04 +03:00
Menelaos Karavelas
59ffebd794 [algorithms][is_valid] re-structure polygon's is_valid algorithm (for
readability and possible usage by is_valid for multi-polygons);
move code to sepatate files (to be used for multi-polygons as well);
move multi-polygon implementation to separate file;
2014-06-24 12:17:28 +03:00
Menelaos Karavelas
e25fb28d71 [algorithms][is_valid] implement predicate class that determines
whether a polygon or multi-polygon turn is acceptable (code partially
moved from algorithms/detail/is_valid/polygon.hpp)
2014-06-24 12:15:38 +03:00
Menelaos Karavelas
b3932db092 [algorithms][is_valid] factor-out in a separate file self turns computation
code (used by polygons and multi-polygons)
2014-06-24 12:13:47 +03:00
Barend Gehrels
9b6aa189bd [buffer] changes in includes/defines 2014-06-23 22:40:03 +02:00
Barend Gehrels
aa307b5ad2 [buffer] add join_selector and use it before generating the join.
This moves responsibility of generation to the calling code, removes it
from the join strategies. It also enables using the end-strategy for the
spikes
2014-06-23 22:39:29 +02:00
Barend Gehrels
d8a4d12c8e Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-23 19:34:51 +02:00
Menelaos Karavelas
eb9fb19816 [algorithms][is_valid] remove commented variable names 2014-06-22 23:56:53 +03:00
Adam Wulkiewicz
edff6503c4 [is_valid] Prefix GEOMETRY_TEST_DEBUG macro with BOOST_ 2014-06-22 22:45:03 +02:00
Adam Wulkiewicz
3deeeecc25 [is_valid] Fix unused variable warnings. 2014-06-22 22:41:42 +02:00
Menelaos Karavelas
a58ee873dc [algorithms][is_valid] print multi-index as well 2014-06-22 23:22:03 +03:00
Menelaos Karavelas
e7e7f958fb Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple
Conflicts:
	include/boost/geometry/algorithms/detail/is_simple/debug_print_boundary_points.hpp
	include/boost/geometry/algorithms/detail/is_valid/polygon.hpp
2014-06-22 23:09:47 +03:00
Barend Gehrels
86a2adef88 [buffer] pass points instead of segments to line_line_intersection 2014-06-22 22:01:43 +02:00
Barend Gehrels
51121c1e35 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-22 21:07:36 +02:00
Barend Gehrels
4ac5267e69 [buffer] use robust policy to check equality 2014-06-22 21:06:50 +02:00
Barend Gehrels
a057d23a24 [buffer] use passed first 2014-06-22 20:49:26 +02:00
Barend Gehrels
80b0ae169c [buffer] pass robust policy through the buffer_inserter structs 2014-06-22 20:42:10 +02:00
Barend Gehrels
a6cfda7c41 [buffer] Refactor duplicate functionality into one function 2014-06-22 20:30:16 +02:00
Barend Gehrels
5c3f1f2006 [buffer] fix limit which was too low for LatLong coordinates. Also fix in test
for tolerance which was too high. Added unit test
2014-06-22 19:54:13 +02:00
Barend Gehrels
ddf4acf351 [buffer] skip the type-check for adjacent pieces and side-pieces,
because now sides around a concave vertex have a piece in between
2014-06-22 18:49:34 +02:00
Barend Gehrels
8e74d052ea [buffer] rename variables 2014-06-22 16:05:20 +02:00
Adam Wulkiewicz
92b236fda6 [range] Calculate the iterator distance in erase() only when necessary. 2014-06-22 15:42:51 +02:00
Adam Wulkiewicz
17f08e3ac4 Merge pull request #66 from mkaravel/feature/debug_macro
Feature/debug macro
2014-06-22 15:29:16 +02:00
Adam Wulkiewicz
19a8455f54 Merge pull request #71 from mkaravel/fix/unused_include
[algorithms][overlay] remove usused include
2014-06-22 15:27:50 +02:00
Adam Wulkiewicz
5da7133f9f Merge pull request #73 from awulkiew/feature/range
[range] Optimize range::erase() in C++11
2014-06-22 15:27:08 +02:00
Adam Wulkiewicz
ba0906369e [range] Add support for invalidating resize() and workarounds for MSVC and MinGW.
Using of the iterator returned by erase() caused assertion failures (false positive) on MSVC with iterator debugging enabled.
MSVC std::vector can't store non-movable objects if rvalue references are supported.
MinGW std::vector can't store pointers.
2014-06-22 15:17:49 +02:00
Barend Gehrels
3628e85a25 [buffer] fix non-intersecting sides around concave points
there was no segment in between generated, therefore if the side-segments
did not intersect (e.g. donut_diamond in polygon_buffer.cpp unit test),
there was no intersection at all. Now a helper piece is generated and it
will intersect.
2014-06-22 15:12:40 +02:00
Adam Wulkiewicz
81ea76fdb9 [range] Remove unneeded code and comments 2014-06-22 13:33:19 +02:00
Adam Wulkiewicz
cd2e17b102 [range] Optimize erase() in C++11 - use std::move() instead of std::copy() if possible. 2014-06-21 22:08:51 +02:00
Adam Wulkiewicz
a0a296877f [range] Fix the return type of range::erase() and add tests. 2014-06-21 18:18:25 +02:00
Barend Gehrels
4ae8804b1d [buffer] make constants const 2014-06-20 22:35:20 +02:00
Barend Gehrels
7df029b176 [buffer] make buffer (miter, round) around spike possible
including unit testcase. For miters, the limit is enlarged (after
visual inspection of spike_simplex_miter)
2014-06-20 22:34:40 +02:00
Menelaos Karavelas
5a71e83bd5 [algorithms][is_valid] remove all explicit usages of debug macro;
clean-up/polish debug-related code;
2014-06-20 13:41:00 +03:00
Menelaos Karavelas
36def7632c [algorithms][is_valid] move complement graph debug-related printing
code to separate function
2014-06-20 13:39:57 +03:00
Menelaos Karavelas
357a818cea [algorithms][is_valid] helper class for debugging the various phases
of the validity algorithms; currently implemented only for polygons;
2014-06-20 13:38:39 +03:00
Menelaos Karavelas
ab67385c68 [algorithms][is_valid] move debugging-related printing of turns in
is_valid/debug_print_turns.hpp
2014-06-20 13:37:28 +03:00
Menelaos Karavelas
1a0e2519da [algorithms][is_simple] update debugging-related includes 2014-06-20 13:36:48 +03:00
Menelaos Karavelas
100af837ec [algorithms][is_simple] rename debug_linear.hpp to debug_print_boundary_points.hpp;
remove code related to printing turns (to be put in another file);
2014-06-20 13:35:57 +03:00
Menelaos Karavelas
75f254efc3 [algorithms][overlay] remove usused include (which also creates a
dependence with <iostream>)
2014-06-20 12:32:19 +03:00
Menelaos Karavelas
2eea41b82e Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-20 12:30:18 +03:00
Menelaos Karavelas
c3d401164a [strategies][agnostic] fix bug in Graham-Andrew strategy:
last is used again after two calls to pop_back() which can invalidate
the reference;
patch: make last a true point rather than a reference
bug reported/patch suggested by David Zhao
2014-06-20 12:17:44 +03:00
Barend Gehrels
52c41b9d34 [overlay] reverted change of returning left seg_id < right seg_id
because it is already tested before as beging equal in these cases
2014-06-19 21:46:50 +02:00
Menelaos Karavelas
b58dfe57c8 [algorithms][turns] guard include with the BOOST_GEOMETRY_DEBUG_TURN
macro; polish code a bit
2014-06-19 22:15:26 +03:00
Adam Wulkiewicz
844616d8fa Merge pull request #64 from awulkiew/fix/erase
Replace the explicit call to Range::erase()
2014-06-19 20:46:27 +02:00
Adam Wulkiewicz
a9babd113f [overlay] Change the placement of const modifier (guidelines). 2014-06-19 20:45:56 +02:00
Barend Gehrels
24b503212e [buffer] In case of the same contents, compare just seg_ids
to have a reliable order
2014-06-19 19:11:22 +02:00
Barend Gehrels
3261c52976 [buffer] Avoid warnings 2014-06-19 19:10:49 +02:00
Barend Gehrels
c5de26945b [overlay] use uniform robust policy, this obsoletes zoom_to_robust 2014-06-19 19:10:28 +02:00
Menelaos Karavelas
faab25232f [algorithms][detail] make sure we are not going to get an unused
variable warning (on MSVC)
2014-06-19 17:07:37 +03:00
Menelaos Karavelas
46ae61138a [algorithms][detail] polish comment phrasing 2014-06-19 16:42:02 +03:00
Menelaos Karavelas
67397491fc [algorithms][is_valid] make the policy passed to self turns for polygons
a stateless policy
2014-06-19 16:36:07 +03:00
Menelaos Karavelas
4052cc85f9 [algorithms][is_simple] multi-linestring simplicity check:
pass an appropriate predicate based interrupt policy to self turns,
so that when an unacceptable turn is found, self turn stops and returns
2014-06-19 16:33:56 +03:00
Menelaos Karavelas
62dc84e14f [policies] rename predicate_based_interrupt_policy to
stateless_predicate_based_interrupt_policy; added a new version
of predicate_based_interrupt_policy that takes a predicate object
(possibly with state) at construction;
2014-06-19 16:31:37 +03:00
Menelaos Karavelas
d67bad5925 [algorithms][detail] add version that takes as argument a predicate object
(possibly with state)
2014-06-19 16:30:39 +03:00
Menelaos Karavelas
70d22970e2 [algorithms][is_valid] optimize call to self turns:
replace the no_interrupt_policy used in self turns by a custom
interrupt policy that stops when a non-acceptable turn is found
2014-06-19 14:56:30 +03:00
Menelaos Karavelas
50c3185417 [policies] add a predicate-based interrupt policy: the policy
is passed a predicate (that has a static apply method) and reports
that intersections exist if at least one of the turns in the checked
range is not acceptable according to the predicate
2014-06-19 14:53:24 +03:00
Menelaos Karavelas
59099bf721 [algorithms][detail,is_simple,is_valid] change the valud of the
AllowEmptyRange template parameter of check_iterator_range from
false to true
2014-06-19 14:03:49 +03:00
Menelaos Karavelas
1f56d9c04b [algorithms][is_simple] fix usage of BOOST_GEOMETRY_TEST_DEBUG macro 2014-06-19 12:29:21 +03:00
Menelaos Karavelas
92dfc0a4b5 [algorithms][overlay] remove occurences of macro GEOMETRY_TEST_DEBUG
that are not needed
2014-06-19 12:26:05 +03:00
Menelaos Karavelas
7689e17b09 [geometry] prefix macro GEOMETRY_TEST_DEBUG with BOOST_ 2014-06-19 12:24:53 +03:00
Adam Wulkiewicz
6a969b2b49 [overlay] Add missing copyright info. 2014-06-19 02:43:46 +02:00
Adam Wulkiewicz
43d0ef60f3 [range] Add erase() taking non-mutable iterators (in-line with C++11 std::vector) + tests. 2014-06-19 02:40:39 +02:00
Adam Wulkiewicz
a552a0de67 [overlay] Replace *begin(rng) with front(rng) 2014-06-19 01:11:53 +02:00
Adam Wulkiewicz
66c1acb9c5 Merge pull request #65 from mkaravel/feature/is_simple
[algorithms][is_valid] attempt to fix MSVC compilation errors
2014-06-19 01:01:48 +02:00
Menelaos Karavelas
0e18e8ec8c [algorithms][is_valid] attempt to fix MSVC compilation errors 2014-06-18 23:16:13 +03:00
Adam Wulkiewicz
9f7828b7ec [overlay][range] Replace the explicit call to Range::erase() with version using std::copy() and traits::resize<> 2014-06-18 19:42:44 +02:00
Barend Gehrels
ea222cd5b3 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-18 14:24:53 +02:00
Barend Gehrels
e4e948753b [turns] remove is_discarded() function 2014-06-18 14:24:42 +02:00
Barend Gehrels
4415da952b [buffer] For clusters (occuption), avoid using turns as starting point
This enables the "get_occupation" again, but skips the get_left_turns function
2014-06-18 14:18:43 +02:00
Barend Gehrels
fccd2c2b7f [buffer][fix] add required parameter for visit policy 2014-06-18 14:13:57 +02:00
Barend Gehrels
2ba27734e4 [buffer] remove unused segment-map 2014-06-18 14:05:53 +02:00
Barend Gehrels
bbfe279782 [buffer] disable enlarged-cluster approach
temporary disabled with a define - if everything OK it will go completely
2014-06-18 14:04:24 +02:00
Barend Gehrels
84d240ee9d [buffer][test] visit collection twice for mapping 2014-06-18 14:02:18 +02:00
Barend Gehrels
54c59c2665 [overlay] remove unused MSM approach
This drops the reported MSM dependancy
2014-06-18 14:01:11 +02:00
Menelaos Karavelas
52ab626f69 [algorithms][is_valid] in polygon validity algorithm, replace
the robustness policy used from no_rescale_policy to the
appropriate rescale_policy type
2014-06-18 14:27:13 +03:00
Menelaos Karavelas
dbbcf4c1ff [algorithms][is_simple] implement the new directory/file structure 2014-06-18 14:04:50 +03:00
Menelaos Karavelas
89c5113bce [algorithms][is_valid] implement the new directory/file structure 2014-06-18 14:00:05 +03:00
Menelaos Karavelas
092a8633e2 [algorithms][detail,is_valid] rename number_of_distinct_values to
num_distinct_consecutive_points and move it to namespace
boost::geometry::detail; also rename and move corresponding file
to boost/geometry/algorithms/detail;
2014-06-18 13:23:48 +03:00
Menelaos Karavelas
27ea2de6ab [algorithms][is_valid] rename N to MaximumNumber 2014-06-18 13:10:58 +03:00
Menelaos Karavelas
ec63be14e2 [algorithms][is_valid] in number_of_distinct_values, make size const 2014-06-18 13:06:10 +03:00
Menelaos Karavelas
c94ecdbb4d [algorithms][is_simple] add variant support 2014-06-18 12:54:09 +03:00
Menelaos Karavelas
b0a5adc503 [algorithms][is_valid] add variant support 2014-06-18 12:53:53 +03:00
Menelaos Karavelas
d92960154a [algorithms][is_valid] make implementation of number_of_distinct_points
more generic: number_of_distinct_values for ranges that also takes an
additional template parameter to indicate how many distinct values
to search for
2014-06-18 04:36:20 +03:00
Menelaos Karavelas
6cecfeea9f [algorithms][is_valid] move implementation of number_of_distinct_points
in separate file; re-design implementation of is_valid for linestrings;
2014-06-18 04:34:45 +03:00
Menelaos Karavelas
332eb42789 [algorithms][is_valid] remove trailing space 2014-06-18 03:47:02 +03:00
Adam Wulkiewicz
a9e4957800 [geometries] Added tests, also for Boost.Assign 2014-06-17 13:52:33 +02:00
Adam Wulkiewicz
81bcdc34ed [geometries] Define assignment operators taking initializer lists.
Add constructor taking initializer list for multi_point.
2014-06-16 23:54:16 +02:00
Barend Gehrels
8102c48d65 Merge branch 'develop' into prepare_1_56_june16
Conflicts:
	doc/doxy/doxygen_output/html/doxygen.css
	doc/doxy/doxygen_output/html/doxygen.png
	doc/doxy/doxygen_output/html/tabs.css
	doc/html/index.html
	doc/index/rtree/query.qbk
	doc/make_qbk.py
	doc/quickbook/quickref.xml
	doc/quickref.xml
	doc/release_notes.qbk
	doc/src/docutils/tools/doxygen_xml2qbk/configuration.hpp
	doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml2qbk.cpp
	example/07_b_graph_route_example.cpp
	example/c11_custom_cs_transform_example.cpp
	example/ml02_distance_strategy.cpp
	extensions/example/gis/io/shapelib/shapelib.cpp
	extensions/example/gis/latlong/distance_example.cpp
	extensions/example/gis/latlong/point_ll_example.cpp
	extensions/example/gis/projections/p03_projmap_example.cpp
	extensions/example/gis/projections/p04_example.cpp
	extensions/example/gis/projections/p05_example.cpp
	extensions/test/algorithms/Jamfile.v2
	extensions/test/algorithms/dissolve.cpp
	extensions/test/algorithms/offset.cpp
	extensions/test/gis/latlong/andoyer.cpp
	extensions/test/gis/latlong/cross_track.cpp
	extensions/test/gis/latlong/distance_mixed.cpp
	extensions/test/gis/latlong/vincenty.cpp
	extensions/test/gis/projections/projections.cpp
	extensions/test/nsphere/Jamfile.v2
	extensions/test/nsphere/nsphere-access.cpp
	extensions/test/nsphere/nsphere-area.cpp
	extensions/test/nsphere/nsphere-circle.cpp
	extensions/test/nsphere/nsphere-disjoint.cpp
	extensions/test/nsphere/nsphere-index_content.cpp
	extensions/test/nsphere/nsphere-index_margin.cpp
	extensions/test/nsphere/nsphere-multi_within.cpp
	extensions/test/nsphere/nsphere-nsphere_in_box.cpp
	extensions/test/nsphere/nsphere-point_in_nsphere.cpp
	extensions/test/nsphere/nsphere-point_type.cpp
	extensions/test/nsphere/nsphere-within.cpp
	include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp
	include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
	include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
	include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp
	include/boost/geometry/algorithms/detail/disjoint.hpp
	include/boost/geometry/algorithms/detail/multi_modify.hpp
	include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp
	include/boost/geometry/algorithms/detail/overlay/copy_segments.hpp
	include/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp
	include/boost/geometry/algorithms/detail/overlay/get_turns.hpp
	include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
	include/boost/geometry/algorithms/detail/overlay/traverse.hpp
	include/boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp
	include/boost/geometry/algorithms/detail/sections/sectionalize.hpp
	include/boost/geometry/algorithms/disjoint.hpp
	include/boost/geometry/algorithms/distance.hpp
	include/boost/geometry/algorithms/num_points.hpp
	include/boost/geometry/algorithms/simplify.hpp
	include/boost/geometry/extensions/algebra/algebra.hpp
	include/boost/geometry/extensions/algebra/algorithms/convert.hpp
	include/boost/geometry/extensions/algebra/algorithms/detail.hpp
	include/boost/geometry/extensions/algebra/algorithms/rotation.hpp
	include/boost/geometry/extensions/algorithms/connect.hpp
	include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp
	include/boost/geometry/extensions/algorithms/dissolve.hpp
	include/boost/geometry/extensions/algorithms/offset.hpp
	include/boost/geometry/extensions/algorithms/remove_holes_if.hpp
	include/boost/geometry/extensions/algorithms/remove_marked.hpp
	include/boost/geometry/extensions/algorithms/selected.hpp
	include/boost/geometry/extensions/contrib/ttmath_stub.hpp
	include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp
	include/boost/geometry/extensions/gis/geographic/strategies/distance_cross_track.hpp
	include/boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp
	include/boost/geometry/extensions/gis/io/shapelib/shp_create_object_multi.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_fwd.hpp
	include/boost/geometry/extensions/gis/projections/new_projection.hpp
	include/boost/geometry/extensions/gis/projections/projection_point_type.hpp
	include/boost/geometry/extensions/multi/algorithms/dissolve.hpp
	include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp
	include/boost/geometry/extensions/nsphere/algorithms/within.hpp
	include/boost/geometry/extensions/nsphere/core/radius.hpp
	include/boost/geometry/extensions/nsphere/core/tags.hpp
	include/boost/geometry/extensions/nsphere/index/detail/algorithms/bounds.hpp
	include/boost/geometry/extensions/nsphere/index/detail/algorithms/comparable_distance_near.hpp
	include/boost/geometry/extensions/nsphere/index/detail/algorithms/content.hpp
	include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.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
	include/boost/geometry/extensions/nsphere/views/center_view.hpp
	include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp
	include/boost/geometry/index/rtree.hpp
	include/boost/geometry/multi/algorithms/distance.hpp
	include/boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp
	include/boost/geometry/multi/geometries/concepts/multi_point_concept.hpp
	include/boost/geometry/multi/geometries/concepts/multi_polygon_concept.hpp
	include/boost/geometry/multi/io/wkt/read.hpp
	include/boost/geometry/strategies/agnostic/buffer_distance_asymmetric.hpp
	include/boost/geometry/strategies/agnostic/buffer_distance_symmetric.hpp
	include/boost/geometry/strategies/agnostic/buffer_end_skip.hpp
	include/boost/geometry/strategies/buffer.hpp
	include/boost/geometry/strategies/cartesian/buffer_end_flat.hpp
	include/boost/geometry/strategies/cartesian/buffer_end_round.hpp
	include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp
	include/boost/geometry/strategies/cartesian/buffer_join_round.hpp
	include/boost/geometry/strategies/cartesian/buffer_join_round_by_divide.hpp
	include/boost/geometry/strategies/cartesian/distance_projected_point.hpp
	include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp
	include/boost/geometry/strategies/concepts/distance_concept.hpp
	include/boost/geometry/strategies/default_distance_result.hpp
	include/boost/geometry/strategies/spherical/distance_cross_track.hpp
	include/boost/geometry/strategies/spherical/distance_haversine.hpp
	include/boost/geometry/util/math.hpp
	index/example/benchmark_experimental.cpp
	index/example/glut_vis.cpp
	index/example/serialize.cpp
	index/test/rtree/interprocess/Jamfile.v2
	index/test/rtree/test_rtree.hpp
	test/algorithms/Jamfile.v2
	test/algorithms/buffer/Jamfile.v2
	test/algorithms/buffer/multi_linestring_buffer.cpp
	test/algorithms/buffer/multi_point_buffer.cpp
	test/algorithms/buffer/multi_polygon_buffer.cpp
	test/algorithms/buffer/point_buffer.cpp
	test/algorithms/buffer/polygon_buffer.cpp
	test/algorithms/difference.cpp
	test/algorithms/intersection.cpp
	test/algorithms/intersects.cpp
	test/algorithms/overlay/overlay_cases.hpp
	test/algorithms/overlay/robustness/Jamfile.v2
	test/algorithms/test_intersection.hpp
	test/algorithms/test_simplify.hpp
	test/algorithms/test_union.hpp
	test/algorithms/union.cpp
	test/geometry_test_common.hpp
	test/multi/algorithms/Jamfile.v2
	test/multi/algorithms/multi_difference_spike.cpp
	test/multi/algorithms/multi_distance.cpp
2014-06-16 19:57:43 +02:00
Adam Wulkiewicz
9aaffa5f78 [geometries] Add support for std::initializer_list 2014-06-16 19:06:19 +02:00
Barend Gehrels
56d163fe1e [is_valid] fix unit test linkage problem with two/three_or_more 2014-06-16 19:04:05 +02:00
Menelaos Karavelas
b05dd041a6 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-16 14:30:58 +03:00
Adam Wulkiewicz
76b13c42bc [util][math] Add the conversion to double (C++11 approach) before passing the integral argument to std::sqrt() 2014-06-16 13:04:22 +02:00
Menelaos Karavelas
1f07f292ec [algorithms][is_valid] add include that is missing if GEOMETRY_TEST_DEBUG is defined 2014-06-16 13:45:38 +03:00
Menelaos Karavelas
2438af55b3 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-16 12:20:38 +03:00
Menelaos Karavelas
1163128748 [algorithms][is_valid] templatize is_valid dispatch class with
one more boolean template parameter to control the behavior with
respect to allowing duplicate points; modify algorithm for rings
polygons and multi-polygons to take the additional template parameter
that controls behavior with respect to duplicate points;
2014-06-16 12:12:20 +03:00
Adam Wulkiewicz
76917a4e70 [within][covered_by][test][doc] Support Point in Segment.
Add tests and update implementation status.
Add the test for intersects(Point, Segment).
2014-06-16 03:49:51 +02:00
Menelaos Karavelas
a4566ad92d [algorithms][is_simple] replace inclusion of detail/is_simple/pointlike.hpp
by inclusion of detail/is_simple/multipoint.hpp
2014-06-16 03:38:14 +03:00
Menelaos Karavelas
a4b42e8bbc [algorithms][is_valid] re-implement has_spikes to return false if
the range has one or two distinct points (instead of calling
BOOST_ASSERT)
2014-06-16 03:30:53 +03:00
Menelaos Karavelas
8200c0c0a7 [algorithms][is_valid] re-implement has_duplicates to return false,
instead of calling BOOST_ASSERT, for geometries with no points;
2014-06-16 03:27:55 +03:00
Menelaos Karavelas
7d6f54539b [algorithms][is_simple] fix bug for closed linestrings (they do not
have boundary points); re-implement is_simple for linear geometries
assuming they are valid;
2014-06-16 03:26:10 +03:00
Menelaos Karavelas
be66dfe3f8 [algorithms][is_simple] print boundary points instead of endpoints
of linear geometries
2014-06-16 03:24:54 +03:00
Menelaos Karavelas
987cf6ee1e [algorithms][is_simple] re-arrange code:
rename detail/is_simple/pointlike.hpp to detail/is_simple/multipoint.hpp;
move code for geometries that are always simple to detail/is_simple/always_simply.hpp;
for areal geometries (rings, polygons, multi-polygons) implement
simpliciality check by checking for duplicate points;
2014-06-16 02:44:37 +03:00
Menelaos Karavelas
c81046000e [algorithms][is_valid] avoid calling interior_rings(polygon) twice;
polish code;
2014-06-16 02:40:14 +03:00
Menelaos Karavelas
5914fb2958 [algorithms][is_valid] change order of includes 2014-06-16 01:56:08 +03:00
Menelaos Karavelas
789eb04ba0 [algorithms][is_valid] change default behavior for linear geometries
to allow spikes
2014-06-15 21:47:02 +03:00
Menelaos Karavelas
34f3e31e8e [algorithms][is_valid] fix bug occuring when linestring has two
distinct points and spikes are allowed
2014-06-15 21:46:08 +03:00
Adam Wulkiewicz
7e71bdfbbb Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-15 02:40:42 +02:00
Adam Wulkiewicz
b9ff3a7fc4 [index][strategies][test] Modify some of the header includes.
The purpose of this is to allow the compilation of the rtree without the need of including the geometry.hpp ond require only index/rtree.hpp or to make the order of includes irrelevant.
Furthermore, this is backward compatible.

Add missing variant include in the intersection tests.
Fix the unused typedefs in the pythagoras_point_box test.
2014-06-15 02:29:57 +02:00
Menelaos Karavelas
975fefef0b Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-15 00:05:12 +03:00
Menelaos Karavelas
e8ef531436 [algorithms][is_valid] add implementation for free space connectivity
graph of a polygon; this graph is used to test whether the interior
of a polygon is connected;

algorithmic modeling: given a polygon, define its free space connectivity
graph as follows:
* add a graph vertex for the exterior of the polygon
* add a graph vertex for every hole
* add a graph vertex for each point of contact between two polygon rings
* add a graph edge between every free space component (exterior or hole)
  and every point of contact on the boundary of this component
* determining whether the polygon has connected interior amounts to
  testing whether the graph is acyclic
2014-06-14 23:52:24 +03:00
Menelaos Karavelas
970016f9dc [algorithms][is_valid] add implementation for validity of polygons
(and partial implementation for validity of multi-polygons)
2014-06-14 23:51:45 +03:00
Menelaos Karavelas
29052c3d0b [algorithms][is_simple] polish order of includes 2014-06-14 23:20:27 +03:00
Menelaos Karavelas
122d4e6e3e [algorithms][is_valid] move code to proper files under detail/is_valid;
fix includes;
2014-06-14 22:36:40 +03:00
Adam Wulkiewicz
35b2f91ee4 [extensions][offset] Update #includes to include the moved buffer code 2014-06-14 17:34:10 +02:00
Menelaos Karavelas
28ed3e4e59 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-14 16:04:24 +03:00
Barend Gehrels
264e9676f0 [buffer] avoid unused variable warnings
and replace BOOST_TYPEOF by iterator_traits
2014-06-14 11:53:50 +02:00
Barend Gehrels
1e7a631379 [buffer] rename check_original to turn_in_input
comparable to point_in_geometry.
This removes multi_buffer_inserter
2014-06-14 11:39:49 +02:00
Barend Gehrels
9db3329fe5 [buffer] move (dispatch) code for multi to buffer_inserter itself
This also tags the cast to multi_tag
2014-06-14 11:38:39 +02:00
Barend Gehrels
4a388f855d Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-14 11:03:44 +02:00
Barend Gehrels
723435de6c [buffer] remove debug functionality
The lines which are warnings are now protected by BOOST_GEOMETRY_DEBUG_BUFFER_WARN
2014-06-14 11:03:23 +02:00
Barend Gehrels
e00e307f2f [buffer] remove unused functionality 2014-06-14 11:01:42 +02:00
Barend Gehrels
cee0903f2d [buffer] Remove buffer_piece_collection_with_mapper
this was a debugging tool. It is now replaced by a visiting policy (like
in partition), and implemented in the unit test itself
2014-06-14 10:57:59 +02:00
Menelaos Karavelas
c962616ff5 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/math-sqrt
Conflicts:
	include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp
2014-06-14 01:58:01 +03:00
Barend Gehrels
fdd983ce72 [buffer] Changes in (folder)locations of strategies, and
moved buffer_side_selector and piece_type used by strategies.
2014-06-13 21:30:53 +02:00
Barend Gehrels
c96d6394a9 [buffer] update include guards/copyright info 2014-06-13 20:45:34 +02:00
Barend Gehrels
31af14453a [buffer] Move from extensions to algorithms/detail 2014-06-13 20:26:33 +02:00
Adam Wulkiewicz
327819b687 [extensions][nsphere][test] Remove unused typedefs. Rename tests. 2014-06-13 18:06:07 +02:00
Adam Wulkiewicz
3edeaeb2af [algorithms][io][test] Fix some rather harmless conversions warnings and add /bigobj for some tests for VS. 2014-06-13 16:13:35 +02:00
Menelaos Karavelas
2adf68f94b [algorithms][is_simple] remove unused typedef 2014-06-13 15:54:46 +03:00
Menelaos Karavelas
c79a8da5a5 [algorithms][is_valid] add missing include 2014-06-13 15:40:11 +03:00
Menelaos Karavelas
c0a38f87ae [algorithms][is_valid, is_simple] make a template parameter
the run time parameter/argument that determines whether linear
geometries with spikes are allowed
2014-06-13 15:29:50 +03:00
Menelaos Karavelas
03dd7cad6a [aldotihms][is_valid, is_simple] move has_duplicates from is_simple
namespace to is_valid namespace; move has_duplicates.hpp from
detail/is_simple directory to detail/is_valid;
2014-06-13 15:16:05 +03:00
Menelaos Karavelas
97c14576d5 [algorithms][is_valid] finish implementation for rings:
add missing includes; check more conditions; poslish code;
2014-06-13 15:08:39 +03:00
Menelaos Karavelas
ecd3853193 [algorithms][is_valid] merge code from linestring.hpp and
multi_linestring.hpp into linear.hpp
2014-06-13 14:58:09 +03:00
Menelaos Karavelas
eeaf906ffe [algorithms][is_valid] merged code in linestring.hpp and
multi_linestring.hpp into linear.hpp
2014-06-13 14:56:09 +03:00
Menelaos Karavelas
dec48c51ee [algorithms][is_simple] for rings return the result of validity testing 2014-06-13 14:32:08 +03:00
Menelaos Karavelas
6d1770352e [algorithms][is_simple] make has_duplicates closure-aware;
rename is_simple_range to is_simple_linestring (it is used
for linestrings only);
2014-06-13 14:30:58 +03:00
Menelaos Karavelas
d89a073d19 [algorithms][is_simple] make has_duplicates closure-aware 2014-06-13 14:30:31 +03:00
Menelaos Karavelas
7246b5e0e7 [algorithms][is_valid] add missing include 2014-06-13 14:07:28 +03:00
Menelaos Karavelas
ac0bff45df [algorithms][is_valid] optimize detection of small number of distinct
point in linestrings; polish code; fix includes;
2014-06-13 14:04:44 +03:00
Menelaos Karavelas
4375dd04c3 [algorithms][is_valid] has_spikes: re-factor and polish implementation 2014-06-13 13:11:45 +03:00
Menelaos Karavelas
39e1fac547 [algorithms][is_simple] remove unused code and includes 2014-06-13 12:46:13 +03:00
Menelaos Karavelas
8b67536dc3 [algorithms][is_simple] remove include of multi/core/tags.hpp 2014-06-13 12:38:47 +03:00
Menelaos Karavelas
574a6b4154 [algorithms][is_valid] remove include of multi/core/tags.hpp 2014-06-13 12:35:08 +03:00
Menelaos Karavelas
2e01ce5173 [alhorithms][is_valid] rename detail/is_valid/multi_range.hpp file to
detail/is_valid/multi_linestring.hpp; in there: fix includes;
re-factor code;
2014-06-13 12:33:20 +03:00
Menelaos Karavelas
49acae2ed8 [algorithms][is_simple] add file with debug code for is_simple of
linear geometries
2014-06-13 12:27:48 +03:00
Menelaos Karavelas
0161c06b93 [algorithms][is_simple] main file: polish code; removed unused includes; 2014-06-13 12:26:01 +03:00
Menelaos Karavelas
9e84593d48 [algorithms][is_simple] code for linear geometries:
polish and re-factor code; remove usused code; fix includes;
move debug code to separate file; optimize has_same_endpoints check;
use bg::range functions;
2014-06-13 12:19:53 +03:00
Menelaos Karavelas
756a6f2e86 [algorithms][detail] add struct with static apply method for checking
whether a predicate is satisfied by all elements in an iterator range
2014-06-13 12:18:03 +03:00
Menelaos Karavelas
163357c315 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-13 11:43:45 +03:00
Barend Gehrels
5085c749b1 [has_self_intersections] bugfix (did not return true when exception found) and
added optional parameter for non-throwing behaviour.
Use this from test_buffer instead
2014-06-12 23:00:57 +02:00
Barend Gehrels
0ecc80a10a [buffer] disable get_occupation, remove commented left_turn handling 2014-06-12 22:43:09 +02:00
Barend Gehrels
5a345ae2d4 [buffer] performance improvement - only consider overlapping pieces 2014-06-12 22:41:41 +02:00
Barend Gehrels
bdd2cc1ac6 [buffer] revert replacement of covered_by with within 2014-06-12 22:41:11 +02:00
Barend Gehrels
7531e541b2 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-12 18:51:44 +02:00
Barend Gehrels
d06c25bc5f [buffer] Remove helper functions now not used/need anymore 2014-06-12 18:50:47 +02:00
Adam Wulkiewicz
e277cce32f Merge pull request #57 from awulkiew/fix/boost_polygon
Fix/boost polygon
2014-06-11 16:57:38 +02:00
Barend Gehrels
0f930efb21 [buffer] enhanced (a bit) check for within piece / original
and renamed classify functions / moved code
2014-06-11 15:55:09 +02:00
Barend Gehrels
da1a8da80b [buffer] use partition to check relation turn/piece 2014-06-11 15:53:31 +02:00
Barend Gehrels
fd4f0abb1d various minor things, remove redundant static, fix capitals, typo 2014-06-11 15:16:29 +02:00
Barend Gehrels
623f2896e0 [buffer] Update robust_envelope at inserting robust intersection point 2014-06-11 14:25:28 +02:00
Barend Gehrels
0287c1d3bb [partition] support heterogenous collections 2014-06-11 14:17:09 +02:00
Barend Gehrels
88db68b6f7 [buffer][get_piece_turns] comments/layout changes 2014-06-11 13:01:11 +02:00
Barend Gehrels
22a8870012 [buffer] remove specific assign for buffer and is_opposite
opposite information is not used anymore
2014-06-11 12:55:55 +02:00
Barend Gehrels
14f3d76505 [buffer] move calculate_turns to get_piece_turn visitor where it is used from
this also uses the standard assign-policy for get_turn_info
2014-06-11 12:55:21 +02:00
Barend Gehrels
36708948c9 [buffer] use partition algorithm to calculate turns in piece-offsets 2014-06-11 10:51:21 +02:00
Barend Gehrels
4c7b5d3fa4 [buffer] Add robust envelope per piece
to support partition
2014-06-11 10:38:41 +02:00
Barend Gehrels
f6c5f69495 [buffer] split rescaling piece rings / turns
to support coming use of partition for calculate turns
2014-06-11 10:15:36 +02:00
Adam Wulkiewicz
a2c00c1774 [comparable_distance] Remove unneeded header include 2014-06-10 16:32:32 +02:00
Menelaos Karavelas
82bb00ed40 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-10 10:07:39 +03:00
Menelaos Karavelas
ef1a257242 [util][math] fix return type for math::sqrt; fix implementation
for sqrt for non-fundamental types (use the using mechanism);
2014-06-10 09:18:28 +03:00
Adam Wulkiewicz
afd0656747 [for_each] Remove unused typedefs 2014-06-10 00:20:32 +02:00
Adam Wulkiewicz
400eec193b [adapted] Specialize resize<> trait for polygon_data required by Ring concept 2014-06-10 00:17:12 +02:00
Barend Gehrels
425e1f6bb1 [buffer] remove BOOST_AUTO_TPL dependancy 2014-06-09 18:50:40 +02:00
Barend Gehrels
21382dfa1d [buffer] update copyright 2014-06-09 18:39:40 +02:00
Barend Gehrels
4ac94c1230 [buffer] Removed unused function 2014-06-09 18:37:20 +02:00
Barend Gehrels
a0c78403e2 [buffer] Enable negative buffer for polygons (deflate)
Update testcases for linestring (including Aimes-list now working)
Fix test for distance (right.distance was only done for SVG)
2014-06-09 18:37:01 +02:00
Barend Gehrels
10f6753a82 [buffer] block cluster (in occupation map) if one is blocked
Also reverse iteration order avoiding get_left_turns called more than once per cluster
Also classify IP's on helper segments as within
2014-06-09 16:32:36 +02:00
Barend Gehrels
447fd7edd2 [buffer] get occupation vectors by rescaled offsetted points
This fixes the last case rt_p20

Check if the occupation vectors are short (length 1). This indicates a rounding issue.
If so, map again but use neighbouring cells.

Alas we have to do this, but still better than the former FP implementation.

Also, we map only points on offsetted borders now, and return if the map is empty,
to improve performance.
2014-06-09 15:07:47 +02:00
Barend Gehrels
cfbecc9935 [buffer] remove more unused functionality 2014-06-09 12:39:58 +02:00
Barend Gehrels
f822df3545 [buffer] remove uu processing which is redundant 2014-06-09 12:16:16 +02:00
Barend Gehrels
c836fab395 [buffer] remove more now unused functionality 2014-06-09 12:05:55 +02:00
Barend Gehrels
0e666541e7 [buffer] skip within check where not necessary 2014-06-09 11:52:39 +02:00
Barend Gehrels
17d027ec2d [buffer] remove now unused functionality 2014-06-09 11:51:01 +02:00
Barend Gehrels
4002e3d36a [buffer] update svg-mapping debug class 2014-06-09 11:16:10 +02:00
Barend Gehrels
432d62809d [buffer] remove old left-turn approach 2014-06-09 11:15:13 +02:00
Barend Gehrels
11c71d161a [occupation_info] add once instead of twice
preparing for new get_left_turns
2014-06-08 21:57:24 +02:00
Barend Gehrels
a746e7323d [buffer] Remove occupation_map, use std::map instead
turn_indices from occupation_map were not used anymore
2014-06-08 20:21:31 +02:00
Barend Gehrels
5a85076f4b [get_left_turns] reimplement using integer arithmetic
including unit test
2014-06-08 19:03:11 +02:00
Barend Gehrels
5e6d542d81 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-08 17:19:08 +02:00
Adam Wulkiewicz
928f1aad70 [algorithms/detail] Rename const_conformant<> to copy_const<> and implement it without MPL and TypeTraits 2014-06-08 16:31:20 +02:00
Adam Wulkiewicz
1e6f7164e1 [algorithms] Drop TypeOf dependency 2014-06-08 13:32:00 +02:00
Adam Wulkiewicz
e52a297c98 [io] Drop TypeOf dependency. Add detail::interior_ring_iterator<>. 2014-06-08 13:05:44 +02:00
Barend Gehrels
79cbf6f18c [buffer] Occupation map now makes use of robust points
(this adds one failing testcase, to be investigated,
 but further simplifies/enhances all code)
2014-06-08 12:46:41 +02:00
Barend Gehrels
aec2b7801e [buffer] Cleanup comments/unused functionality 2014-06-08 10:58:47 +02:00
Adam Wulkiewicz
4626d53ead [algorithms/detail] Add interior_iterator<> tool and use it in places where BOOST_AUTO_TPL was used to get rid of unreadable, long types 2014-06-08 02:23:59 +02:00
Adam Wulkiewicz
18746a4293 [within] Remove not needed TypeOf header 2014-06-08 01:13:26 +02:00
Adam Wulkiewicz
3b9d4eba02 [point_in_geometry] Fix compilation error - replace BOOST_AUTO_TPL - drop TypeOf dependency 2014-06-08 00:27:35 +02:00
Adam Wulkiewicz
86c91f4b53 [algorithms][multi] Move the code of some algorithms from multi/ dir and drop TypeOf dependency.
Modified algorithms: area, centroid, clear, convert, length, perimeter, simplify.
Update included headers paths to reflect the changes.
2014-06-08 00:03:14 +02:00
Adam Wulkiewicz
52ece6c0e4 [algorithms] Move the code of some algorithms from multi/ and drop TypeOf dependency.
Algorithms moved: correct, envelope, equals, length, num_geometries, perimeter, remove_spikes.
2014-06-07 22:48:20 +02:00
Adam Wulkiewicz
68e7bacb7e [reverse] Move the code from multi/ and drop TypeOf dependency 2014-06-07 18:16:06 +02:00
Adam Wulkiewicz
2460f51614 [transform] Move the code from multi/ and drop TypeOf dependency 2014-06-07 18:01:23 +02:00
Adam Wulkiewicz
c2d00d8619 [unique] Move from multi/ and drop TypeOf dependency 2014-06-07 17:43:07 +02:00
Adam Wulkiewicz
f0b119141a [for_each] Move from multi/ and drop TypeOf dependency 2014-06-07 16:54:37 +02:00
Barend Gehrels
9c30fd698a Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-06-07 12:39:48 +02:00
Barend Gehrels
8a417e6fa9 [buffer] Classify turn-points using rescaled rings
This makes side_on_convex_range and intersection_side redundant
It fixes all but one (p20) remaining cases for polygons
2014-06-07 12:38:02 +02:00
Menelaos Karavelas
73bcb4a54e Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-06 01:48:13 +03:00
Menelaos Karavelas
8d542abeeb Merge branch 'feature/math-sqrt' of github.com:mkaravel/geometry into feature/math-sqrt 2014-06-06 01:47:35 +03:00
Menelaos Karavelas
4f32a51cfa Merge branch 'develop' of https://github.com/boostorg/geometry into feature/math-sqrt 2014-06-06 01:47:07 +03:00
Adam Wulkiewicz
f6ba62a43a [comparable_distance][test][extensions] Break comparable_distance into interface and implementation.
Also remove geometry.hpp header include from comparable_distance test and nsphere header included in all tests.
2014-06-06 00:29:31 +02:00
Adam Wulkiewicz
7cdbcf5fee [extensions/nsphere] Enable commented-out tests and change point_in_nsphere strategy WRT areal_tag removal workaround 2014-06-05 19:25:45 +02:00
Adam Wulkiewicz
55a8ad35f8 [extensions] Fix NSphere compilation issues.
The fixes are rather temporary workarounds (see comments in the code).
2014-06-05 19:06:06 +02:00
Adam Wulkiewicz
51fc37e43b [extensions][offset] Fix compilation errors 2014-06-05 18:03:14 +02:00
Menelaos Karavelas
aa5a37277a [util][math] fix return type of sqrt for fundamental number types 2014-06-05 18:04:51 +03:00
Adam Wulkiewicz
46b46ee080 Merge pull request #55 from awulkiew/refactor_multi
Moving geometry/multi/ into geometry/
2014-06-05 16:16:08 +02:00
Adam Wulkiewicz
d8baba40bd [multi] Remove multi-geometries concepts from multi/multi.hpp since they are included in geometries/concepts/check.hpp 2014-06-05 15:24:01 +02:00
Adam Wulkiewicz
5903c5a292 [extensions] Replace includes of headers moved from multi/ directory. 2014-06-04 19:39:26 +02:00
Adam Wulkiewicz
2a86cf0c20 [geometry] Replace includes of headers from algorithms/detail moved from multi/ directory. 2014-06-04 18:43:42 +02:00
Adam Wulkiewicz
1d4a73cc89 [algorithms/detail] Fix for_each_range backward compatibility.
In the specialization for Box remove_const before creating box_view<> and passing the object of this type into the Actor::apply().
2014-06-04 18:15:05 +02:00
Adam Wulkiewicz
3f872f1621 [algorithms/detail] Refactor for_each_range and move it from multi/directory. 2014-06-04 17:10:17 +02:00
Adam Wulkiewicz
2c7da5eb1f [multi] Move algorithms details used only by multi/algorithm from multi/ directory. 2014-06-04 16:06:21 +02:00
Barend Gehrels
89b2fb4d6a [buffer] use intersection_side for checking side on convex range
This fixes many of the issues (in multi_polygon_buffer). However, some
new cases now fail because of this and should be fixed later
2014-06-04 15:58:53 +02:00
Adam Wulkiewicz
55e684c64c [multi][algorithm/detail] Move most of the code of details from multi/ directory.
This commit doesn't move for_each_range.
Details used only by multi/algorithms aren't moved as well.
2014-06-04 15:53:46 +02:00
Adam Wulkiewicz
320f796b9d [geometry] Replace headers of parts moved from multi/ directory. 2014-06-04 14:52:28 +02:00
Menelaos Karavelas
e81c0b9e23 [extensions][algorithms][offset] remove obsolete include (file no
longer exists)
2014-06-04 14:32:48 +03:00
Barend Gehrels
77969d4194 [buffer] merged implementations of side_on_convex_range 2014-06-04 13:30:45 +02:00
Menelaos Karavelas
86991b358d [extensions] replace calls to ::sqrt by calls to bg::math::sqrt;
change has not been applied to projections and ttmath;
2014-06-04 14:27:47 +03:00
Barend Gehrels
1a2a2f4de1 [buffer] remove RobustPolicy from side_on_convex_range
because side of a point w.r.t. a segment cannot be done with rescaling,
due to rounding the point can be located on the other side of the segment
This adds 4 more failing testcases, but it has to be done first because
the solution is not reliable
2014-06-04 13:26:26 +02:00
Adam Wulkiewicz
0bec8e26c3 [multi] Include headers of moved parts from geometry/ directory. 2014-06-04 13:24:29 +02:00
Menelaos Karavelas
d125c79586 [algorithms][equals] fix copyright years; replace call to ::sqrt
by call to bg::math::sqrt
2014-06-04 14:16:41 +03:00
Menelaos Karavelas
3453d2ec5c [strategies] fix unused typedef warningy 2014-06-04 14:13:41 +03:00
Menelaos Karavelas
48bb75137d [strategies] replace calls to ::sqrt by calls to bg::math::sqrt 2014-06-04 14:13:11 +03:00
Menelaos Karavelas
058ea9624f [util][math] update copyright header 2014-06-04 12:56:46 +03:00
Menelaos Karavelas
b8f0c9de94 [util][math] add sqrt function in bg::math namespace; this function
calls std::sqrt for fundamental number types and ::sqrt for everything
else; it helps avoiding implicit conversions for fundamental number
types when ::sqrt is called (in particular, we avoid the conversion
from long double to double when ::sqrt is called);
2014-06-04 12:53:59 +03:00
Menelaos Karavelas
ed956a4eaf Merge branch 'feature/is_simple' of github.com:mkaravel/geometry into feature/is_simple 2014-06-04 12:10:38 +03:00
Adam Wulkiewicz
b0a1704779 [multi][io] Move wkt and dsv implementation for Multi Geometries from multi/ directory 2014-06-04 03:25:07 +02:00
Adam Wulkiewicz
f63fabcbb7 [multi][geometries] Move models, concepts and register macros from multi/ directory 2014-06-04 02:20:23 +02:00
Adam Wulkiewicz
82a2b50b0c [multi][strategies] Move centroid_average from multi/ directory 2014-06-03 22:17:56 +02:00
Adam Wulkiewicz
676090691f [multi][views] Move range_type<> from multi/ directory.
Also tweak the parameters of the dispatched implementation - reverse the order and add default Tag.
2014-06-03 21:54:01 +02:00
Adam Wulkiewicz
da20d7c409 [multi][core] Move functionalities of multi/core into core 2014-06-03 21:21:03 +02:00
Adam Wulkiewicz
948208a485 [strategies] Fix unused typedefs warnings. 2014-06-03 12:55:49 +02:00
Menelaos Karavelas
7e0652ef69 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-06-03 08:54:02 +03:00
Barend Gehrels
dfd38081bc [extensions][distance] fix default_strategy extra tag 2014-06-02 23:04:29 +02:00
Barend Gehrels
d10a487bec Merge pull request #51 from mkaravel/feature/distance-default-strategy
Feature/distance default strategy
2014-06-02 22:40:09 +02:00
Adam Wulkiewicz
b48748a3d3 [remove_spikes] Fix unused typedef warning 2014-05-30 15:20:36 +02:00
Adam Wulkiewicz
cbb408b7d5 [transform] Fix unused typedef warnings 2014-05-30 15:19:12 +02:00
Adam Wulkiewicz
9f814ae1ba [simplify] Fix unused typedef warning 2014-05-30 15:17:46 +02:00
Adam Wulkiewicz
c9b975f556 [overlay] Fix unused typedef warning 2014-05-30 14:29:11 +02:00
Adam Wulkiewicz
8d4a61d496 [index/rtree] Fix unused typedef warnings 2014-05-30 14:26:44 +02:00
Adam Wulkiewicz
01a34d6b71 [index/varray] Fix unused typedef warnings 2014-05-30 14:23:47 +02:00
Adam Wulkiewicz
cda70f4326 [touches] Fix unused typedef warning 2014-05-30 14:21:19 +02:00
Adam Wulkiewicz
f614512cfa [reverse] Fix unused typedef warning 2014-05-30 14:19:16 +02:00
Adam Wulkiewicz
81e0d3fac4 [overlay] Fix unused typedef warnings 2014-05-30 14:16:17 +02:00
Menelaos Karavelas
b970646722 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-05-30 15:12:51 +03:00
Adam Wulkiewicz
694fbffdeb [relate] Fix unused typedef warnings 2014-05-30 14:12:14 +02:00
Menelaos Karavelas
779e05c292 [strategies][distance] fix names of template parameters to better
reflect the corresponding objects
2014-05-30 15:09:20 +03:00
Menelaos Karavelas
4d16a2112a Merge branch 'develop' of https://github.com/boostorg/geometry into feature/distance-default-strategy 2014-05-30 15:06:52 +03:00
Adam Wulkiewicz
a40a86b532 [intersects] Fix unused typedef warning 2014-05-30 14:04:42 +02:00
Adam Wulkiewicz
2265430625 [disjoint] Fix unused typedef warnings 2014-05-30 13:55:51 +02:00
Adam Wulkiewicz
9881f4f56d [get_turns] Fix unused typedef warnings 2014-05-30 13:53:57 +02:00
Adam Wulkiewicz
b670b37643 [sectionalize] Fix unused typedef warnings 2014-05-30 13:52:43 +02:00
Adam Wulkiewicz
d8e46d3f85 [within] Use normalized_view in point_in_geometry and fix unused typedef warning 2014-05-30 13:45:18 +02:00
Adam Wulkiewicz
471fabab88 Merge pull request #52 from mkaravel/feature/distance
[strategies][distance] change template parameters' names to reflect the objects they represent
2014-05-30 12:57:44 +02:00
Sam Spilsbury
be3ee10849 [geometry][test] Fix concept check failures.
The functions in arithmetic.hpp would check the concepts Point and ConstPoint
on Point2, instead of checking Point on Point1 and ConstPoint on Point2.

This would cause concept check failures when attempting to operate from
a ConstPoint.
2014-05-30 00:04:20 +08:00
Menelaos Karavelas
f3f131db35 [strategies][distance] change template parameters' names to reflect
the objects they represent
2014-05-29 15:05:56 +03:00
Menelaos Karavelas
e15cbf41a4 [strategies] make default_strategy class commutative with respect
to the order of the geometry tags
2014-05-29 14:53:51 +03:00
Menelaos Karavelas
63dea88967 [disjoint] remove unecessary include 2014-05-28 17:30:59 +03:00
Menelaos Karavelas
4a59061e0e [disjoint] avoid BOOST_AUTO_TPL 2014-05-28 17:23:57 +03:00
Barend Gehrels
3333ee09b1 Merge pull request #47 from mkaravel/feature/distance-default-strategy
Feature/distance default strategy
2014-05-28 15:30:45 +02:00
Barend Gehrels
d799a9a6b5 Merge pull request #44 from mkaravel/feature/distance
Feature/distance
2014-05-28 15:28:59 +02:00
Menelaos Karavelas
68e0584f26 [strategies][distance] update copyright header and default_strategy
struct inline doc
2014-05-28 16:07:28 +03:00
Menelaos Karavelas
bb20a1c1c7 [distance] fix order of template parameters for default strategy:
the two geometry tags should be the first two template parameters
2014-05-28 16:07:20 +03:00
Barend Gehrels
76d94f4f24 [minimum_ring_size] changed to size_t
(change was proposed by Menelaos #45 which is not merged in the end)
2014-05-28 13:57:37 +02:00
Menelaos Karavelas
3b4e63b2b7 [distance][segment-box] alternative implementation that does not use forward declarations 2014-05-28 14:25:25 +03:00
Barend Gehrels
398d7d7981 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-05-28 12:57:56 +02:00
Barend Gehrels
4453f7bd6d [rescale] fix unit test and avoid BOOST_AUTO_TPL
Unit test is reworked. BOOST_AUTO_TPL is avoided using two specific methods
2014-05-28 12:57:35 +02:00
Barend Gehrels
a1882009e7 [simplify] fix Minimum case and avoid BOOST_AUTO_TPL
BOOST_AUTO_TPL is avoided by providing specific loop on iterator types
The change also avoids some typedefs and variables
2014-05-28 12:53:42 +02:00
Menelaos Karavelas
8d7c448315 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-05-28 11:09:59 +03:00
Menelaos Karavelas
be6ea95a9c [disjoint] fix bug in segment-box disjointness check (algorithm
is not always working properly when segment degenerates to a point,
or when segment was parallel to the y-axis)
2014-05-28 03:35:34 +03:00
Menelaos Karavelas
25661874a2 [disjoint] fix compilation error on darwin gcc 4.2.1 2014-05-28 03:32:55 +03:00
Menelaos Karavelas
b77e545b8f [distance] fix compilation errors with darwin gcc 4.2.1 and msvc-12.0 2014-05-28 03:13:33 +03:00
Menelaos Karavelas
b5c16d7371 [extensions][dissolve] remove empty comment line 2014-05-26 22:59:06 +03:00
Menelaos Karavelas
4e6abef7d4 [extensions][dissolve] remove unnecessary include 2014-05-26 22:54:57 +03:00
Menelaos Karavelas
70a431f7ef [distance] remove inner template parameter that shadows global
template parameter; qualify template method call with template keyword;
fix return type of variant visitors;
2014-05-26 14:05:12 +03:00
brunolalande
5697607195 Merge pull request #40 from sdebionne/variant/intersection
[intersection] Add variant support
2014-05-23 23:32:48 +01:00
brunolalande
34f7fb1d19 Merge pull request #37 from sdebionne/variant/assign
[assign] Add variant support
2014-05-23 23:30:55 +01:00
brunolalande
ba53f02d54 Merge pull request #38 from sdebionne/variant/crosses
[crosses] Add variant support
2014-05-23 23:29:32 +01:00
Adam Wulkiewicz
4f69224c35 Merge pull request #35 from mkaravel/feature/disjoint
Feature/disjoint
2014-05-24 00:09:07 +02:00
Adam Wulkiewicz
985596fe97 Merge pull request #36 from mkaravel/feature/distance
Feature/distance
2014-05-24 00:08:43 +02:00
brunolalande
d563f3706d Merge pull request #39 from sdebionne/variant/expand
[expand] Add variant support
2014-05-23 23:03:55 +01:00
Menelaos Karavelas
4c1bf7b28f Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-23 20:47:39 +03:00
Menelaos Karavelas
939517e198 [disjoint] remove obsolete file algorithms/detail/disjoint.hpp 2014-05-23 20:47:06 +03:00
Menelaos Karavelas
0d6b757832 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/distance 2014-05-23 18:22:11 +03:00
brunolalande
8f2a516cc6 Merge pull request #26 from sdebionne/develop
[distance] Add variant support
2014-05-23 16:13:59 +01:00
Samuel Debione
c9edff5e31 [distance] Remove global is_implemented 2014-05-23 17:00:03 +02:00
Samuel Debione
6f2848819f [intersection] Removes duplicate concept check 2014-05-23 16:36:42 +02:00
Samuel Debione
0cb4494e20 [crosses] Remove duplicate concept check 2014-05-23 16:35:24 +02:00
Samuel Debione
97508183e1 [assign] Move concept check 2014-05-23 16:34:17 +02:00
Samuel Debione
74d36cd5b3 [expand] Move concept check 2014-05-23 16:32:53 +02:00
Samuel Debione
b8a581f3ad Revert "[expand] Adds support for variant box"
This reverts commit 52ce484c7f.
2014-05-23 16:26:54 +02:00
Samuel Debione
52ce484c7f [expand] Adds support for variant box 2014-05-23 15:02:46 +02:00
Adam Wulkiewicz
5cc480d2c2 [index] Remove unneeded template keyword from member function call 2014-05-23 14:18:47 +02:00
Samuel Debione
79cd3df923 [distance] Support different variant type
Add support for different variant type as parameters
2014-05-23 14:09:23 +02:00
Menelaos Karavelas
21b7851381 [disjoint][segment-box] factor-out common code in disjoint_segment_box_impl 2014-05-23 14:12:01 +03:00
Samuel Debione
158433af6f [intersection] Add test for variant 2014-05-23 12:35:52 +02:00
Menelaos Karavelas
04bf50afc1 [distance][segment-box] eliminate unused variable (pp_strategy) in method call;
initialize result with 0;
2014-05-23 12:52:05 +03:00
Menelaos Karavelas
1b327f6910 [distance][segment-box] qualify all calls to get<I> with the geometry namespace 2014-05-23 12:41:51 +03:00
Samuel Debione
8f2addce33 [expand] Add tests for variant 2014-05-23 10:55:06 +02:00
Samuel Debione
4b32473630 [crosses] Add tests for variants 2014-05-23 10:37:49 +02:00
Samuel Debione
55e54692b9 [assign] Rename the variant template parameters
Was T1 and T2 but that could eventually be a problem if the user defines
BOOST_VARIANT_LIMIT_TYPES > 10.
2014-05-23 10:24:13 +02:00
Samuel Debione
999fdff2eb [assign] Add copyright notice 2014-05-23 10:12:39 +02:00
Menelaos Karavelas
c4af782c0c [distance] eliminate more useless code in segment-box computation 2014-05-23 00:35:44 +03:00
Menelaos Karavelas
a6acea282c [distance] re-factor segment-box code 2014-05-23 00:23:49 +03:00
Adam Wulkiewicz
3474244d0a [index] Varian-based nodes used in the rtree by default.
This should fix the crash when the rtree is used in the shared memory reported in this thread: http://boost-geometry.203548.n3.nabble.com/rtree-crash-when-used-with-inter-process-td4026037.html
2014-05-22 17:24:31 +02:00
Samuel Debione
594add5e1b [assign] Add tests for variants 2014-05-22 16:32:47 +02:00
Samuel Debione
82abc509df Merge remote-tracking branch 'boostorg/geometry/develop' into develop 2014-05-22 12:15:04 +02:00
Samuel Debione
04693e50c0 Merge remote-tracking branch 'boostorg/geometry/develop' into variant/intersection 2014-05-22 12:10:45 +02:00
Samuel Debione
421abd19c6 Merge remote-tracking branch 'boostorg/geometry/develop' into variant/expand 2014-05-22 12:10:14 +02:00
Samuel Debione
38c373b909 Merge remote-tracking branch 'boostorg/geometry/develop' into variant/crosses 2014-05-22 12:10:02 +02:00
Samuel Debione
a417fa3623 Merge remote-tracking branch 'boostorg/geometry/develop' into variant/assign 2014-05-22 12:09:23 +02:00
Samuel Debionne
c5b3acb70c [expand] Add variant support 2014-05-21 21:02:53 +02:00
Samuel Debionne
ddc649a492 [assign] Fix compiler errors 2014-05-21 20:02:30 +02:00
Samuel Debionne
2031415390 [crosses] Fix compile errors 2014-05-21 19:47:48 +02:00
Samuel Debionne
d968f26bae [intersection] Add variant support 2014-05-21 19:36:44 +02:00
Menelaos Karavelas
0df67aa716 [disjoint] add missing include of basic dispatch 2014-05-21 17:33:33 +03:00
Menelaos Karavelas
8e03f95ec8 [multi][get turns] remove unused include 2014-05-21 17:26:27 +03:00
Menelaos Karavelas
57921a7e89 [disjoint] clean-up code in detail/disjoint/interface.hpp;
create and add proper includes in detail/disjoint/implementation.hpp;
re-create algorithms/disjoint.hpp and add the above two includes;
2014-05-21 17:18:38 +03:00
Menelaos Karavelas
b6522c4e74 [disjoint] move main file to detail/disjoint/interface.hpp 2014-05-21 17:14:56 +03:00
Menelaos Karavelas
e3512fc622 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-21 17:09:56 +03:00
Menelaos Karavelas
90ac851e4e [disjoint] add missing includes 2014-05-21 17:06:36 +03:00
Menelaos Karavelas
c29c4cd246 [strategies] replace inclusion of algorithms/detail/disjoint/point_point.hpp by algorithms/detail/equals/point_point.hpp 2014-05-21 16:56:57 +03:00
Menelaos Karavelas
050bedec65 [relate] replace inclusion of algorithms/detail/disjoint/point_point.hpp by algorithms/detail/equals/point_point.hpp 2014-05-21 16:55:02 +03:00
Menelaos Karavelas
1035533676 [within] replace inclusion of algorithms/detail/disjoint/point_point.hpp by algorithms/detail/equals/point_point.hpp 2014-05-21 16:53:39 +03:00
Menelaos Karavelas
c2cf7215f0 [overlay] replace include of algorithms/detail/disjoint.hpp by algorithms/detail/disjoint/box_box.hpp 2014-05-21 16:51:55 +03:00
Menelaos Karavelas
531127252c [overlay] replace inclusion of algorithms/detail/disjoint.hpp by algorithms/detail/equals/point_point.hpp 2014-05-21 16:49:09 +03:00
Menelaos Karavelas
957addb5e2 [set ops P/P] replace inclusion of algorithms/detail/disjoint.hpp by algorithms/detail/equals/point_point.hpp 2014-05-21 16:47:45 +03:00
Menelaos Karavelas
a7323f79f4 [point on border] replace inclusion of algorithms/detail/disjoint.hpp by algorithms/detail/equals/point_point.hpp 2014-05-21 16:44:43 +03:00
Menelaos Karavelas
1d3432f83c [has self intersections] include header with disjoint interrupt policy 2014-05-21 16:43:32 +03:00
Menelaos Karavelas
0d4eccd510 [buffer] remove inclusion of algorithms/detail/disjoint.hpp 2014-05-21 16:42:42 +03:00
Menelaos Karavelas
4eca302164 [extensions][ttmath] add unary operator-() for ttmath_big (needed for
boost::geometry::math::abs) and also add binary operator-() (needed
because of the unary overlaod)
2014-05-21 16:37:53 +03:00
Menelaos Karavelas
f8c0b46d43 [disjoint] move code from multi/algorithms/disjoint.hpp to files
in algorithms/disjoint/detail; move code from algorithms/distance.hpp
also to algorithms/disjoint/detail and in algorithms/dispatch/disjoint.hpp
2014-05-21 16:35:40 +03:00
Menelaos Karavelas
7f1bb277ab [disjoint] add files in algorithms/detail/disjoint with existing code
and new code (for new geometry combinations); clean-up/simplify
dispatch using tag_cast and clean-up dispatch specializations;
2014-05-21 16:33:17 +03:00
Menelaos Karavelas
cf517dcb2e [disjoint] add dispatch and fix copyright headers 2014-05-21 16:12:02 +03:00
Menelaos Karavelas
b39c46575c [disjoint] add dispatch specialization for point-point and point-box;
move equals::point_point code to proper place;
2014-05-21 15:45:35 +03:00
Menelaos Karavelas
ce750e15ae [disjoint] move disjoint_interrupt_policy from algorithms/detail/disjoint.hpp
to a separate file under policies
2014-05-21 15:37:51 +03:00
Menelaos Karavelas
5afdb4acbb [disjoint] add error message in algorithms/detail/disjoint.hpp to check
whether this file is included somewhere or not; this file will go away
2014-05-21 15:36:22 +03:00
Menelaos Karavelas
d71975878f [disjoint/equals] move equals::point_point from algorithms/detail/disjoint/point_point.hpp
to algorithms/detail/equals/point_point.hpp
2014-05-21 15:34:05 +03:00
Menelaos Karavelas
001fa94c76 [disjoint] move basic disjoint dispatch in algorithms/dispatch/disjoint.hpp; use tag_cast to simplify dispatching 2014-05-21 14:58:53 +03:00
Barend Gehrels
30a4bc3990 [buffer] rename m_rescale_policy to m_robust_policy 2014-05-21 12:39:14 +02:00
Barend Gehrels
089a9841c6 [rescale] fix for points / empty boxes 2014-05-21 12:33:11 +02:00
Barend Gehrels
6d6c472d74 [buffer] fix for changed name geometry_multi_within_coe to point_in_geometry 2014-05-21 12:32:40 +02:00
Barend Gehrels
157b9237ec [buffer] fix for update get_turns 2014-05-21 12:32:07 +02:00
Samuel Debionne
2a819b81ef [assign] Add variant support 2014-05-21 08:31:22 +02:00
Samuel Debionne
1c99e515b6 [crosses] Add variant support 2014-05-21 08:29:23 +02:00
Menelaos Karavelas
7a25e39129 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-20 04:12:02 +03:00
Barend Gehrels
86259f78a7 [doc][wkt] Fixed WKT doc / extended WKT doc (in progress) 2014-05-19 23:10:06 +02:00
Menelaos Karavelas
7445898e77 [distance] fix bugs in segment-to-box distance computation;
add generic algorithm for computing segment-to-box distances:
the algorithm first checks the segment and the box for intersection,
then if no intersection is found, it returns the minimum distance
over all point-segment combinations from the two geometries; for
computing a point-box distance the algorithm either calls the default
point-box strategy, or calls the detail::distance::point_to_range
algorithm; this alternate segment-box distance computation algorithm
is currently used in unit tests of segment-box distances to verify
results with the cartesian-specific approach
2014-05-19 16:49:35 +03:00
Menelaos Karavelas
86563682b3 [distance] modify the range-to-segment/box code, so that in the case
of computing the distance of a point of the range from the box, the
point-to-range code in point_in_geometry.hpp is used
2014-05-19 16:45:44 +03:00
Menelaos Karavelas
bacf060256 [distance] modify the point-to-range code so that a container/range
of points can be passed as an argument (e.g., a vector of points)
2014-05-19 16:44:27 +03:00
Samuel Debione
09a8ba53a7 [distance] Use transform_variant
Remove dependency to is_implemented. Update transform_variant to support
MPL sequence input.
2014-05-19 13:52:09 +02:00
Adam Wulkiewicz
1e8358c0df Merge pull request #33 from mkaravel/develop
[distance] fix bug in point-box distance computation in range-to-segment/box code
2014-05-19 02:34:30 +02:00
Adam Wulkiewicz
ba8d1b471d [index][example] Improve the rtree visualization.
Add support for rtrees storing Points and Segments.
Add the support for Segments in print_indexable() and gl_draw_indexable() index utilities.
2014-05-19 01:10:36 +02:00
Menelaos Karavelas
949691799f [distance] fix bug in point-box distance computation in range-to-segment/box code 2014-05-19 01:38:39 +03:00
Adam Wulkiewicz
e6fccafd40 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-05-18 00:21:38 +02:00
Adam Wulkiewicz
c4ca605bab [overlay][relate][within][test] Fix unused variable warnings. 2014-05-18 00:20:36 +02:00
Barend Gehrels
e79e6c9e2e Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-05-18 00:02:56 +02:00
Barend Gehrels
5007f1debb [extensions][dissolve] repaired dissolve w.r.t. turn changes 2014-05-17 21:09:07 +02:00
Adam Wulkiewicz
d0cf100a65 [get_turns][relate][test][index] Fix unused variable warnings.
In the rtree/pack_create replace (void)variable to boost::ignore_unused_variable_warning().
2014-05-17 14:10:34 +02:00
Menelaos Karavelas
a7f555b862 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-16 23:48:45 +03:00