Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vissarion committed Apr 2, 2024
2 parents da14168 + 713fe69 commit f82eb32
Show file tree
Hide file tree
Showing 248 changed files with 2,889 additions and 1,771 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
33 changes: 27 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,6 +19,27 @@

[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]
[/=================]
Expand All @@ -37,16 +58,16 @@

[*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
4 changes: 2 additions & 2 deletions include/boost/geometry/algorithms/convert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <cstddef>
#include <type_traits>

#include <boost/numeric/conversion/cast.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
Expand All @@ -45,6 +44,7 @@

#include <boost/geometry/geometries/concepts/check.hpp>

#include <boost/geometry/util/numeric_cast.hpp>
#include <boost/geometry/util/range.hpp>

#include <boost/geometry/views/detail/closed_clockwise_view.hpp>
Expand Down Expand Up @@ -80,7 +80,7 @@ struct point_to_box
typedef typename coordinate_type<Box>::type coordinate_type;

set<Index, Dimension>(box,
boost::numeric_cast<coordinate_type>(get<Dimension>(point)));
util::numeric_cast<coordinate_type>(get<Dimension>(point)));
point_to_box
<
Point, Box,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@

#include <cstddef>

#include <boost/numeric/conversion/cast.hpp>

#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/coordinate_type.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/util/algorithm.hpp>
#include <boost/geometry/util/numeric_cast.hpp>


namespace boost { namespace geometry
Expand Down Expand Up @@ -60,7 +59,7 @@ inline void assign_point_to_index(Point const& point, Geometry& geometry)
detail::for_each_dimension<Geometry>([&](auto dimension)
{
geometry::set<Index, dimension>(geometry,
boost::numeric_cast
util::numeric_cast
<
typename coordinate_type<Geometry>::type
>(geometry::get<dimension>(point)));
Expand Down Expand Up @@ -92,7 +91,7 @@ inline void assign_point_from_index(Geometry const& geometry, Point& point)
detail::for_each_dimension<Geometry>([&](auto dimension)
{
geometry::set<dimension>(point,
boost::numeric_cast
util::numeric_cast
<
typename coordinate_type<Point>::type
>(geometry::get<Index, dimension>(geometry)));
Expand Down
31 changes: 15 additions & 16 deletions include/boost/geometry/algorithms/detail/assign_values.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <boost/concept/requires.hpp>
#include <boost/concept_check.hpp>
#include <boost/numeric/conversion/bounds.hpp>
#include <boost/numeric/conversion/cast.hpp>

#include <boost/geometry/algorithms/append.hpp>
#include <boost/geometry/algorithms/clear.hpp>
Expand All @@ -39,7 +37,8 @@
#include <boost/geometry/geometries/concepts/check.hpp>

#include <boost/geometry/util/algorithm.hpp>
#include <boost/geometry/util/is_inverse_spheroidal_coordinates.hpp>
#include <boost/geometry/util/bounds.hpp>
#include <boost/geometry/util/numeric_cast.hpp>


namespace boost { namespace geometry
Expand Down Expand Up @@ -74,8 +73,8 @@ struct assign_inverse_box_or_segment
{
typedef typename coordinate_type<BoxOrSegment>::type coordinate_type;

coordinate_type const highest = geometry::bounds<coordinate_type>::highest();
coordinate_type const lowest = geometry::bounds<coordinate_type>::lowest();
coordinate_type const highest = util::bounds<coordinate_type>::highest();
coordinate_type const lowest = util::bounds<coordinate_type>::lowest();
detail::for_each_dimension<BoxOrSegment>([&](auto dimension)
{
set<0, dimension>(geometry, highest);
Expand Down Expand Up @@ -117,8 +116,8 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
// Copy coordinates
typedef typename coordinate_type<Point>::type coordinate_type;

geometry::set<0>(point, boost::numeric_cast<coordinate_type>(get<Corner1, 0>(box)));
geometry::set<1>(point, boost::numeric_cast<coordinate_type>(get<Corner2, 1>(box)));
geometry::set<0>(point, util::numeric_cast<coordinate_type>(get<Corner1, 0>(box)));
geometry::set<1>(point, util::numeric_cast<coordinate_type>(get<Corner2, 1>(box)));
}


Expand All @@ -136,10 +135,10 @@ struct assign_2d_box_or_segment
static inline void apply(Geometry& geometry,
Type const& x1, Type const& y1, Type const& x2, Type const& y2)
{
geometry::set<0, 0>(geometry, boost::numeric_cast<coordinate_type>(x1));
geometry::set<0, 1>(geometry, boost::numeric_cast<coordinate_type>(y1));
geometry::set<1, 0>(geometry, boost::numeric_cast<coordinate_type>(x2));
geometry::set<1, 1>(geometry, boost::numeric_cast<coordinate_type>(y2));
geometry::set<0, 0>(geometry, util::numeric_cast<coordinate_type>(x1));
geometry::set<0, 1>(geometry, util::numeric_cast<coordinate_type>(y1));
geometry::set<1, 0>(geometry, util::numeric_cast<coordinate_type>(x2));
geometry::set<1, 1>(geometry, util::numeric_cast<coordinate_type>(y2));
}
};

Expand Down Expand Up @@ -167,8 +166,8 @@ struct assign<point_tag, Point, 2>
template <typename T>
static inline void apply(Point& point, T const& c1, T const& c2)
{
set<0>(point, boost::numeric_cast<coordinate_type>(c1));
set<1>(point, boost::numeric_cast<coordinate_type>(c2));
set<0>(point, util::numeric_cast<coordinate_type>(c1));
set<1>(point, util::numeric_cast<coordinate_type>(c2));
}
};

Expand All @@ -180,9 +179,9 @@ struct assign<point_tag, Point, 3>
template <typename T>
static inline void apply(Point& point, T const& c1, T const& c2, T const& c3)
{
set<0>(point, boost::numeric_cast<coordinate_type>(c1));
set<1>(point, boost::numeric_cast<coordinate_type>(c2));
set<2>(point, boost::numeric_cast<coordinate_type>(c3));
set<0>(point, util::numeric_cast<coordinate_type>(c1));
set<1>(point, util::numeric_cast<coordinate_type>(c2));
set<2>(point, util::numeric_cast<coordinate_type>(c3));
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <iterator>

#include <boost/core/ignore_unused.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/rbegin.hpp>
Expand Down Expand Up @@ -973,8 +972,9 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
{
collection.check_turn_in_original();
}

collection.verify_turns();
collection.handle_colocations();
collection.check_turn_in_pieces();
collection.make_traversable_consistent_per_cluster();

// Visit the piece collection. This does nothing (by default), but
// optionally a debugging tool can be attached (e.g. console or svg),
Expand Down
Loading

0 comments on commit f82eb32

Please sign in to comment.