Skip to content

Extract multi-layer symbols (overlay/casing) in gq_qgs_extract() #24

@NewGraphEnvironment

Description

@NewGraphEnvironment

Problem

gq_qgs_extract() detects multi-layer symbols in singleSymbol renderers but only extracts the first layer, logging a note like "3 symbol layers — overlay/casing may apply".

This loses overlay effects like:

  • Railway: black base line + white dashed overlay (3 symbol layers)
  • Road casing: wide grey line + narrow colored line
  • Wetland: fill + hatching overlay

The categorizedSymbol parser already handles 2-layer casing (lines 242-257 in gq_qgs_extract.R), but parse_single_symbol does not.

Current behavior

reg$layers$railway
#> $stroke: list(color = "#000000", width = 0.4)
#> $note: "3 symbol layers — overlay/casing may apply"

Expected behavior

reg$layers$railway
#> $stroke: list(color = "#000000", width = 0.4)
#> $overlay: list(color = "#ffffff", width = 0.2, dash = "4 2")

The registry schema already defines overlay (documented in CLAUDE.md) but it's never populated by the extractor.

Proposed Solution

Extend parse_single_symbol() to extract additional symbol layers into overlay and/or casing fields, matching the pattern already used in the categorized parser.

Relates to #23

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions