USEPA / elevatr

An R package for accessing elevation data
Other
203 stars 26 forks source link

gdal_utils warp error #59

Closed jhollist closed 3 years ago

jhollist commented 3 years ago

This errors:

get_elev_point(data.frame(x = c(20,20,-20,-20), y = c(20,-20,20,-20)), src = "aws", z = 7, prj = "EPSG:4326")

These don't:

get_elev_point(data.frame(x = c(10,10,-10,-10), y = c(10,-10,10,-10)), src = "aws", z = 7, prj = "EPSG:4326")
get_elev_point(data.frame(x = c(20,20,-20,-20), y = c(20,-20,20,-20)), src = "aws", z = 6, prj = "EPSG:4326")
Wangxslovebasketball commented 3 years ago

ext_sample <- extent(70,105,25,45) bg_init <- raster(ext = ext_sample, resolution = 0.01) bg_rst <- get_elev_raster(bg_init, z = 5)

error: Mosaicing & Projecting Error in sf::gdal_utils(util = "warp", source = files, destination = destfile, : gdal_utils warp: an error occured

I can't search for the same error like this.

jhollist commented 3 years ago

Thanks for this. Still need to look at this and will do so next time I get back to elevart

jhollist commented 3 years ago

Something with furrr and tempfiles seems to be the culprit. Running my example above with serial = TRUE seems to fix the issue.

jhollist commented 3 years ago

Figured this one out. Larger areas, would make requests in parallel with furrr. When I changed everything back to a single processor the temporary files got lost and the warp failed.