Commit Graph

8536 Commits

Author SHA1 Message Date
Menelaos Karavelas
7f7f915f1a [doc][examples][is_valid (with message)] add example showing the
usage of bg::is_valid(geometry, message_string)
2015-02-24 15:57:52 +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
cebcabb1d4 [test][algorithms][is_valid] update unit test code for is_valid to use
the newly introduced free functions;
2015-02-24 15:40:29 +02:00
Menelaos Karavelas
ef9069d216 [test][algorithms][is_valid] rename is_valid_reason unit test to is_valid_failure;
update code in unit test to reflect this change;
2015-02-24 15:37:12 +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
8ece8a827e [test][algorithms][is_valid] rename is_valid_null_policy to is_valid_default_policy 2015-02-24 01:25:08 +02:00
Menelaos Karavelas
cfb108bb1c [test][algorithms][is_valid_reason] change failure_type_policy's apply
methods to return a boolean (according to newest design for policies)
2015-02-24 01:24:08 +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
88318ab6f7 [test][algorithms][is_valid] update declaration of policies (they are now templated classes) 2015-02-24 01:01:22 +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
31ecf743e8 [test][algorithms][is_valid_reason] update enum values names 2015-02-21 20:28:47 +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
0987bc93c7 [test][algorithms][is_valid_reason] update unit test due to change
in name of failure value related to wrong topological dimension
2015-02-21 16:33:37 +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
e2f9d07695 [test][algorithms][is_valid_reason] add unit test for new algorithm is_valid_reason 2015-02-20 10:36:56 +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
Menelaos Karavelas
f3464e4dd9 [test][algorithms][is_valid] clean-up code; add a few more test cases;
declare free functions as inline (if not already declared as such);
2015-02-20 09:53:16 +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
ae28913d8c [test][algorithms][is_valid][is_valid_reason] update validity testing
to account for the design changes regarding the visit policy; add basic
testing for is_valid_reason;
2015-02-19 23:24:24 +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