How to use it
- Draw a shape on the map, place points, paste coordinates one per line, or open a GeoJSON, KML or GPX file.
- Read the three centres: the centroid of the area, the mean of the points and the centre of the bounding box.
- Click a value to copy it. The pins on the map show the three centres.
5 practical uses
- Find the centre of a plot, a field or a lake for a marker or a label.
- Find the middle of a set of customer locations for a depot or a shop.
- Place a map label at the centre of an area.
- Find the centre of a search area or a survey grid.
- Check the centroid a GIS tool reports.
The maths behind it
The centroid of a polygon is C = (1/6A) Σ (pᵢ + pᵢ₊₁)(xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ) over its edges, where A is its signed area; for several polygons the centroids are weighted by area. The mean of a set of points is found by converting each to a unit vector in three dimensions, averaging, and converting back, which is correct across the date line. The bounding-box centre is the midpoint of the extreme coordinates.
Three centres
- Centroid: the centre of mass of the area, where a cut-out of the shape would balance. For a polygon this is the area centroid; for a set of points it is the same as the mean.
- Mean of the points: the average of the corner coordinates, computed on the sphere so it is right across the date line. A shape with many corners on one side pulls it that way.
- Centre of the bounding box: halfway between the extreme north and south, east and west.
The centroid of a crescent or a ring can fall outside the shape; that is correct. For several shapes the centroid is weighted by area. For a meeting point between people, see the midpoint calculator.