I want to extract a shapefile value at a particular location. The shapefile I am using is can be found here, downloaded by clicking Download IHO Sea Areas
. The shape file contains all the possible seas.
I can read it and plot it using:
require("maptools")
require(rgdal)
require(sp)
ogrListLayers("World_Seas.shp")
shape <- readOGR("World_Seas.shp", layer="World_Seas")
However, I would like to extract the sea value for a particular location, say
p <- c(-20, 40)