| Home | Libraries | People | FAQ | More

#### centroid_exception

Centroid Exception.

###### Description

The centroid_exception is thrown if the free centroid function is called with geometries for which the centroid cannot be calculated. For example: a linestring without points, a polygon without points, an empty multi-geometry.

###### Synopsis

    class centroid_exception
          : public exception
    {
      // ...
    };

###### Constructor(s)

Function | Description | Parameters
--- | --- | ---
    centroid_exception()

###### Member Function(s)

Function | Description | Parameters | Returns
--- | --- | --- | ---
    char const * what()

###### Header

Either

`#include <boost/geometry.hpp>`

Or

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

###### See also

- the centroid function