...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
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.
class centroid_exception : public exception { // ... };
Function |
Description |
Parameters |
---|---|---|
centroid_exception()
|
Function |
Description |
Parameters |
Returns |
---|---|---|---|
char const * what()
|
Either
#include <boost/geometry.hpp>
Or
#include <boost/geometry/algorithms/centroid.hpp>