Commit Graph

2815 Commits

Author SHA1 Message Date
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
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
Adam Wulkiewicz
270f3e239c [example/index] Fix GCC/clang c++98 compilation error in glut_vis.cpp
The error is caused by the Boost.Move limitation - the correct implicit assignment operator can't be automatically generated for a containing class.
2014-05-19 17:07:52 +02:00
Adam Wulkiewicz
8502da510e Merge pull request #34 from mkaravel/feature/distance
Feature/distance
2014-05-19 16:43:10 +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
Menelaos Karavelas
678ecd1541 [test][distance] in the case of the segment-box combination,
also test output with respect to the generic algorithm that first
checks for intersection, and if that fails, checks all possible
point-segment combinations of the segment and and the box
2014-05-19 16:42:07 +03:00
Menelaos Karavelas
42105b5f82 [test][distance L/A] add two seg-box test cases provided by Adam Wulkiewicz 2014-05-19 16:41:14 +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
862743176c [doc/index] Compact the new knn query pictures. Add knn code snippet. 2014-05-19 02:17:27 +02:00
Adam Wulkiewicz
2df9ea51fe [doc/index] Updated example rtree pack creation time, after optimization. 2014-05-19 01:56:06 +02:00
Adam Wulkiewicz
92b0491b22 [doc] Add info about Segments Indexables and more pictures. 2014-05-19 01:44:32 +02:00
Adam Wulkiewicz
ea0d08fb67 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-05-19 01:12:55 +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
brunolalande
6d8a31951b Merge pull request #32 from mkaravel/develop
Develop
2014-05-18 21:40:52 +01:00
Adam Wulkiewicz
82304fdeef [doc] Fix quickref.xml to support new parameter name of nearest(). Also improve the knn examples info. 2014-05-18 19:39:38 +02:00
Adam Wulkiewicz
c51cdc4bb9 [doc][example] Update the knn queries section in docs. Improve knn query visualization in glut_vis. 2014-05-18 19:29:16 +02:00
Adam Wulkiewicz
d6326c6343 [index/example] Add the visualization of knn Box/Box and Seg/Box to glut_vis example 2014-05-18 16:08:48 +02: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
dee255ad5e [extensions][dissolve] added extra unit tests for cw/ccw check 2014-05-18 00:02:43 +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
Barend Gehrels
422c6c7129 [doc] Added Samuel and fixed some doc issues for distance 2014-05-16 23:00:13 +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
d6db5fc70c Merge branch 'develop' of https://github.com/boostorg/geometry into develop 2014-05-16 16:43:15 +03:00
Menelaos Karavelas
b992ddf185 [test][perimeter] do not test the variant-related code if GEOMETRY_TEST_DEBUG is defined
(the variant-related code does not compile when GEOMETRY_TEST_DEBUG is defined);
replace bg::perimeter_result (non-existing) by bg::default_lentgh_result (error
produced when compiling with -DGEOMETRY_TEST_DEBUG)
2014-05-16 14:24:32 +03:00
Adam Wulkiewicz
adee550a41 Merge pull request #30 from mkaravel/feature/distance
[strategies] fix conversion issue in projected_point strategy:
2014-05-16 13:24:08 +02:00
Menelaos Karavelas
91d461100c [test][length] do not test the variant-related code if GEOMETRY_TEST_DEBUG is defined
(the variant-related code does not compile when GEOMETRY_TEST_DEBUG is defined)
2014-05-16 14:17:48 +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
6adb37e5fd Merge pull request #31 from mkaravel/develop
[test] add missing include in test/string_from_type.hpp
2014-05-15 18:19:07 +02:00
Menelaos Karavelas
cbbb51f18d [test] add missing include in test/string_from_type.hpp (#include <string>) 2014-05-15 19:13:04 +03:00
Menelaos Karavelas
fe8027d303 [test] add missing include (#include <string>) 2014-05-15 18:38:45 +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
0918c754f7 Merge branch 'develop' of github.com:boostorg/geometry into develop 2014-05-14 23:52:23 +02: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
5fc246f903 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-14 18:07:12 +03:00
Adam Wulkiewicz
e805bb2ae5 Merge pull request #29 from mkaravel/feature/distance
Feature/distance
2014-05-14 17:04:10 +02:00
Menelaos Karavelas
087a42e9fd [test][distance] make sure sqrt is called with a double argument (to avoid problems with VS2010 that does not promote ints to doubles in sqrt) 2014-05-14 17:58:46 +03:00