Commit Graph

2917 Commits

Author SHA1 Message Date
Adam Wulkiewicz
6bf022bedb Merge pull request #236 from sdebionne/fix/range
Fix range back() function
2015-03-02 14:15:26 +01:00
Samuel Debionne
d9f95e6952 [algorithms][within] Use geometry::range
Make use of geometry::range algorithms to get front and back values of
Linestring (rather than Boost.Range begin() and front()).
2015-03-02 10:59:42 +01:00
Samuel Debionne
cae3bab2fe [util][range] Fix back()
*(--boost::end(rng)); is not valid for range with pointer as iterators.
since the range is supposed to be BidirectionalRange, use rbegin
instead.
2015-03-02 10:59:32 +01:00
Barend Gehrels
f74180b084 [buffer] Enhance turn-in-piece for pieces around points. They now
make use of monotonic sections, and get special treatment because there
are no helper segments, basically the whole procedure is different

This can make buffers around points 3 times faster (if the buffered ring contains many points)
2015-03-01 14:08:16 +01:00
Barend Gehrels
cf167f9a36 [sectionalize] support sections in vector (so sections_type is redundant) 2015-03-01 13:57:39 +01:00
Barend Gehrels
f45df767d5 [buffer] remove obsolete file 2015-03-01 11:25:13 +01:00
Barend Gehrels
c244debf53 [buffer] calculate turns: use monotonic properties in two dimensions
(does not give improvements for circles, however it might do for ellipses
longer in y dimension)
2015-02-28 12:58:51 +01:00
Barend Gehrels
483c373cf5 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-27 22:15:39 +01:00
Barend Gehrels
a6d10d610c [turns] use preceding/exceeding from headerfile 2015-02-27 22:15:08 +01:00
Barend Gehrels
6afc5a464a [buffer] performance: use monotonic properties of monotonic sections to limit
quadratic iterations within two overlapping sections
This can improve performance with about 25%
2015-02-27 22:11:50 +01:00
Menelaos Karavelas
d31cabb067 [strategies][cartesian][buffer][point_circle] fix internal point count
for small input values (less than 3): when the input point count is less
than 3, set the internal point count to 3; this is important for generating
valid polygons;
2015-02-26 17:30:24 +02:00
Barend Gehrels
230be833e2 Merge pull request #231 from mkaravel/doc/is_valid_with_failure
Doc/is valid with failure
2015-02-25 18:06:12 +01:00
Barend Gehrels
f1fc6eaa59 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-25 17:54:26 +01:00
Barend Gehrels
979fd3cf96 [buffer] change model::box by already existing type 2015-02-25 17:53:45 +01:00
Barend Gehrels
3a5e2c20c4 [buffer] improve performance for multi_point with many generated points
by now using monotonic sections and calculate turns over overlapping sections only
2015-02-25 17:50:25 +01:00
Barend Gehrels
015953ce42 [sectionalize] add static assert for if ...part is used out of sectionalize 2015-02-25 17:33:43 +01:00
Barend Gehrels
a18c0c2ad1 [sectionalize] let sectionalize_part make use of iterators instead of range,
for next commit where that is used for buffer, and range is inconvenient
2015-02-25 17:33:16 +01:00
Barend Gehrels
e45fd0ef29 [get_turns] move two policies to separate headerfile 2015-02-25 17:28:09 +01:00
Menelaos Karavelas
040dd2a3a4 [doc][algorithms][validity_failure_type] add inline documentation 2015-02-25 15:06:54 +02:00
Menelaos Karavelas
5c8e300ba2 [doc][algorithms][is_valid] update inline documentation for the
various is_valid overloads; add documentation for the overload that
takes a reference to validity_failure_type;
2015-02-25 15:05:29 +02:00
Menelaos Karavelas
296e36a19d [geometry] remove non-existent #include (file has been deleted) 2015-02-25 12:55:30 +02:00
Barend Gehrels
a7b82e7dd0 Merge pull request #229 from mkaravel/feature/is_valid_reason
New algorithm: is valid with reason
2015-02-25 09:26:30 +01:00
Menelaos Karavelas
191764170a [policies][is_valid] output detailed information about the invalid turn found 2015-02-24 17:45:33 +02:00
Menelaos Karavelas
d88b359393 [algorithms][is_valid] apply coding guidelines 2015-02-24 17:44:50 +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
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
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
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
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
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
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