ceff-tech / ffc_api_client

An R client for the online Functional Flows Calculator API
https://ceff-tech.github.io/ffc_api_client
9 stars 3 forks source link

layer 'NHDFlowline' not found in component 'NHDSnapshot' when getting gage COMID #12

Closed nickrsan closed 4 years ago

nickrsan commented 4 years ago

Ryan reports the following when the gage is trying to determine its COMID:

ffcAPIClient::evaluate_gage_alteration(gageNo, get_token())
Re-downloading http://www.horizon-systems.com/NHDPlusData/NHDPlusV21/Data/NHDPlusCA/NHDPlusV21_CA_18_NHDSnapshot_05.7z
  |======================================================| 100%
A local copy of http://www.horizon-systems.com/NHDPlusData/NHDPlusV21/Data/NHDPlusCA/NHDPlusV21_CA_18_NHDSnapshot_05.7z already exists on disk
Error in FUN(X[[i]], ...) : 
  layer 'NHDFlowline' not found in component 'NHDSnapshot'

I can't reproduce, even manually trying to remove the NHDFlowline layer - I'd thought it was triggered by an incomplete download, but the current version of the code forces redownload and extraction if it doesn't find the right number of items in the NHD package the first time through. Could be Mac-specific or something else. Ryan is probably going to reimplement the function that gets the COMID for a gage using nhdPlusTools instead of nhdR, which should hopefully resolve this issue.

nickrsan commented 4 years ago

We changed how we get NHD information entirely and no longer have this issue