# See road base casing
id: barrier-base-casing
source: spirit
source-layer: barriers
type: line
filter:
  - any
  - - all # Allow certain classifications to appear when they are included in the source
    - - in
      - [get, barrier]
      - - literal
        - - wall
          - hedge
  - - all
    - [==, [get, barrier], service]
    - [==, [get, minor], null]
    - [">=", [zoom], 14]
  - - all
    - [==, [get, barrier], service]
    - [">=", [zoom], 15]
  - - all
    - - in
      - [get, barrier]
      - - literal
        - - footway
          - cycleway
    - [">=", [zoom], 15]
paint:
  line-color:
    - match
    - [get, barrier]
    - wall
    - '#494d43' # lch(32,6,120)
    - hedge
    - '#76875b' # lch(54,25,120)
    - red
  line-width:
    - interpolate
    - - exponential
      - 1.35
    - - zoom
    - 12
    - - match
      - [get, barrier]
      - wall
      - .2
      - hedge
      - .2
      - service
      - - match
        - [to-string, [get, minor]]
        - "true"
        - 0.5
        - 1
      - footway
      - .2
      - cycleway
      - .2
      - 1.5
    - 20
    - - match
      - [get, barrier]
      - wall
      - 5
      - hedge
      - 3
      - service
      - - match
        - [to-string, [get, minor]]
        - "true"
        - 10
        - 14
      - footway
      - 4
      - cycleway
      - 4
      - 20
layout:
  line-cap: round
  line-sort-key:
    - +
    - [get, z_order]
    - - '*'
      - [get, layer]
      - 1000
