Samuel Debionne
d7aae45daf
[util][range] Use range_reference
...
Use range_reference to determine the return type of boost::at,
boost::front and boost::back.
2015-03-09 09:52:11 +01:00
Adam Wulkiewicz
2e18afacce
Merge pull request #239 from sdebionne/fix/iterators
...
Fix point_iterator with raw pointer base
2015-03-06 06:17:08 +01:00
Menelaos Karavelas
0efb49d054
[algorithms][is_valid] fix comment
2015-03-05 15:12:22 +02:00
Barend Gehrels
e80ec0babf
[buffer][doc] Make miter limit more clear in documentation
2015-03-04 12:26:49 +01:00
Barend Gehrels
ed2f52a16d
[buffer] Fix end caps with odd number of points, they were not closed
...
Including unit test. Issue was found by Oracle/MySQL testing
2015-03-04 11:40:44 +01:00
Menelaos Karavelas
90bb9a8a4f
[strategies][cartesian][buffer][join_round] revert change in strategy
2015-03-04 12:09:56 +02:00
Samuel Debionne
73a9a47598
[iterators] Use base_type from boost::iterator_adaptor
...
Use base_type from boost::iterator_adaptor. Remove base type definition
that clash with the base() function of boost::iterator_adaptor. Reformat
to follow coding guidelines.
2015-03-04 10:10:02 +01:00
Samuel Debionne
84463ae8ba
[iterators] Fix point_iterator with raw pointer base
...
Fix point_iterator (and adapt reverse_point_iterator to the fix) to
support curves implemented with raw pointer as iterator. The fix uses
boost::iterator_adaptor that implements base() a synonyme of base_ptr()
that consequently has been removed. The operators are also redondant and
removed.
2015-03-03 15:46:54 +01:00
Menelaos Karavelas
ac1a78f1cd
[strategies][cartesian][buffer][join_round] move the max outside the static cast
2015-03-03 16:04:32 +02:00
Menelaos Karavelas
a6a448f429
[strategies][cartesian][buffer][join_round] make sure that at least one
...
interior point is generated
2015-03-03 09:50:46 +02:00
Menelaos Karavelas
38fc1224c7
[strategies][cartesian][buffer][end_round] fix internal point count
...
for small input values (less than 4): when the input point count is less
than 4, set the internal point count to 4; for values less than 4 the
generated ends do not look round;
2015-03-02 21:11:40 +02:00
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