Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:boostorg/geometry into fix/remov…
Browse files Browse the repository at this point in the history
…e_rescaling
  • Loading branch information
vissarion committed May 21, 2024
2 parents 1ab40a3 + a7644cb commit 3532ebb
Show file tree
Hide file tree
Showing 335 changed files with 3,895 additions and 2,350 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
fi
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
echo "::set-output name=boost_self::$(basename $GITHUB_WORKSPACE)"
echo "::set-output name=boost_root::$GITHUB_WORKSPACE/boost-root"
echo "boost_self=$(basename $GITHUB_WORKSPACE)" >> "$GITHUB_OUTPUT"
echo "boost_root=$GITHUB_WORKSPACE/boost-root" >> "$GITHUB_OUTPUT"
- name: Clone boostorg/boost
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
fi
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
echo "::set-output name=boost_self::$(basename $GITHUB_WORKSPACE)"
echo "::set-output name=boost_root::$GITHUB_WORKSPACE/boost-root"
echo "boost_self=$(basename $GITHUB_WORKSPACE)" >> "$GITHUB_OUTPUT"
echo "boost_root=$GITHUB_WORKSPACE/boost-root" >> "$GITHUB_OUTPUT"
- name: Clone boostorg/boost
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
fi
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
echo "boost_self=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_OUTPUT
echo "boost_root=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_OUTPUT
echo "boost_self=$(basename $GITHUB_WORKSPACE)" >> "$GITHUB_OUTPUT"
echo "boost_root=$GITHUB_WORKSPACE/boost-root" >> "$GITHUB_OUTPUT"
- name: Clone boostorg/boost
run: |
Expand Down Expand Up @@ -221,8 +221,8 @@ jobs:
fi
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
echo "boost_self=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_OUTPUT
echo "boost_root=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_OUTPUT
echo "boost_self=$(basename $GITHUB_WORKSPACE)" >> "$GITHUB_OUTPUT"
echo "boost_root=$GITHUB_WORKSPACE/boost-root" >> "$GITHUB_OUTPUT"
- name: Clone boostorg/boost
run: |
Expand Down
92 changes: 80 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Generated by `boostdep --cmake geometry`
# Originally generated by `boostdep --cmake geometry`
# Adapted manually
# Copyright 2020, 2021 Peter Dimov
# Copyright (c) 2024 Barend Gehrels, Amsterdam, the Netherlands.
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

Expand All @@ -11,6 +13,7 @@ add_library(boost_geometry INTERFACE)
add_library(Boost::geometry ALIAS boost_geometry)

target_include_directories(boost_geometry INTERFACE include)
target_compile_features(boost_geometry INTERFACE cxx_std_14)

