/usr/include/boost/geometry/algorithms
NameSizeModeActions
detail/-0755rm
dispatch/-0755rm
append.hpp114930644editdlrm
area.hpp106570644editdlrm
assign.hpp107090644editdlrm
buffer.hpp86560644editdlrm
centroid.hpp196200644editdlrm
clear.hpp51560644editdlrm
comparable_distance.hpp11070644editdlrm
convert.hpp173270644editdlrm
convex_hull.hpp115890644editdlrm
correct.hpp99560644editdlrm
correct_closure.hpp58620644editdlrm
covered_by.hpp10770644editdlrm
crosses.hpp84780644editdlrm
densify.hpp124720644editdlrm
difference.hpp165910644editdlrm
discrete_frechet_distance.hpp78440644editdlrm
discrete_hausdorff_distance.hpp112810644editdlrm
disjoint.hpp11910644editdlrm
distance.hpp11100644editdlrm
envelope.hpp10210644editdlrm
equals.hpp11960644editdlrm
expand.hpp10730644editdlrm
for_each.hpp98310644editdlrm
intersection.hpp8060644editdlrm
intersects.hpp11450644editdlrm
is_convex.hpp65080644editdlrm
is_empty.hpp48530644editdlrm
is_simple.hpp5750644editdlrm
is_valid.hpp5700644editdlrm
length.hpp93410644editdlrm
line_interpolate.hpp130540644editdlrm
make.hpp51700644editdlrm
not_implemented.hpp38390644editdlrm
num_geometries.hpp35860644editdlrm
num_interior_rings.hpp37560644editdlrm
num_points.hpp55650644editdlrm
num_segments.hpp47750644editdlrm
overlaps.hpp10670644editdlrm
perimeter.hpp72120644editdlrm
point_on_surface.hpp132810644editdlrm
relate.hpp6420644editdlrm
relation.hpp6520644editdlrm
remove_spikes.hpp97530644editdlrm
reverse.hpp43860644editdlrm
simplify.hpp226960644editdlrm
sym_difference.hpp231690644editdlrm
touches.hpp11270644editdlrm
transform.hpp141050644editdlrm
union.hpp213830644editdlrm
unique.hpp46820644editdlrm
validity_failure_type.hpp36840644editdlrm
within.hpp10570644editdlrm
Edit: /usr/include/boost/geometry/algorithms/buffer.hpp (8656B)
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. // This file was modified by Oracle on 2017, 2019. // Modifications copyright (c) 2017, 2019 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GEOMETRY_ALGORITHMS_BUFFER_HPP #define BOOST_GEOMETRY_ALGORITHMS_BUFFER_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { template < typename Input, typename Output, typename TagIn = typename tag::type, typename TagOut = typename tag::type > struct buffer: not_implemented {}; template struct buffer { template static inline void apply(BoxIn const& box_in, Distance const& distance, Distance const& , BoxOut& box_out) { detail::buffer::buffer_box(box_in, distance, box_out); } }; } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH namespace resolve_variant { template struct buffer { template static inline void apply(Geometry const& geometry, Distance const& distance, Distance const& chord_length, GeometryOut& out) { dispatch::buffer::apply(geometry, distance, chord_length, out); } }; template struct buffer > { template struct visitor: boost::static_visitor { Distance const& m_distance; Distance const& m_chord_length; GeometryOut& m_out; visitor(Distance const& distance, Distance const& chord_length, GeometryOut& out) : m_distance(distance), m_chord_length(chord_length), m_out(out) {} template void operator()(Geometry const& geometry) const { buffer::apply(geometry, m_distance, m_chord_length, m_out); } }; template static inline void apply( boost::variant const& geometry, Distance const& distance, Distance const& chord_length, GeometryOut& out ) { boost::apply_visitor(visitor(distance, chord_length, out), geometry); } }; } // namespace resolve_variant /*! \brief \brief_calc{buffer} \ingroup buffer \details \details_calc{buffer, \det_buffer}. \tparam Input \tparam_geometry \tparam Output \tparam_geometry \tparam Distance \tparam_numeric \param geometry_in \param_geometry \param geometry_out \param_geometry \param distance The distance to be used for the buffer \param chord_length (optional) The length of the chord's in the generated arcs around points or bends \qbk{[include reference/algorithms/buffer.qbk]} */ template inline void buffer(Input const& geometry_in, Output& geometry_out, Distance const& distance, Distance const& chord_length = -1) { concepts::check(); concepts::check(); resolve_variant::buffer::apply(geometry_in, distance, chord_length, geometry_out); } /*! \brief \brief_calc{buffer} \ingroup buffer \details \details_calc{return_buffer, \det_buffer}. \details_return{buffer}. \tparam Input \tparam_geometry \tparam Output \tparam_geometry \tparam Distance \tparam_numeric \param geometry \param_geometry \param distance The distance to be used for the buffer \param chord_length (optional) The length of the chord's in the generated arcs around points or bends (RESERVED, NOT YET USED) \return \return_calc{buffer} */ template Output return_buffer(Input const& geometry, Distance const& distance, Distance const& chord_length = -1) { concepts::check(); concepts::check(); Output geometry_out; resolve_variant::buffer::apply(geometry, distance, chord_length, geometry_out); return geometry_out; } /*! \brief \brief_calc{buffer} \ingroup buffer \details \details_calc{buffer, \det_buffer}. \tparam GeometryIn \tparam_geometry \tparam MultiPolygon \tparam_geometry{MultiPolygon} \tparam DistanceStrategy A strategy defining distance (or radius) \tparam SideStrategy A strategy defining creation along sides \tparam JoinStrategy A strategy defining creation around convex corners \tparam EndStrategy A strategy defining creation at linestring ends \tparam PointStrategy A strategy defining creation around points \param geometry_in \param_geometry \param geometry_out output multi polygon (or std:: collection of polygons), will contain a buffered version of the input geometry \param distance_strategy The distance strategy to be used \param side_strategy The side strategy to be used \param join_strategy The join strategy to be used \param end_strategy The end strategy to be used \param point_strategy The point strategy to be used \qbk{distinguish,with strategies} \qbk{[include reference/algorithms/buffer_with_strategies.qbk]} */ template < typename GeometryIn, typename MultiPolygon, typename DistanceStrategy, typename SideStrategy, typename JoinStrategy, typename EndStrategy, typename PointStrategy > inline void buffer(GeometryIn const& geometry_in, MultiPolygon& geometry_out, DistanceStrategy const& distance_strategy, SideStrategy const& side_strategy, JoinStrategy const& join_strategy, EndStrategy const& end_strategy, PointStrategy const& point_strategy) { typedef typename boost::range_value::type polygon_type; concepts::check(); concepts::check(); typedef typename point_type::type point_type; typedef typename rescale_policy_type < point_type, typename geometry::cs_tag::type >::type rescale_policy_type; geometry_out.clear(); if (geometry::is_empty(geometry_in)) { // Then output geometry is kept empty as well return; } model::box box; geometry::envelope(geometry_in, box); geometry::buffer(box, box, distance_strategy.max_distance(join_strategy, end_strategy)); typename strategy::intersection::services::default_strategy < typename cs_tag::type >::type intersection_strategy; rescale_policy_type rescale_policy = boost::geometry::get_rescale_policy( box, intersection_strategy); detail::buffer::buffer_inserter(geometry_in, range::back_inserter(geometry_out), distance_strategy, side_strategy, join_strategy, end_strategy, point_strategy, intersection_strategy, rescale_policy); } }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ALGORITHMS_BUFFER_HPP