Not sure why (I did not debug), but when increasing z from 14 to 15, I get a strange error message.
If z cannot go higher than 14 on some parts of the world, I think that a precheck may be helpful.
This is vietnam, but it may happen elsewhere, I did not check (it happened today during a course).
elevatr::get_elev_raster(locations = data.frame(x = c(107.3265, 107.4703),
y = c(11.40547, 11.52874)),
prj = "+proj=longlat +datum=WGS84 +no_defs",
z = 14)
#> Mosaicing & Projecting
#> Note: Elevation units are in meters.
#> class : RasterLayer
#> dimensions : 3543, 4132, 14639676 (nrow, ncol, ncell)
#> resolution : 4.254586e-05, 4.254586e-05 (x, y)
#> extent : 107.3145, 107.4903, 11.39388, 11.54462 (xmin, xmax, ymin, ymax)
#> crs : +proj=longlat +datum=WGS84 +no_defs
#> source : filee059223d00e4.tif
#> names : filee059223d00e4
elevatr::get_elev_raster(locations = data.frame(x = c(107.3265, 107.4703),
y = c(11.40547, 11.52874)),
prj = "+proj=longlat +datum=WGS84 +no_defs",
z = 15)
#> An AWS URL is invalid.
#> Note: Elevation units are in meters.
#> Error in attr(raster_elev, "sources") <- sources: attempt to set an attribute on NULL
Not sure why (I did not debug), but when increasing
z
from 14 to 15, I get a strange error message. Ifz
cannot go higher than 14 on some parts of the world, I think that a precheck may be helpful. This is vietnam, but it may happen elsewhere, I did not check (it happened today during a course).Created on 2024-09-13 with reprex v2.1.1