target_link_libraries(boost_geometry
INTERFACE
Expand All @@ -20,41 +23,106 @@ target_link_libraries(boost_geometry
Boost::assert
Boost::concept_check
Boost::config
Boost::container
Boost::core
Boost::endian
Boost::function_types
Boost::fusion
Boost::integer
Boost::iterator
Boost::lexical_cast
Boost::math
Boost::move
Boost::mpl
Boost::multiprecision
Boost::numeric_conversion
Boost::polygon
Boost::predef
Boost::qvm
Boost::range
Boost::rational
Boost::serialization
Boost::smart_ptr
Boost::static_assert
Boost::thread
Boost::throw_exception
Boost::tokenizer
Boost::tuple
Boost::type_traits
Boost::utility
Boost::variant
Boost::variant2
)

target_compile_features(boost_geometry INTERFACE cxx_std_14)
# Required for Boost.Geometry Index
target_link_libraries(boost_geometry
INTERFACE
Boost::container
Boost::serialization
)

# Optional requirements (for example, for adaptations)
if(BOOST_GEOMETRY_BUILD_OPTIONAL)
target_link_libraries(boost_geometry
INTERFACE
Boost::fusion
Boost::integer
Boost::polygon
Boost::variant2
)

# Mentioned in SRS Shared_grids_boost (which is optional)
target_link_libraries(boost_geometry
INTERFACE
Boost::thread
)

# Requirements for extensions
target_link_libraries(boost_geometry
INTERFACE
Boost::endian
Boost::predef
)

endif()

if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

if (${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
# Project is root. Find Boost source.
set(BOOST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." CACHE STRING "Boost source dir to use when running CMake from this directory")
if (NOT IS_ABSOLUTE ${BOOST_SRC_DIR})
set(BOOST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${BOOST_SRC_DIR}")
endif()

set(BOOST_SRC_DIR_IS_VALID ON)
foreach (PATH "CMakeLists.txt" "Jamroot" "boost-build.jam" "libs")
if (NOT EXISTS "${BOOST_SRC_DIR}/${PATH}")
message(STATUS "${BOOST_SRC_DIR}/${PATH} does not exist. Fallback to find_package.")
set(BOOST_SRC_DIR_IS_VALID OFF)
break()
endif()
endforeach()

# Create Boost targets from source dir or boost package.
# These are the direct dependencies currently used in unit tests.
set(BOOST_INCLUDE_LIBRARIES
config
algorithm
any
lexical_cast
math
multiprecision
qvm
rational
serialization
tokenizer
variant
test)

if (BOOST_SRC_DIR_IS_VALID)
set(BOOST_EXCLUDE_LIBRARIES ${PROJECT_NAME})
add_subdirectory(${BOOST_SRC_DIR} deps_/boost EXCLUDE_FROM_ALL)
else()
find_package(Boost 1.81.0 REQUIRED)
foreach (BOOST_INCLUDE_LIBRARY ${BOOST_INCLUDE_LIBRARIES})
add_library(Boost::${BOOST_INCLUDE_LIBRARY} ALIAS Boost::headers)
endforeach ()
endif()

endif()

enable_testing()
add_subdirectory(test)

endif()
Expand Down
45 changes: 39 additions & 6 deletions doc/release_notes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Copyright (c) 2009-2017 Mateusz Loskot <[email protected]>, London, UK.
Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.

This file was modified by Oracle on 2015-2023.
Modifications copyright (c) 2015-2023, Oracle and/or its affiliates.
This file was modified by Oracle on 2015-2024.
Modifications copyright (c) 2015-2024, Oracle and/or its affiliates.
Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
Expand All @@ -19,22 +19,55 @@

[section:release_notes Release Notes]

[/=================]
[heading Boost 1.85]
[/=================]

[*Improvements]

* [@https://github.com/boostorg/geometry/pull/1247 1247] Use if constexpr macro instead of condition macro
* [@https://github.com/boostorg/geometry/pull/1242 1242] Pass strategy to sort by side
* [@https://github.com/boostorg/geometry/pull/1234 1234] Add cmake files for clang/mac/darwin/arm64

[*Solved issues]

* [@https://github.com/boostorg/geometry/issues/1231 1231], [@https://github.com/boostorg/geometry/issues/1244 1244] Fix invalid set operations for CCW polygons
* [@https://github.com/boostorg/geometry/issues/1259 1259] Fix compilation error with CUDA NVCC compiler
* [@https://github.com/boostorg/geometry/issues/1250 1250] Fix buffer of linestring returning incorrect inner polygon
* [@https://github.com/boostorg/geometry/issues/1230 1230] Fix union operation perturbing a point and returning wrong result
* [@https://github.com/boostorg/geometry/issues/1229 1229] Fix union producing self intersections
* [@https://github.com/boostorg/geometry/pull/1248 1248] Fix buffer issue by setting turns in closed clusters as non traversable
* [@https://github.com/boostorg/geometry/pull/1246 1246] Fix compilation of converter and is_base_of
* Various fixes of errors and warnings

[/=================]
[heading Boost 1.84]
[/=================]

[*Solved issues]

* [@https://github.com/boostorg/geometry/issues/1138 1138] Fix difference of two polygons
* [@https://github.com/boostorg/geometry/issues/1183 1183] Fix for union_ incomplete result polygon
* [@https://github.com/boostorg/geometry/issues/1184 1184] Fix for intersection
* [@https://github.com/boostorg/geometry/issues/1186 1186] Fix for union_ improper inner ring assignment
* Various fixes of errors and warnings

[/=================]
[heading Boost 1.83]
[/=================]

[*Improvements]

* [https://github.com/boostorg/geometry/pull/1140 1140] Drop dependencies and replace boost with std in several places
* [https://github.com/boostorg/geometry/pull/1154 1154] Add missing headers so that all headers compile independently complying with Boost policy
* [https://github.com/boostorg/geometry/pull/1157 1157] Check const Ring concept in calculate_point_order
* [@https://github.com/boostorg/geometry/pull/1140 1140] Drop dependencies and replace boost with std in several places
* [@https://github.com/boostorg/geometry/pull/1154 1154] Add missing headers so that all headers compile independently complying with Boost policy
* [@https://github.com/boostorg/geometry/pull/1157 1157] Check const Ring concept in calculate_point_order

[*Solved issues]

* [@https://github.com/boostorg/geometry/issues/1100 1100] Fix for union
* [@https://github.com/boostorg/geometry/issues/1139 1139] Fix for different geometry types
* [@https://github.com/boostorg/geometry/issues/1158 1158] Fix for convex hull
* [*https://github.com/boostorg/geometry/issues/1161 1161] Fix within algorithm for geometries having a pole as a vertex
* [@https://github.com/boostorg/geometry/issues/1161 1161] Fix within algorithm for geometries having a pole as a vertex
* Various fixes of errors and warnings

[/=================]
Expand Down
19 changes: 9 additions & 10 deletions include/boost/geometry/algorithms/append.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
// Copyright (c) 2024 Adam Wulkiewicz, Lodz, Poland.

// This file was modified by Oracle on 2014-2023.
// Modifications copyright (c) 2014-2023, Oracle and/or its affiliates.
Expand Down Expand Up @@ -60,7 +61,7 @@ struct to_range_point
static inline void apply(Geometry& geometry, Point const& point,
signed_size_type = -1, signed_size_type = 0)
{
typename geometry::point_type<Geometry>::type copy;
geometry::point_type_t<Geometry> copy;
geometry::detail::conversion::convert_point_to_point(point, copy);
traits::push_back<Geometry>::apply(geometry, copy);
}
Expand Down Expand Up @@ -90,7 +91,7 @@ struct to_polygon_point
static inline void apply(Polygon& polygon, Point const& point,
signed_size_type ring_index, signed_size_type = 0)
{
using ring_type = typename ring_type<Polygon>::type;
using ring_type = ring_type_t<Polygon>;

if (ring_index == -1)
{
Expand All @@ -112,18 +113,16 @@ struct to_polygon_range
static inline void apply(Polygon& polygon, Range const& range,
signed_size_type ring_index, signed_size_type = 0)
{
using ring_type = typename ring_type<Polygon>::type;
using exterior_ring_type = typename ring_return_type<Polygon>::type;
using interior_ring_range_type = typename interior_return_type<Polygon>::type;

using ring_type = ring_type_t<Polygon>;

if (ring_index == -1)
{
exterior_ring_type ext_ring = exterior_ring(polygon);
auto&& ext_ring = exterior_ring(polygon);
to_range_range::apply<ring_type, Range>(ext_ring, range);
}
else if (ring_index < signed_size_type(num_interior_rings(polygon)))
{
interior_ring_range_type int_rings = interior_rings(polygon);
auto&& int_rings = interior_rings(polygon);
to_range_range::apply<ring_type, Range>(range::at(int_rings, ring_index), range);
}
}
Expand Down Expand Up @@ -159,8 +158,8 @@ template
<
typename Geometry,
typename RangeOrPoint,
typename Tag = typename geometry::tag<Geometry>::type,
typename OtherTag = typename geometry::tag<RangeOrPoint>::type
typename Tag = geometry::tag_t<Geometry>,
typename OtherTag = geometry::tag_t<RangeOrPoint>
>
struct append
: detail::append::append_no_action
Expand Down
Loading

0 comments on commit 3532ebb

Please sign in to comment.