I have a series of longitude and latitude coordinates which represent a building outline



...(intermediate points not listed)...


How can I work out the midpoint?

I've found tutorials that show how to do it if you've got three coordinates (e.g. Link), but in many cases I've got more than three.


5 Answers 5


With coordinates that close to each other, you can treat the Earth as being locally flat and simply find the centroid as though they were planar coordinates. Then you would simply take the average of the latitudes and the average of the longitudes to find the latitude and longitude of the centroid.

As @whuber points out, the above method would not work unless the building is a rectangle or a regular polygon. For an arbitrary shape, the formula here gives the correct result.


If you want the center of the building which is outlined by a polygon, then don't take the mean of vertices. This is obviously wrong. You need instead to compute the centroid of the polygon itself. For the formula, see


I agree with earlier posters: you can treat latitude and longitude as Cartesian coordinates because the building is small and it's far from a pole and from the international date line.


Convert from geographic coordinates to geocentric, average the geocentric vectors, then convert back to geographic.


The centroid of finitely many points is simply the arithmetic mean of each of the coordinates. So just sum up the latitudes and longitudes and divide by the number of points.


If you're working over larger ranges, you need spherical interpolation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.