I try for a few days to find a way to work with the sf
package in R but with no success. I want to plot my region similarly to the example 2 from this example but without any points. I load my area as SpatialpolygonsDataFrame
and then I use the fortify to get the lat and long as follow:
area<-readOGR(dsn="/home/ubuntu/..",layer="area")
f_area<-fortify(area)
head(f_area)
long lat order hole piece id group
1 116.1045 57.23717 1 FALSE 1 0 0.1
2 116.1551 57.21548 2 FALSE 1 0 0.1
3 116.2420 57.14505 3 FALSE 1 0 0.1
4 116.1706 57.12011 4 FALSE 1 0 0.1
5 116.1222 57.12006 5 FALSE 1 0 0.1
6 116.0756 57.09926 6 FALSE 1 0 0.1
From this point I am very confused about what I have to do to get the result that I want.
Thank you for any help.