rayshader-demo
rayshader-demo copied to clipboard
Error in file(con, "wb") : cannot open the connection
i want to download elevation data and run the under code get an error get_usgs_elevation_data(bbox, size = image_size$size, file = elev_file, sr_bbox = 4326, sr_image = 4326) how can resolve it? Error in file(con, "wb") : cannot open the connection In addition: Warning message: In file(con, "wb") :
Error in file(con, "wb") : cannot open the connection 3. file(con, "wb") 2. writeBin(img_bin, file) 1. get_usgs_elevation_data(bbox, size = image_size$size, file = elev_file, sr_bbox = 4326, sr_image = 4326)
I'm getting this error too @wcmbishop
For those that stumble upon this and are having this issue, make sure the path that you designate in file.path exists.
elev_file <- file.path("REAL_PATH_ON_YOUR_MACHINE_HERE", "sf-elevation.tif")
For example, ~/Dekstop
works for me.