Skip to content

Style Rendering: Enable parallel line rendering #377

@josephbirkner

Description

@josephbirkner

To enable parallel line rendering, e.g. one solid plus one dashed line, we need rules with inclusive sub-rules and miter-offset. E.g. such a rule could look like this:

- type: Lane
  geometry: ["line"]
  all-of:  # new `all-of` as an alternative to `first-of`
  - color: red
    lateral-offset: 0.3  # Miter-based lateral shift
  - color: blue
    dashed: true
    offset: [-0.3, 0, 0]  # alternative to lateral-offset
    offset-type: miter    # 

Note: all-of and first-of shall be nestable to any oder/depth.

E.g.:

# Lane Boundary in natural style
  - type: .*_LaneGroup_Boundary_Parallel_Sequential
    filter: "showLaneBoundariesNatural == true"
    geometry: [line]
    first-of:
      - geometry: line
        filter: properties.type == 'LONG_DASHED_LINE'
        color: white
        dashed: true
        dash-length: 10
        opacity: 0.9
        width: 1.5  
      - geometry: line
        filter: properties.type == 'SINGLE_SOLID_LINE'
        color: white
        opacity: 0.9
        width: 1.5 
      - geometry: line
        filter: properties.type == 'SOLID_LINE_DASHED_LINE'
        all-of:
          - color: white
            lateral-offset: 2
            opacity: 0.9
            width: 1.5
          - color: white
            dashed: true
            opacity: 0.9
            width: 1.5   
            selectable: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    StylingTouches erdblick WASM style sheet processing.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions