|  | 
| template<typename Geometry , typename Point , typename Strategy > | 
| void | boost::geometry::centroid (Geometry const &geometry, Point &c, Strategy const &strategy) | 
|  | Calculates the centroid of a geometry using the specified strategy.  More... 
 | 
|  | 
| template<typename Geometry , typename Point > | 
| void | boost::geometry::centroid (Geometry const &geometry, Point &c) | 
|  | Calculates the centroid of a geometry.  More... 
 | 
|  | 
| template<typename Point , typename Geometry > | 
| Point | boost::geometry::return_centroid (Geometry const &geometry) | 
|  | Calculates the centroid of a geometry.  More... 
 | 
|  | 
| template<typename Point , typename Geometry , typename Strategy > | 
| Point | boost::geometry::return_centroid (Geometry const &geometry, Strategy const &strategy) | 
|  | Calculates the centroid of a geometry using the specified strategy.  More... 
 | 
|  | 
template<typename Geometry , typename Point > 
      
        
          | void boost::geometry::centroid | ( | Geometry const & | geometry, | 
        
          |  |  | Point & | c | 
        
          |  | ) |  |  | 
      
 
Calculates the centroid of a geometry. 
The free function centroid calculates the geometric center (or: center of mass) of a geometry. It uses the default strategy, based on the coordinate system of the geometry. 
- Template Parameters
- 
  
    | Geometry | Any type fulfilling a Geometry Concept |  | Point | Any type fulfilling a Point Concept |  
 
- Parameters
- 
  
    | geometry | A model of the specified concept |  | c | The calculated centroid will be assigned to this point reference |  
 
 
 
template<typename Point , typename Geometry > 
      
        
          | Point boost::geometry::return_centroid | ( | Geometry const & | geometry | ) |  | 
      
 
Calculates the centroid of a geometry. 
The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the return_ prefix returns the centroid, and a template parameter must therefore be specified in the call.. 
- Template Parameters
- 
  
    | Point | Any type fulfilling a Point Concept |  | Geometry | Any type fulfilling a Geometry Concept |  
 
- Parameters
- 
  
    | geometry | A model of the specified concept |  
 
- Returns
- The calculated centroid
 
 
template<typename Point , typename Geometry , typename Strategy > 
      
        
          | Point boost::geometry::return_centroid | ( | Geometry const & | geometry, | 
        
          |  |  | Strategy const & | strategy | 
        
          |  | ) |  |  | 
      
 
Calculates the centroid of a geometry using the specified strategy. 
The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the return_ prefix returns the centroid, and a template parameter must therefore be specified in the call.. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation. 
- Template Parameters
- 
  
    | Point | Any type fulfilling a Point Concept |  | Geometry | Any type fulfilling a Geometry Concept |  | Strategy | Any type fulfilling a centroid Strategy Concept |  
 
- Parameters
- 
  
    | geometry | A model of the specified concept |  | strategy | The strategy which will be used for centroid calculations |  
 
- Returns
- The calculated centroid