这是我使用的代码,但是这些点未显示在地图上。
#load shapefile
shp<-shapefile("~acc.shp")
#convert lat/lon in excel file to spatial points
coords<- st_coord[, c("Longitude", "Latitude")]
data<-st_coord[, 1:6]
crs<-CRS("+init=epsg:32630")
spdf<-SpatialPointsDataFrame(coords = coords, data = data, proj4string = crs)
# check to ensure both df are in thesame projection
proj4string(spdf_utm)
proj4string(acc)
#plot shapefile
plot(shp)
#add spatial points
points(spdf$conc, col="red", cex =10)