Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
buffer

Calculates the buffer of a geometry.

Description

The free function buffer calculates the buffer (a polygon being the spatial point set collection within a specified maximum distance from a geometry) of a geometry.

Synopsis

template<typename Input, typename Output, typename Distance>
void buffer(Input const & geometry_in, Output & geometry_out, Distance const & distance,
            Distance const & chord_length = -1)

Parameters

Type

Concept

Name

Description

Input const &

Any type fulfilling a Geometry Concept

geometry_in

A model of the specified concept

Output &

Any type fulfilling a Geometry Concept

geometry_out

A model of the specified concept

Distance const &

numerical type (int, double, ttmath, ...)

distance

The distance to be used for the buffer

Distance const &

numerical type (int, double, ttmath, ...)

chord_length

(optional) The length of the chord's in the generated arcs around points or bends

Header

Either

#include <boost/geometry.hpp>

Or

#include <boost/geometry/algorithms/buffer.hpp>

[Note] Note

This version without strategies enlarges a box. To buffer any geometry, use buffer (with strategies)

Behavior

Case

Behavior

Box/Box

Returns a new rectangular box, enlarged with the specified distance. It is allowed that "geometry_out" the same object as "geometry_in"


PrevUpHomeNext