Similarly to my previous question here, say I am plotting countries on a world map using maptools, if I were to plot a country, is there a way of finding the central point of this country and plotting a radial distance from this point? I am using the shapefile wrld_simpl
that comes with maptools
, so if I plot Germany:
plot(wrld_simpl[wrld_simpl$NAME=='Germany',], col='red', add=T)
I would want to find the centre of Germany and plot a circle from this point that shows any area that falls within say a 100km distance. Again I want to be able to do this for lots of different countries so I'd ideally want a general solution, not one specific to just Germany.