-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding hazard warnings to paths #7
Comments
Just a quick note about what's currently implemented at https://map.atownsend.org.uk/maps/map/map.html :
|
Just to link to a few other things: This is a diary entry that discusses some of this. There's a comment on that that links to https://wiki.openstreetmap.org/wiki/United_States/Trail_Access_Project#Suggested_Tagging and discusses how this maps align with those suggestions. There is a related discussion about "obstacle" here |
(not directly hazard but) this is definitely worth a read. |
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:
I thought there were potentially two types of annotation which could be used to make these clearer:
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.
The text was updated successfully, but these errors were encountered: