Barend Gehrels
324249bb2d
[copy_segment_point] change offset with modulo, add to box, update unit test
2020-12-09 13:52:07 +01:00
Barend Gehrels
abaa211d3a
[sort_by_side] fix cases where the cluster point is approached by segments, but the last point before is colocated with the turn itself
...
This fixes 50% of the errors currently found by recursive_polygons_buffer (when rescaling is turned off)
2020-12-02 14:19:50 +01:00
Barend Gehrels
77838a8995
[copy_segment_point] change implementation to allow also negative offsets,
...
including unit test
2020-12-02 13:19:15 +01:00
Barend Gehrels
bc77b4889b
Merge pull request #773 from barendgehrels/fix/fraction-by-arrival
...
Fix turns where segments arrive at an intersection point, or leave
2020-11-25 10:24:25 +01:00
Barend Gehrels
42bd7cfe95
[turns] fix precision when turns are arriving or leaving.
...
Then their fractions should be 1 or 0 (and not nearly so)
2020-11-25 10:21:16 +01:00
Adam Wulkiewicz
632d1fcb43
Merge pull request #772 from awulkiew/fix/vs2015_workaround
...
Add constexpr and boost::variant workarounds for vs2015.
2020-11-23 02:50:50 +01:00
CG-SD
35a02b7ee6
[extensions][wkb] Fix risk of undefined behavior when parsing a byte_order byte
...
* fixed risk of undefined behavior when parsing a byte_order byte
tried to parse a spatialite WKB blob with this code but the byte_order byte was replaced by a '69' token :
parsing this byte is successful but the value read is not part of the enum, the function returns true but the order parameter is left untouched.
Calls to that function elsewhere in the code do not initialise the order parameter.
see 869e72fc01/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp (L83)
another option would be to return false in that case, but it didn't fit my need
* Update parser.hpp
typo fix
2020-11-21 02:53:39 +01:00
Vissarion Fisikopoulos
5351d98305
Fix unused parameter warnings ( #775 )
2020-11-18 15:51:59 +02:00
Adam Wulkiewicz
0b55a946b5
Add constexpr and boost::variant workarounds for vs2015.
2020-11-07 23:22:49 +01:00
Adam Wulkiewicz
f510cf2744
[area] Fix area_result for boost::variant and default_strategy.
2020-11-07 21:41:51 +01:00
Barend Gehrels
3e111a0302
[turns] without rescaling, include start turns in calculation
2020-10-28 14:27:26 +01:00
Adam Wulkiewicz
3402c9101d
Replace boost::tuple with std::tuple or custom classes.
...
Modernize tuple support.
2020-10-21 16:21:06 +02:00
Adam Wulkiewicz
54f141779b
Include only necessary headers of Boost.Range.
2020-10-16 01:23:06 +02:00
Adam Wulkiewicz
7b8b3f694a
Merge pull request #759 from awulkiew/feature/static_assert
...
Replace MPL_ASSERT with std static_assert.
2020-10-16 01:03:34 +02:00
Adam Wulkiewicz
aeb81ebfd6
Replace MPL_ASSERT with std static_assert.
...
Also include only necessary headers from Boost.Range.
2020-10-16 00:31:22 +02:00
Barend Gehrels
64c09d07f0
Merge pull request #761 from barendgehrels/remove-ttmath
...
Remove ttmath
2020-10-13 18:25:34 +02:00
Pranam Lashkari
055684bc41
resolve c2146 on vs15 with area_result declaration
2020-10-12 19:12:54 +05:30
Barend Gehrels
84e19aff1c
[extensions] remove HAVE_TTMATH and other occurances of ttmath
2020-10-07 14:06:04 +02:00
Barend Gehrels
45d624af9b
[cleanup] remove HAVE_TTMATH and other occurances of ttmath
2020-10-07 14:05:28 +02:00
Adam Wulkiewicz
ab9f1de1ad
Merge pull request #748 from awulkiew/feature/type_traits
...
Remove direct usage of Boost.MPL and Boost.TypeTraits from the library.
2020-10-01 19:06:51 +02:00
Barend Gehrels
0fd961b595
[buffer] specify the correct types for monotonic sections and partitioning,
...
and re-introduce moving iterators to monotonic sections because it
performs around 25% better
2020-09-30 10:15:32 +02:00
Barend Gehrels
5eb1e809e9
[buffer][fix] Fix distance measure for use in multi precision types
2020-09-30 10:14:10 +02:00
Barend Gehrels
5fe26e45b4
Merge pull request #752 from barendgehrels/buffer/fix_type_conflicts
...
[buffer] Several changes necessary to handle different types
2020-09-13 22:06:09 +02:00
Adam Wulkiewicz
8763d3cae3
[algorithms] Replace mpl::vector_c with std::integer_sequence in sectionalize.
2020-09-11 13:50:04 +02:00
Adam Wulkiewicz
dd5ae391bd
Move type_traits and sequence tools to util namespace.
2020-09-10 23:37:55 +02:00
Adam Wulkiewicz
9a248be454
[algorithms] Replace MPL sequences in relate().
2020-09-10 01:26:39 +02:00
Adam Wulkiewicz
d967c8f08d
[geometries] Replace MPL sequence with parameter pack in specialization of point_type for boost::variant.
2020-09-09 18:05:01 +02:00
Adam Wulkiewicz
22b2031dad
[util][strategies] Add more sequence utilities, remove type_pair and integer_pair, use sequences instead.
2020-09-09 18:02:50 +02:00
Barend Gehrels
9e1a4373dc
[buffer] Several changes necessary to handle different types (float, long double, boost MP)
2020-09-09 14:11:36 +02:00
Adam Wulkiewicz
b0b2fd6b86
[core][util] Deprecate core/is_areal.hpp
2020-09-05 21:56:01 +02:00
Adam Wulkiewicz
9c095f4d37
Implement compile-time sequence utilities and use them instead of MPL.
...
distance and length result types are reimplemented.
distance result can no longer be variant type. This might rarely occur
if in a variant type there were two geometries using different
coordinate types and one of them were of greater precision than double.
Deprecate combine_if, compress_variant and transform_variant utilities.
2020-09-05 17:44:11 +02:00
Adam Wulkiewicz
52af5408e2
[util] Replace Boost.MPL sequence in promote_integral with parameter pack.
2020-09-04 18:27:54 +02:00
Adam Wulkiewicz
30d9fbba66
Replace select_sequence_element with select_pack_element and use it in area_result.
2020-09-04 17:48:25 +02:00
Adam Wulkiewicz
cf9549d668
Replace boost integral constants with std.
2020-09-03 19:58:49 +02:00
Adam Wulkiewicz
9b09cd2efa
Divide type_traits, replace bare_type with remove_cptrref.
...
Divide type_traits into two groups:
- util/type_traits_std.hpp - dependant only on std type_traits
- util/type_traits.hpp - dependant on geometry tags, also including the
above.
Add remove_cptrref and use it instead of bare_type.
For now keep bare_type, move it to util/type_traits_std.hpp.
2020-09-03 19:32:01 +02:00
Adam Wulkiewicz
00f00369cd
Replace add_const_if_c with transcribe_const.
...
Move add_const_if_c to util/type_traits.hpp
Remove usage when not needed.
2020-09-03 16:26:06 +02:00
Adam Wulkiewicz
c63e7a8394
Move is_range util to range.hpp to avoid Boost.Range/MPL dependency in type_traits.hpp
2020-09-03 16:24:29 +02:00
Adam Wulkiewicz
d7619d11c2
Replace Boost.MPL/TypeTraits with std type_traits in various parts of the library.
2020-09-03 13:36:18 +02:00
Adam Wulkiewicz
b9a60636e0
[util] Add more type_traits.
2020-09-03 13:35:19 +02:00
Adam Wulkiewicz
6c0490a366
Merge branch 'develop' into feature/type_traits
2020-08-31 23:33:27 +02:00
Adam Wulkiewicz
3cd74503b1
[util] Use std type_traits instead of Boost type_traits/mpl in various utils.
2020-08-31 01:43:44 +02:00
Adam Wulkiewicz
8deda7466c
[index] Replace deprecated header.
2020-08-30 04:18:14 +02:00
Adam Wulkiewicz
dda7e6b450
[index] Fix compilation error and warning in varray_detail.
...
Error with msvc-14.2: ambiguous call to destroy()
- explicitly define namespace
Warning with gcc-8.1: memcpy called for non-trivially-copyable type
- check correct type trait
2020-08-30 03:46:09 +02:00
Adam Wulkiewicz
9c4c884a4c
[strategies] Use select_calculation_type in buffer::geographic_point_circle.
2020-08-29 17:43:09 +02:00
Adam Wulkiewicz
4b75d69937
Move various traits to util/type_traits.hpp and adapt the code using them.
2020-08-29 01:48:39 +02:00
Adam Wulkiewicz
786bc54c68
Add util/type_traits, polylinear_tag, simplify types in umbrella strategies.
2020-08-28 19:12:31 +02:00
Adam Wulkiewicz
5ca542fc4f
Merge pull request #726 from awulkiew/feature/strategies
...
Umbrella strategies.
2020-08-28 16:16:25 +02:00
Adam Wulkiewicz
0166c8ea6e
Merge pull request #743 from awulkiew/feature/for_each
...
Refactor for_each_x and implement new algorithms.
2020-08-24 12:37:23 +02:00
Adam Wulkiewicz
7ef3117f27
[for_each] Refactor for_each_x and implement new algorithms.
...
for_each_range now expects functors instead of structs with apply()
member function.
for_each_segment now calls functor also for degenerated ranges for
consistency with segment_iterator.
New algorithms based on std::all_of, std::any_of and std::none_of
- all_points_of, any_point_of, none_point_of
- all_segments_of, any_segment_of, none_segment_of
- all_ranges_of, any_range_of, none_range_of
New algorithms used in several places in the library.
This code requires C++14.
2020-08-24 12:28:43 +02:00
Adam Wulkiewicz
070480d97c
Merge pull request #745 from awulkiew/feature/constexpr
...
Support constexpr in points, segment, box, get, dot and cross products.
2020-08-24 12:26:52 +02:00