# load NW Atlantic data and convert to class bathy
data(nw.atlantic)
atl <- as.bathy(nw.atlantic)
# create vectors of latitude and longitude
lon <- c(-70, -65, -63, -55)
lat <- c(33, 35, 40, 37)
# a simple example
plot(atl, lwd=.5)
points(lon,lat,pch=19,col=2)
# Use get.depth to get the depth for each point
get.depth(atl, x=lon, y=lat, locator=FALSE)
# alternativeley once the map is plotted, use the iteractive mode:
if (FALSE) {
get.depth(atl, locator=TRUE, pch=19, col=3)
}
# click several times and press Escape
Run the code above in your browser using DataLab