Stephan Bösch-Plepelits
7 years ago
1 changed files with 125 additions and 0 deletions
@ -0,0 +1,125 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"de": "Radwegrichtungen", |
|||
"en": "Cycleway Directions" |
|||
}, |
|||
"query": { |
|||
"14": [ |
|||
"(", |
|||
"way[highway=cycleway];", |
|||
"way[cycleway];", |
|||
"way[\"cycleway:left\"];", |
|||
"way[\"cycleway:right\"];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set oneway = 0 %}", |
|||
"{% if tags.oneway in [ 'yes', '1' ] %}{% set oneway = 1 %}", |
|||
"{% elseif tags.oneway in [ '-1' ] %}{% set oneway = -1 %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% set driving_side = 'right' %}" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "line", |
|||
"styles": "default,left,right", |
|||
"style": { |
|||
"color": [ |
|||
"{% if tags.highway == 'cycleway' %}", |
|||
"#007f00", |
|||
"{% endif %}" |
|||
], |
|||
"text": [ |
|||
"{% if tags.highway == 'cycleway' and oneway == 1 %}", |
|||
"🡪 ", |
|||
"{% elseif tags.highway == 'cycleway' and oneway == -1 %}", |
|||
"🡨 ", |
|||
"{% elseif oneway == 1 and tags.cycleway in [ 'opposite' ] %}", |
|||
"🡨🡺 ", |
|||
"{% elseif oneway == 1 and not tags.cycleway and not attribute(tags, 'cycleway:left') and not attribute(tags, 'cycleway:right') and attribute(tags, 'oneway:bicycle') == 'no' %}", |
|||
"🡨🡺 ", |
|||
"{% elseif oneway == -1 and tags.cycleway in [ 'opposite' ] %}", |
|||
"🡸🡪 ", |
|||
"{% elseif oneway == 1 and not tags.cycleway and not attribute(tags, 'cycleway:left') and not attribute(tags, 'cycleway:right') and attribute(tags, 'oneway:bicycle') == 'no' %}", |
|||
"🡸🡪 ", |
|||
"{% elseif oneway == 1 %}", |
|||
"🡺 ", |
|||
"{% elseif oneway == -1 %}", |
|||
"🡸 ", |
|||
"{% endif %}", |
|||
"" |
|||
], |
|||
"textRepeat": "1" |
|||
}, |
|||
"style:highlight": null, |
|||
"style:left": { |
|||
"color": [ |
|||
"{% if tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_lane' ] %}", |
|||
"#00ff00", |
|||
"{% elseif tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_track' ] %}", |
|||
"#00af00", |
|||
"{% endif %}" |
|||
], |
|||
"offset": "-3", |
|||
"text": [ |
|||
"{% if attribute(tags, 'cycleway:left') in [ 'lane', 'shared_lane', 'track' ] %}", |
|||
"🡪 ", |
|||
"{% elseif attribute(tags, 'cycleway:left') in [ 'opposite_lane', 'opposite_track' ] %}", |
|||
"🡨 ", |
|||
"{% elseif driving_side == 'right' and oneway <= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}", |
|||
"🡪 ", |
|||
"{% elseif driving_side == 'left' and oneway >= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}", |
|||
"🡨 ", |
|||
"{% elseif driving_side == 'right' and oneway <= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}", |
|||
"🡨 ", |
|||
"{% elseif driving_side == 'left' and oneway >= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}", |
|||
"🡪 ", |
|||
"{% endif %}" |
|||
] |
|||
}, |
|||
"style:right": { |
|||
"color": [ |
|||
"{% if tags.cycleway in [ 'lane' ] or attribute(tags, 'cycleway:right') in [ 'lane', 'opposite_lane' ] %}", |
|||
"#00ff00", |
|||
"{% elseif tags.cycleway in [ 'track' ] or attribute(tags, 'cycleway:right') in [ 'track', 'opposite_track' ] %}", |
|||
"#00af00", |
|||
"{% endif %}" |
|||
], |
|||
"offset": "3", |
|||
"text": [ |
|||
"{% if attribute(tags, 'cycleway:right') in [ 'lane', 'shared_lane', 'track' ] %}", |
|||
"🡪 ", |
|||
"{% elseif attribute(tags, 'cycleway:right') in [ 'opposite_lane', 'opposite_track' ] %}", |
|||
"🡨 ", |
|||
"{% elseif driving_side == 'right' and oneway >= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}", |
|||
"🡪 ", |
|||
"{% elseif driving_side == 'left' and oneway <= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}", |
|||
"🡨 ", |
|||
"{% elseif driving_side == 'right' and oneway >= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}", |
|||
"🡨 ", |
|||
"{% elseif driving_side == 'left' and oneway <= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}", |
|||
"🡪 ", |
|||
"{% endif %}" |
|||
] |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"highway\": \"cycleway\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('highway', 'cycleway') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"cycleway\": \"track\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('cycleway', 'track') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"cycleway\": \"lane\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('cycleway', 'lane') }}</td>", |
|||
" </tr>", |
|||
"</table>" |
|||
] |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue