Creating complex styles

Next, let's create some complex styling to visualize our main roads similar to the visualization we created in QGIS:

  1. Create a new style. Name it accordingly, and limit it to our workspace.
  2. Select the CSS option in the Format field.
  3. Generate a line template, save the style, reopen it, and preview it on our roads layer.
  4. Rewrite the rule as follows to show secondary roads, as they had a simple symbolizer:
        /* @title Important roads */        [fclass LIKE 'secondary%'] {         stroke: #8f9593;         stroke-width: 1;        }
  1. It's time to create the complex line styles. In SLD, we would have to create multiple <FeatureTypeStyle> elements to have multiple lines drawn on each other. In CSS, however, we can define multiple styles in a single definition ...

Get Practical GIS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.