Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloaded data always contains only NaN #57

Closed
pepijn-devries opened this issue Nov 4, 2024 · 1 comment
Closed

Downloaded data always contains only NaN #57

pepijn-devries opened this issue Nov 4, 2024 · 1 comment

Comments

@pepijn-devries
Copy link

Running the example from the README page returns a terra SpatRaster object which contains only NaN values. This is shown by the regex below:

library(EMODnetWCS)
#> Loading ISO 19139 XML schemas...
#> Loading ISO 19115 codelists...

wcs <- emdn_init_wcs_client(service = "biology")
#> ✔ WCS client created succesfully
#> ℹ Service: <https://geo.vliz.be/geoserver/Emodnetbio/wcs>
#> ℹ Service: "2.0.1"

cov <- emdn_get_coverage(wcs, 
                         coverage_id = "Emodnetbio__cal_fin_19582016_L1_err",
                         bbox = c(xmin = 0, 
                                  ymin = 40, 
                                  xmax = 5, 
                                  ymax = 45),
                         nil_values_as_na = TRUE)
#> Loading required package: sf
#> Warning: package 'sf' was built under R version 4.3.3
#> Linking to GEOS 3.11.2, GDAL 3.8.2, PROJ 9.3.1; sf_use_s2() is FALSE
#> ── Downloading coverage "Emodnetbio__cal_fin_19582016_L1_err" ──────────────────
#> No encoding supplied: defaulting to UTF-8.
#> <GMLEnvelope>
#> ....|-- lowerCorner: 40 0 "1958-02-16T01:00:00"
#> ....|-- upperCorner: 45 5 "2016-11-16T01:00:00"Start tag expected, '<' not found
#> 
#> ✔ Coverage "Emodnetbio__cal_fin_19582016_L1_err" downloaded succesfully as a
#>        terra <SpatRaster>
#> ✔ nil values 9.96920996838687e+36 converted to NA on all bands.

cov[[1]] |> terra::values() |> is.nan() |> all()
#> [1] TRUE

Created on 2024-11-04 with reprex v2.0.2

I've tried other services and layers as well with the same result. Am I doing something wrong, or is this a bug?

Pepijn

@pepijn-devries
Copy link
Author

This is actually not an issue, I was looking at the wrong layer. I do have another issue for which I will open an new report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant