Commit Graph

1773 Commits

Author SHA1 Message Date
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
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
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
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
Menelaos Karavelas
24d553a91a Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-14 16:29:28 +03: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