Commit Graph

8536 Commits

Author SHA1 Message Date
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
Menelaos Karavelas
eb5f82aecd [test][distance] eliminate make_* functions in test_distance_common.hpp; replace occurrences of these functions with wkt descriptions of the geometries (boxes and segments) 2014-05-14 17:54:13 +03:00
Samuel Debione
3d528db92c [distance] First step to fix tests 2014-05-14 16:27:55 +02:00
Menelaos Karavelas
04455dc1ce Merge branch 'develop' of https://github.com/boostorg/geometry into feature/is_simple 2014-05-14 16:29:50 +03: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
Menelaos Karavelas
3307029805 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-14 15:52:06 +03:00
Barend Gehrels
8c0a53f605 Merge pull request #28 from mkaravel/feature/setops
Merged from Feature/setops to avoid warnings about unused variables
2014-05-14 14:45:19 +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
1083dce436 [test] fix unused variable warnings produced with clang++ and -Wextra 2014-05-14 15:40:27 +03:00
Menelaos Karavelas
aebd3cefe2 [test][set ops L/L] fix unused variable warnings produced with clang++ and -Wextra 2014-05-14 15:39:56 +03: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
Barend Gehrels
b01fd69d06 Merge pull request #27 from mkaravel/feature/distance-for-merge
[distance] fix unused variable warnings
2014-05-14 14:36:15 +02: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
71be9ab855 [test] added include for multi 2014-05-14 14:19:04 +02:00
Barend Gehrels
a703cae46e [num_points][test] Added test for num_points which was not yet there 2014-05-14 14:18:48 +02:00
Barend Gehrels
afb301f6ed [unit test] Made from_wkt inline and avoid abbreviations 2014-05-14 13:47:22 +02:00
Barend Gehrels
09365f0086 [unit test] Added copyright info 2014-05-14 13:46:52 +02: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
a500a12726 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint 2014-05-14 10:20:53 +03:00
Samuel Debione
124f783d3b [distance] Add variant tests
No finished yet
2014-05-13 16:40:41 +02:00
Menelaos Karavelas
ef5d49a3fa [test][distance] replace operator() by static apply method in tester of distance of two geometries; activate test for the segment-ring combination 2014-05-13 11:57:09 +03:00
Menelaos Karavelas
cfb445773e [test][distance] make clear the distinction between distance result and comparable distance result (use correct types and checks) 2014-05-13 11:01:45 +03:00
Menelaos Karavelas
cfef0b8d68 [test] extract string_from_type class in geometry_test_common.hpp in a separate file 2014-05-13 10:55:36 +03:00
Menelaos Karavelas
9d9f1241be [test][distance] add test case for distance between boxes with integer coordinates 2014-05-13 10:54:35 +03:00
Menelaos Karavelas
b8eaf21fb5 [comparable distance] make comparable_distance(g1, g2) return default_comparable_distance_result 2014-05-13 10:53:25 +03:00
Barend Gehrels
5132d2a9cf [doc] Added variant to implementation-status matrix 2014-05-12 22:31:09 +02:00
Samuel Debione
122a6344ff [distance] Add variant support
Add variant dispatch layer to the distance algorithm
2014-05-12 17:23:02 +02:00
Barend Gehrels
1e493ce5fc Merge pull request #25 from mkaravel/develop
[overlay] quick fix for boost trac ticket #10019
2014-05-11 23:13:04 +02: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
f565154090 [test][strategies] add unit test to test the return type of the default distance result and the default comparable distance result 2014-05-10 15:14:19 +03:00
Menelaos Karavelas
aba739439b [test][distance L/A] add test case for segment-box distance, where the segment degenerates to a point 2014-05-09 23:07:00 +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