Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setwd("~/R/maps")
- ukgrid = "+init=epsg:27700"
- latlong = "+init=epsg:4326"
- holes <- read.csv("Pothole_Enquiries_2016.csv", header = TRUE)
- map <- readRDS("GBR_adm2.rds")
- plot(map, col = 'grey', border = 'darkgrey')
- holes <- subset(holes, select = c("EASTING","NORTHING"))
- holes$holes_ID <- 1:nrow(holes)
- coords <- cbind(EASTING = as.numeric(as.character(holes$EASTING)),NORTHING = as.numeric(as.character(holes$NORTHING)))
- holes_SP <- SpatialPointsDataFrame(coords, data = data.frame(holes$holes_ID), proj4string = CRS("+init=epsg:27700")
- holes_SP_LL <- spTransform(holes_SP, CRS(latlong))
- points(holes_SP_LL,col=2,pch=18)
Add Comment
Please, Sign In to add comment