A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ropensci/FedData/issues/101 below:

Tree canopy data link issue with get_nlcd · Issue #101 · ropensci/FedData · GitHub

Hi -

When I run the following I get an error that the service is not available on the mrlc server:

library(FedData)
library(tidyverse)
library(sf)

station_mesowest <- tibble(surf_Latitude = 42.27056,
                           surf_Longitude = -71.87306,
                           surf_Elevation = 1007 * 0.3048)

sfc_station_point <-
  data.frame(long =  station_mesowest$surf_Longitude, lat =   station_mesowest$surf_Latitude) %>%
  st_as_sf(coords = c("long", "lat"), crs = 4326)

sfc_station <- sfc_station_point %>%
  st_buffer(dist = 5500)

tc_2016 <-
  get_nlcd(
    as(sfc_station, "Spatial"),
    dataset = "canopy",
    label = "canopy",
    extraction.dir = paste(rootDir, "preprocessed_data", sep = "/"),
    force.redo = T,
    year = 2016,
    raster.options =c("COMPRESS=NONE", "TFW=YES", "datatype=INT1U")
  )

The error is specifically:

Error in get_nlcd(as(sfc_station, "Spatial"), dataset = "canopy", label = "canopy",  : 
  No web coverage service at https://www.mrlc.gov/geoserver/mrlc_download/NLCD_2016_Tree_Canopy_L48/wcs. See available services at https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

I dig into the mrlc and it appears that the new link is now:

"https://www.mrlc.gov/geoserver/mrlc_download/nlcd_tcc_conus_2016_v2021-4/wcs?"

When I run get_nlcd in debug mode and switch the coverage in line 82 to:

coverage <- "nlcd_tcc_conus_2016_v2021-4" the function appears to work without complaint.

Other 2016 nlcd datasets do not appear to be impacted (e.g. landuse and impervious) at this time.

As noted in the source code the mrlc is oft-changing.
Thanks for developing and keeping up with this - FedData is such a great package!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4