-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I get an error trying to convert a featureLayer to an sf object? Any suggestions?
library(arcgislayers)
url <- "https://mapprod3.environment.nsw.gov.au/arcgis/rest/services/Planning/EPI_Primary_Planning_Layers/MapServer/2"
fs <- arc_open(url)
ls <- list_fields(fs)
sf <- arc_select(fs, fields = c("LAY_NAME","LAY_CLASS"))
Error in
rlang::set_names():
!xmust be a vector
Runrlang::last_trace()to see where the error occurred.
I am able to create a featureLayer object from the featureServer URL, and I can list the field names. I tried using the 'fields' flag to limit what is read in, but there seems to be an issue with my featureLayer object when i run arc_select( )?
For this exercise, my goal is just to wrangle unique values from one field in the attribute table, but in general, I am hoping for a generic solution to wrangle all available features & attributes from a large collection of publicly available featureServer URLs.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status