Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::strategy::buffer::distance_symmetric< NumericType > Class Template Reference

Let the buffer algorithm create buffers with same distances. More...

#include <buffer_distance_symmetric.hpp>

Public Member Functions

 distance_symmetric (NumericType const &distance)
 Constructs the strategy, a distance must be specified. More...
 
template<typename Point >
NumericType apply (Point const &, Point const &, buffer_side_selector) const
 Returns the distance-value. More...
 
int factor () const
 Used internally, returns -1 for deflate, 1 for inflate. More...
 
bool negative () const
 Returns true if distance is negative. More...
 
template<typename JoinStrategy , typename EndStrategy >
NumericType max_distance (JoinStrategy const &join_strategy, EndStrategy const &end_strategy) const
 Returns the max distance distance up to the buffer will reach. More...
 
NumericType simplify_distance () const
 Returns the distance at which the input is simplified before the buffer process. More...
 

Detailed Description

template<typename NumericType>
class boost::geometry::strategy::buffer::distance_symmetric< NumericType >

Let the buffer algorithm create buffers with same distances.

Template Parameters
NumericType

This strategy can be used as DistanceStrategy for the buffer algorithm. It can be applied for all geometries. It uses one distance for left and for right. If the distance is negative and used with a (multi)polygon or ring, the geometry will shrink (deflate) instead of expand (inflate).

{ [heading Example] [buffer_distance_symmetric] [heading Output] [$img/strategies/buffer_distance_symmetric.png] [heading See also]

  • [link geometry.reference.algorithms.buffer.buffer_7_with_strategies buffer (with strategies)]
  • [link geometry.reference.strategies.strategy_buffer_distance_asymmetric distance_asymmetric] }

Constructor & Destructor Documentation

template<typename NumericType >
boost::geometry::strategy::buffer::distance_symmetric< NumericType >::distance_symmetric ( NumericType const &  distance)
inlineexplicit

Constructs the strategy, a distance must be specified.

Parameters
distanceThe distance (or radius) of the buffer

Member Function Documentation

template<typename NumericType >
template<typename Point >
NumericType boost::geometry::strategy::buffer::distance_symmetric< NumericType >::apply ( Point const &  ,
Point const &  ,
buffer_side_selector   
) const
inline
template<typename NumericType >
int boost::geometry::strategy::buffer::distance_symmetric< NumericType >::factor ( ) const
inline

Used internally, returns -1 for deflate, 1 for inflate.

References boost::geometry::strategy::buffer::distance_symmetric< NumericType >::negative().

template<typename NumericType >
template<typename JoinStrategy , typename EndStrategy >
NumericType boost::geometry::strategy::buffer::distance_symmetric< NumericType >::max_distance ( JoinStrategy const &  join_strategy,
EndStrategy const &  end_strategy 
) const
inline

Returns the max distance distance up to the buffer will reach.

References boost::geometry::math::abs(), and boost::accumulators::extract::max.

template<typename NumericType >
bool boost::geometry::strategy::buffer::distance_symmetric< NumericType >::negative ( ) const
inline
template<typename NumericType >
NumericType boost::geometry::strategy::buffer::distance_symmetric< NumericType >::simplify_distance ( ) const
inline

Returns the distance at which the input is simplified before the buffer process.

References boost::geometry::math::abs().


The documentation for this class was generated from the following file: