I am trying to get the maximum depth (max_depth
) for a given lat and lot using this gebco (tiff file attached) and it keeps coming up with NA. In the past, this has worked so im not sure what is going wrong. The site
is used to also extract temperature and nutrient data from WOCE files and that works. Is there something that I am missing in my code?
library(raster)
bathy <- raster("gebco0.5.tif")
site <- cbind(125, -49)
extract(bathy, site)
# [,1]
# [1,] NA
show(bathy)
#class : RasterLayer
#dimensions : 360, 720, 259200 (nrow, ncol, ncell)
#resolution : 1, 1 (x, y)
#extent : 0, 720, 0, 360 (xmin, xmax, ymin, ymax)
#crs : NA
#source : gebco0.5.tif
#names : gebco0.5