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

Support for Symbology #106

Open
defuneste opened this issue Nov 27, 2023 · 1 comment
Open

Support for Symbology #106

defuneste opened this issue Nov 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@defuneste
Copy link

Currently the tool seems great to interact with data but has no support for symbology (or did I miss it?).

Will it be possible to:

  1. access shapefile and/or file geodatabase symbology
  2. set it if needed

Describe the solution you'd like
No specific idea on how it could be implemented. It could be a new function or it could be part of get_layer() family functions.

@defuneste defuneste added the enhancement New feature or request label Nov 27, 2023
@elipousson
Copy link
Contributor

For MapServer layers, the data on default rendering rules is included in the metadata loaded when you access a layer with arc_open() but I'm not sure whether the existing functions could support updating that data or not. Reprex below for reference.

Likely outside the scope of this package, but I've been thinking that some translator that can switch from this ArcGIS style specification, the QSS file format used by QGIS, and a {ggplot2} aesthetic mapping could be a handy utility.

library(arcgislayers)

url <- "https://geodata.baltimorecity.gov/egis/rest/services/CitiMap/DOT_Layers/MapServer/5"

data <- arc_open(url)

str(data$drawingInfo$renderer)
#> List of 8
#>  $ type            : chr "uniqueValue"
#>  $ field1          : chr "FAC_TYPE"
#>  $ field2          : NULL
#>  $ field3          : NULL
#>  $ defaultSymbol   : NULL
#>  $ defaultLabel    : NULL
#>  $ uniqueValueInfos:'data.frame':    8 obs. of  4 variables:
#>   ..$ symbol     :List of 8
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 112 168 0 255
#>   .. .. ..$ width: num 2.25
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 0 0 0 0
#>   .. .. ..$ width: int 0
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 112 168 0 255
#>   .. .. ..$ width: int 2
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 76 230 0 255
#>   .. .. ..$ width: num 1.5
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 0 230 169 255
#>   .. .. ..$ width: num 3.75
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 230 152 0 255
#>   .. .. ..$ width: num 2.25
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSDash"
#>   .. .. ..$ color: int [1:4] 0 115 76 255
#>   .. .. ..$ width: num 0.4
#>   .. ..$ :List of 4
#>   .. .. ..$ type : chr "esriSLS"
#>   .. .. ..$ style: chr "esriSLSSolid"
#>   .. .. ..$ color: int [1:4] 76 115 0 255
#>   .. .. ..$ width: int 2
#>   ..$ value      : chr [1:8] "BIKE BOULEVARD" "BIKE LANE" "CONTRAFLOW" "SHARE THE ROAD" ...
#>   ..$ label      : chr [1:8] "BIKE BOULEVARD" "BIKE LANE" "CONTRAFLOW" "SHARE THE ROAD" ...
#>   ..$ description: chr [1:8] "" "" "" "" ...
#>  $ fieldDelimiter  : chr ","

Created on 2023-11-29 with reprex v2.0.2

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

No branches or pull requests

2 participants