Skip to content

feat: support returnDistinctValues #233

@jmackenzieGA

Description

@jmackenzieGA

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():
! x must be a vector
Run rlang::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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions