| Home | Libraries | People | FAQ | More

##### perimeter (with strategy)

Calculates the perimeter of a geometry using the specified strategy.

###### Description

The function perimeter returns the perimeter of a geometry, using specified strategy

###### Synopsis

    template<typename Geometry, typename Strategy>
    default_length_result<Geometry>::type perimeter(Geometry const & geometry, Strategy const & strategy)

###### Parameters

Type | Concept | Name | Description
--- | --- | --- | ---
Geometry const & | Any type fulfilling a Geometry Concept | geometry | A model of the specified concept
Strategy const & | Any type fulfilling a distance Strategy Concept | strategy | strategy to be used for distance calculations.

###### Returns

The calculated perimeter

###### Header

Either

`#include <boost/geometry/geometry.hpp>`

Or

`#include <boost/geometry/algorithms/perimeter.hpp>`

###### Behavior

Case | Behavior
--- | ---
pointlike (e.g. point) | Returns zero
linear (e.g. linestring) | Returns zero
areal (e.g. polygon) | Returns the perimeter

###### Complexity

Linear