Reputation: 13
i have a txt data where each line is one lightning with lat, lon and intensity, i want to plot this upper a shapefile (polygon).
I cant read the shapefile, and i dont know how to plot the data upper the shapefile, anyone can help me? Maybe with some idea ..
Upvotes: 1
Views: 260
Reputation: 70643
Package sp
is your friend here.
library(sp)
data(meuse)
str(meuse)
coordinates(meuse) <- ~ x + y
plot(meuse)
You could also could give package sf
a try. See vignettes.
Upvotes: 1