EMODnet / EMODnetWCS

Access EMODnet Web Coverage Service data through R
https://emodnet.github.io/EMODnetWCS/
Other
6 stars 0 forks source link

Cannot get Bathimetry Error: [rast] cannot open this file as a SpatRaster #54

Closed pnogas67 closed 1 year ago

pnogas67 commented 1 year ago

Hi, I have been testing this code

library(EMODnetWCS)
library(terra)
library(sf)

emdn_wcs()

wcs <- emdn_init_wcs_client(service = "bathymetry")

info = emdn_get_wcs_info(wcs)

ids = emdn_get_coverage_ids(wcs)

pico_bath  <- emdn_get_coverage(wcs,
                 coverage_id = ids[1],
                 bbox = c(xmin = -29,
                          ymin = 38,
                          xmax = -27.5,
                          ymax = 39),
                 nil_values_as_na = TRUE )

and I always get the error: Error: [rast] cannot open this file as a SpatRaster: C:/Users/Pedro Nogueira/AppData/Local/Temp/RtmpgzgFyo/emodnet__mean_38,-29,39,-27.5.tif

Previously it was working fine. I tested it both in Mac and PC and all my libraries are updated. Any suggestions? Thanks, PN

pnogas67 commented 1 year ago

Solved. Now it is working again.