Commit Graph

1753 Commits

Author SHA1 Message Date
Samuel Debione
97508183e1 [assign] Move concept check 2014-05-23 16:34:17 +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
Samuel Debione
594add5e1b [assign] Add tests for variants 2014-05-22 16:32:47 +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
ddc649a492 [assign] Fix compiler errors 2014-05-21 20:02:30 +02: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
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
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
3fbfd2474d [distance] implement the new file/directory structure fully:
move the free function and reverse dispatch in algorithms/distance/interface.hpp
move the details of the implementation in algorithms/distance/implementation.hpp
keep only these two headers in algorithms/distance.hpp
2014-05-16 14:14:26 +03:00
Menelaos Karavelas
96a2f382a2 [distance] implement the new file/directory structure fully:
move the free function and reverse dispatch in algorithms/distance/interface.hpp
move the details of the implementation in algorithms/distance/implementation.hpp
keep only these two headers in algorithms/distance.hpp
2014-05-16 13:58:43 +03:00
Menelaos Karavelas
7a7a75245d Merge branch 'develop' of https://github.com/boostorg/geometry into feature/distance 2014-05-15 19:20:27 +03:00
Adam Wulkiewicz
672384be00 [index] Remove unneeded #includes from the rtree.hpp 2014-05-15 17:18:24 +02:00
Adam Wulkiewicz
f41ef36258 [index] Update description and parameters names of nearest() predicate 2014-05-15 03:21:38 +02:00
Adam Wulkiewicz
8aa3ef425e [equals][index/examples] Optimize equals(Seg,Seg) and fix index/examples
Use less comparisions in equals(Seg,Seg) - suggested by Menelaos Karavelas
Add missing include to examples - caused by the recent change of the distance/rtree
2014-05-15 02:56:15 +02:00
Menelaos Karavelas
46763d34ca [strategies] fix conversion issue in projected_point strategy:
Problem:
when p1 (2nd argument of apply) has float as coordinate type, then
the result of the differences u-p1 and w-p1 is a double (because
the calculation type is double), which then is implicitly converted
to float (because the result of the difference is implicitly
converted to the type of the second operand), which means that we
may loose precision.

Solution:
convert p1 to the correct point type (fp_point_type), and then
perform the subtractions (p1 is anyways converted later on, so
just do then conversion a bit earlier).

Note:
This problem was generated as a warning on VS2010, and also appears
as a warning in clang++ and g++ if the -Wconversion option is used.
2014-05-15 02:24:42 +03:00
Adam Wulkiewicz
02df2d788f [index][equals] Add the support for Segments as Indexables in the rtree.
This commit also adds the support for equals(Segment, Segment).

During the creation of the rtree all metrics are calculated for Segments viewed as bounding Boxes.
During the querying Segments are passed into the BG algorithms.

This commit also fixes a compilation error related to the calculation of the Box/Box intersection in the index::detail::intersection_content().
Add indexed_point_view<> which allows to see Boxes and Segments as one of the Points.
Move normalized_view<> to views/detail.
Add index::detail::bounded_view<> which allows to see simple Geometry e.g. a Segment as its bounding Geometry e.g. a Box.

TODO/RECONSIDER:
1. This commit adds return_ref_or_bounds() which returns const& for Points and Boxes and bounding Box view for Segment. The resulting object is then passed into various algorithms like covered_by() or within(). Whenever possible the algorithms should be implemented for the input parameters and the call to return_ref_or_bounds() removed.
2. It's possible that for Segments metrics (like the amount of overlap in the leaf node) could be calculated differently than for Boxes and naiive conversion to bounding Boxes is not fully correct.
3. The way how bounded_view<> works may be not correct for non-cartesian CS. Now, for Segments it just picks MIN and MAX coordinates on the fly which may not be ok e.g. for Segments defined in the spherical CS because of the "winding" of the coordinates.
2014-05-14 23:30:35 +02:00
Adam Wulkiewicz
59b68ad2da Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-05-14 15:14:09 +02:00
Adam Wulkiewicz
8dcd329db7 [index] Use default_comparable_distance_result whenever possible 2014-05-14 15:13:01 +02:00
Menelaos Karavelas
a9fd41e355 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/setops 2014-05-14 15:42:25 +03:00
Barend Gehrels
4f19973453 [centroid] removed redundant distance include causing circular reference
for unit test "geometries/adapted"
2014-05-14 14:41:24 +02:00
Menelaos Karavelas
453a2c3784 [set ops L/L] fix unused variable warnings produced with clang++ with -Wextra 2014-05-14 15:39:12 +03:00
Menelaos Karavelas
277dcdba59 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/distance-for-merge 2014-05-14 15:29:12 +03:00
Menelaos Karavelas
f6d0b4054a [distance] fix unused variable warnings produced by clang++ with -Wextra and warnings by VS (reported by Adam) 2014-05-14 15:20:57 +03:00
Barend Gehrels
07696d76fd [overlay] Added missing include / removed obsolete include,
causing unit test troubles after distance merge
2014-05-14 13:46:22 +02:00
Barend Gehrels
c995031337 [intersection] avoid circulare reference in index/intersection/distance 2014-05-14 13:22:48 +02:00
Barend Gehrels
06346ee2ea Merge pull request #24 from mkaravel/feature/distance-for-merge
Feature/distance for merge
2014-05-14 12:35:59 +02:00
Menelaos Karavelas
b8eaf21fb5 [comparable distance] make comparable_distance(g1, g2) return default_comparable_distance_result 2014-05-13 10:53:25 +03:00
Menelaos Karavelas
cea8dd1b0d [distance] polish code; make clear when the result of comparable or regular strategy is used; 2014-05-11 23:21:22 +03:00
Menelaos Karavelas
15c711cf53 [distance] polish code; make clear when the result of comparable or regular strategy is used;
re-write geometry_to_geometry_rtree class so that is uses comparable distances for internal computations;
2014-05-11 23:16:17 +03:00
Menelaos Karavelas
d6b3abcfc1 [distance] re-write segment-box distance code without strategy::distance::services::strategy_point_point;
fix bug in segment-box comparable distance when the segment degenerates to a point;
2014-05-09 23:05:20 +03:00
Menelaos Karavelas
54ff519466 [stategies][distance] remove strategy::distance::services::strategy_point_point from distance strategies and distance strategy concept 2014-05-09 23:02:39 +03:00
Menelaos Karavelas
5777fd5b8d [overlay] the specialization of intersection_insert for linestring/box computes the intersection, but pretends as if it works for difference as well;
quick fix: further specialize this specialization of intersection insert so that it works only for overlay_intersection;
problem and quick fix related to boost trac ticket #10019;
2014-05-09 09:33:32 +03:00
Menelaos Karavelas
a7d02e0391 [distance][test] enable segment-segment distance computations 2014-05-09 00:20:24 +03:00
Menelaos Karavelas
226dcc4e6c [comparable distance] fix comments so that they make sense wrt to the code they refer to 2014-05-09 00:02:17 +03:00
Menelaos Karavelas
47c1cfe9b6 [strategies][distance] re-implement the dfeault distance result using the default strategy from detail::distance::default_strategy 2014-05-08 23:59:11 +03:00