USEPA / elevatr

An R package for accessing elevation data
Other
202 stars 25 forks source link

`z = 15` does not seem to always work #102

Open courtiol opened 1 month ago

courtiol commented 1 month ago

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

Created on 2024-09-13 with reprex v2.1.1