15

I need a list of the central points for all countries:

China: lat/long (coordinates of the most central point in China)
France: lat/long (coordinates of the most central point in France)
etc...

14

Frank Donnelly provides a CSV file of country centroids that's based on data taken from the GeoNames Server, but hand curated by Frank. The data was last updated in February 2012.

-- EDIT May 2018 The former source isn't available anymore, here is a newer one, with lots of infos on the countries (incl. Centroids), and possibility to download the data in several formats. https://worldmap.harvard.edu/data/geonode:country_centroids_az8

There's also a similar question over at Stackoverflow: Need a list of all countries in the world, with a longitude and latitude coordinate, which includes a couple of approaches for generating such a list from other data sources.

4

I put together a CSV file a couple of years ago called 'Countries of the World'. It contains the area centroid and bounding box for each country in the world.

http://www.opengeocode.org/download.php#cow

  • 1
    Unfortunately, link is now a 404 – toms Jun 23 '17 at 21:50
4

You can retrieve this information using R like this:

library(rgeos)
library(rworldmap)

# get world map
  wmap <- getMap(resolution="high")

# get centroids
 centroids <- gCentroid(wmap, byid=TRUE)

# get a data.frame with centroids
  df <- as.data.frame(centroids)
  head(df)

#>                     x         y
#> Aruba       -69.97345  12.51678
#> Afghanistan  66.00845  33.83627
#> Angola       17.53646 -12.29118
#> Anguilla    -63.06082  18.22560
#> Albania      20.05399  41.14258
#> Aland        20.03715  60.20733

# plot
  plot(centroids)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.