Skip to content

Adding hazard warnings to paths #7

@SK53

Description

@SK53

Recent discussion on tagging reminded me that I'd made some very basic experimentation with ideas of how to add hazard warnings to a Carto-Csst style.

I was mainly interested in two types of paths:

  • Ones crossing tidal areas, such as the path to Hilbre. Often these have an elaborate warning in the name
  • SAC Scale 3 and above in mountainous areas. We know that Gordale Scar is the classic one to catch people out.

I thought there were potentially two types of annotation which could be used to make these clearer:

  • An international danger warning sign (see ISO 7010 on Wikipedia), repeated along the path at intervals. W001 would be the obvious first one to use, but W008 has potential for SAC Scale. I haven't found one for flood danger.
  • An explicit annotation along the path ("Beware of tides", "Nur fur schwindelfrei" or English equivalent, "Slippy when wet")

My very crude approach has been to create a separate hazard layer. This potentially allows ways to be merged so that a single symbol could be shown at smaller scales, as well as creating generic warning text (although this probably should be handled by LUA in the end).

I used "marker-placement: line" with a representative SVG triangle, and "text-placement:line" for the warning text. Both were given a transform to offset them from the line (preferably one on the other side of the line from any name or ref text). This is presumably similar to how you do walking routes, albeit cruder.

I actually cannabilised files I was using to try & add direction arrows on waterways, hence use of [waterway] in second part which contained "stream" or "river".

#hazard {
line-width:0;
line-color:white;

marker-placement: line;
marker-spacing: 150;
marker-height: 12;
marker-transform: translate(0,15), scale(2,2);
marker-file: url("symbols/triangle-stroked-15.svg");
marker-fill: #ff0000;
marker-max-error: 0.5;

text-name: "[waterway]";
text-face-name: 'Open Sans Bold';
text-size: 10;
text-placement: line;
text-spacing: 300;
text-dy: -10;
text-fill: #ff8800;

marker-fill: #aa0000;
}

I failed to find a way to get the triangle to always be upwards with the marker-placement which was where I left it.

Anyway thought I'd actually document these ideas in case you can see a way of taking them further.

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