I'd like to plot the distribution of a species on a map of Switzerland, following this tutorial.
library(maps)
library(mapdata)
map('worldHires', 'Switzerland', xlim=c(5, 12), ylim=c(45,48))
From this website I download the shapefile for e.g. Pinus sylvestris
psylvestris <- readShapePoly("Pinus sylvestris.shp")
I want to add the range to the map:
plot(psylvestris, add=TRUE, xlim=c(5, 12), ylim=c(45,48))
But I do not see anything (other than the map).. It appears to me the coordinates might be given in a different system (?)
> psylvestris
class : SpatialPolygonsDataFrame
features : 52
extent : -1202142, 4710481, -925131.2, 6334053 (xmin, xmax, ymin, ymax)
coord. ref. : NA
variables : 1
names : Id
min values : 0
max values : 0
Unfortunately I do not know anything about spatial analysis and thus I have no idea how to fix this. Can you help me please?