forked from OpenStreetBrowser/main
Compare commits
merge into: javierru:master
javierru:aboriginal_lands
javierru:bug-43
javierru:buildings
javierru:climbing
javierru:cycle_infrastructure
javierru:filter
javierru:fitness_trail
javierru:fossil
javierru:heritage
javierru:leisure-restruct
javierru:master
javierru:maxspeed
javierru:office
javierru:pattern
javierru:places
javierru:pt
javierru:railway-electrification
javierru:shop-bulk_purchase
OpenStreetBrowser:aboriginal_lands
OpenStreetBrowser:bug-43
OpenStreetBrowser:buildings
OpenStreetBrowser:climbing
OpenStreetBrowser:cycle_infrastructure
OpenStreetBrowser:cycleway
OpenStreetBrowser:filter
OpenStreetBrowser:fitness_trail
OpenStreetBrowser:fossil
OpenStreetBrowser:heritage
OpenStreetBrowser:leisure-restruct
OpenStreetBrowser:master
OpenStreetBrowser:maxspeed
OpenStreetBrowser:office
OpenStreetBrowser:osm-qa
OpenStreetBrowser:parking-lanes
OpenStreetBrowser:pattern
OpenStreetBrowser:pedestrian
OpenStreetBrowser:places
OpenStreetBrowser:pt
OpenStreetBrowser:railway-electrification
OpenStreetBrowser:railway-rails
OpenStreetBrowser:shop-bulk_purchase
OpenStreetBrowser:sidewalks-category
pull from: javierru:cycle_infrastructure
javierru:aboriginal_lands
javierru:bug-43
javierru:buildings
javierru:climbing
javierru:cycle_infrastructure
javierru:filter
javierru:fitness_trail
javierru:fossil
javierru:heritage
javierru:leisure-restruct
javierru:master
javierru:maxspeed
javierru:office
javierru:pattern
javierru:places
javierru:pt
javierru:railway-electrification
javierru:shop-bulk_purchase
OpenStreetBrowser:aboriginal_lands
OpenStreetBrowser:bug-43
OpenStreetBrowser:buildings
OpenStreetBrowser:climbing
OpenStreetBrowser:cycle_infrastructure
OpenStreetBrowser:cycleway
OpenStreetBrowser:filter
OpenStreetBrowser:fitness_trail
OpenStreetBrowser:fossil
OpenStreetBrowser:heritage
OpenStreetBrowser:leisure-restruct
OpenStreetBrowser:master
OpenStreetBrowser:maxspeed
OpenStreetBrowser:office
OpenStreetBrowser:osm-qa
OpenStreetBrowser:parking-lanes
OpenStreetBrowser:pattern
OpenStreetBrowser:pedestrian
OpenStreetBrowser:places
OpenStreetBrowser:pt
OpenStreetBrowser:railway-electrification
OpenStreetBrowser:railway-rails
OpenStreetBrowser:shop-bulk_purchase
OpenStreetBrowser:sidewalks-category
8 Commits
master
...
cycle_infr
3 changed files with 255 additions and 0 deletions
@ -0,0 +1,251 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"query": { |
|||
"14": [ |
|||
"(", |
|||
"way[highway=cycleway];", |
|||
")" |
|||
], |
|||
"16": [ |
|||
"(", |
|||
"way[highway][highway~'^(primary(_link)?|secondary(_link)?|tertiary(_link)?|unclassified|residential|living_street|cycleway|track|road)$'][bicycle!=no];", |
|||
"way[bicycle~'^(yes|designated)$'];", |
|||
"way[cycleway];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set forward = false %}", |
|||
"{% set backward = false %}", |
|||
"{% set cycleway = tags.cycleway|split(';') %}", |
|||
"{% set road_type = const[tags.highway] ? tags.highway : 'shared_lane' %}", |
|||
"{% if tags.bicycle_road and tags.bicycle_road != 'no' %}{% set road_type = 'bicycle_road' %}{% endif %}", |
|||
"{% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %}", |
|||
"{% if tags.highway == 'path' and tags.bicycle == 'designated' %}{% set road_type = 'cycleway' %}{% endif %}", |
|||
"{% if oneway in ['yes', '1'] %}{% set forward = road_type %}{% elseif oneway in ['-1'] %}{% set backward = road_type %}{% else %}{% set forward = road_type %}{% set backward = road_type %}{% endif %}", |
|||
"{% for c in cycleway %}", |
|||
" {% if c in ['opposite', 'opposite_lane'] %}{% set backward = c|slice(9)|default(road_type) %}{% endif %}", |
|||
" {% if c in ['opposite_track'] %}{% set backward = 'cycleway' %}{% endif %}", |
|||
" {% if c == 'track' %}{% set c = 'cycleway' %}{% endif %}", |
|||
" {% if const[c] %}{% if oneway in ['yes', '1', '-1'] %}{% set forward = c %}{% else %}{% set forward = c %}{% set backward = c %}{% endif %}{% endif %}", |
|||
"{% endfor %}", |
|||
"", |
|||
"{% set left = false %}{% set right = false %}", |
|||
"{% set left_direction = 'forward' %}{% set right_direction = 'forward' %}", |
|||
"{% if attribute(tags, 'cycleway:left') %}", |
|||
" {% set left = attribute(tags, 'cycleway:left') %}", |
|||
" {% if left in ['opposite_lane'] %}", |
|||
" {% set left = 'lane' %}{% set left_direction = 'backward' %}", |
|||
" {% elseif left in ['opposite_track'] %}", |
|||
" {% set left = 'cycleway' %}{% set left_direction = 'backward' %}", |
|||
" {% elseif left in ['track'] %}", |
|||
" {% set left = 'cycleway' %}", |
|||
" {% elseif left in ['no'] %}", |
|||
" {% set left = 'shared_lane' %}", |
|||
" {% endif %}", |
|||
" {% if attribute(tags, 'cycleway:left:oneway') == 'no' %}", |
|||
" {% set left_direction = 'both' %}", |
|||
" {% elseif attribute(tags, 'cycleway:left:oneway') == '-1' %}", |
|||
" {% set left_direction = 'backward' %}", |
|||
" {% endif %}", |
|||
"{% elseif attribute(tags, 'cycleway:right') and (not oneway or oneway == 'no') %}", |
|||
" {% set left = 'shared_lane' %}", |
|||
"{% endif %}", |
|||
"{% if attribute(tags, 'cycleway:right') %}", |
|||
" {% set right = attribute(tags, 'cycleway:right') %}", |
|||
" {% if right in ['opposite_lane'] %}", |
|||
" {% set right = 'lane' %}{% set right_direction = 'backward' %}", |
|||
" {% elseif right in ['opposite_track'] %}", |
|||
" {% set right = 'cycleway' %}{% set right_direction = 'backward' %}", |
|||
" {% elseif right in ['track'] %}", |
|||
" {% set right = 'cycleway' %}", |
|||
" {% elseif right in ['no'] %}", |
|||
" {% set right = 'shared_lane' %}", |
|||
" {% endif %}", |
|||
" {% if attribute(tags, 'cycleway:right:oneway') == 'no' %}", |
|||
" {% set right_direction = 'both' %}", |
|||
" {% elseif attribute(tags, 'cycleway:right:oneway') == '-1' %}", |
|||
" {% set right_direction = 'backward' %}", |
|||
" {% endif %}", |
|||
"{% elseif attribute(tags, 'cycleway:left') and (not oneway or oneway == 'no') %}", |
|||
" {% set right = 'shared_lane' %}", |
|||
"{% endif %}" |
|||
], |
|||
"body": [ |
|||
"{{ keyTrans('highway') }}: {{ tagTrans('highway', tags.highway) }}<br>", |
|||
"{% if tags.cycleway %}{{ keyTrans('cycleway') }}: {% for c in cycleway %}{{ tagTrans('cycleway', c) }} {% endfor %}<br>{% endif %}", |
|||
"{% if tags.surface %}{{ keyTrans('surface') }}: {{ tagTrans('surface', tags.surface) }}<br>{% endif %}" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "line", |
|||
"styles": [ |
|||
"default,{% if left or right %}", |
|||
" {% if left and left_direction == 'both' %},left_both{% elseif left %},left{% endif %}", |
|||
" {% if right and right_direction == 'both' %},right_both{% elseif right %},right{% endif %}", |
|||
"{% else %}", |
|||
" {% if forward and backward and forward == backward %}main{% else %}{% if forward %},forward{% endif %}{% if backward %},backward{% endif %}{% endif %}", |
|||
"{% endif %}" |
|||
], |
|||
"style": { |
|||
"color": "#00000000", |
|||
"width": "6" |
|||
}, |
|||
"style:main": { |
|||
"color": "{{ const[forward].color }}", |
|||
"fill": "{% if tags.area == 'yes' %}true{% else %}false{% endif %}", |
|||
"width": "{% if tags.area == 'yes' %}0{% else %}{{ const[forward].width }}{% endif %}" |
|||
}, |
|||
"style:forward": { |
|||
"width": "0", |
|||
"fill": "false", |
|||
"pattern": "arrowHead", |
|||
"pattern-offset": "29", |
|||
"pattern-repeat": "60", |
|||
"pattern-polygon": "true", |
|||
"pattern-pixelSize": "9", |
|||
"pattern-angleCorrection": "0", |
|||
"pattern-path-width": "0", |
|||
"pattern-path-color": "{{ const[forward].color }}", |
|||
"pattern-path-fillOpacity": "1", |
|||
"pattern-lineOffset": "0", |
|||
"pattern2": "dash", |
|||
"pattern2-offset": "13", |
|||
"pattern2-repeat": "60", |
|||
"pattern2-pixelSize": "22", |
|||
"pattern2-path-width": "{{ const[forward].width }}", |
|||
"pattern2-path-color": "{{ const[forward].color }}", |
|||
"pattern2-lineOffset": "0", |
|||
"pattern2-path-lineCap": "butt", |
|||
"pattern2-path-fillOpacity": "1" |
|||
}, |
|||
"style:backward": { |
|||
"width": "0", |
|||
"fill": "false", |
|||
"pattern": "arrowHead", |
|||
"pattern-offset": "31", |
|||
"pattern-repeat": "60", |
|||
"pattern-polygon": "true", |
|||
"pattern-pixelSize": "9", |
|||
"pattern-angleCorrection": "180", |
|||
"pattern-path-width": "0", |
|||
"pattern-path-color": "{{ const[backward].color }}", |
|||
"pattern-path-fillOpacity": "1", |
|||
"pattern-lineOffset": "0", |
|||
"pattern2": "dash", |
|||
"pattern2-offset": "47", |
|||
"pattern2-repeat": "60", |
|||
"pattern2-pixelSize": "22", |
|||
"pattern2-path-width": "{{ const[backward].width }}", |
|||
"pattern2-path-color": "{{ const[backward].color }}", |
|||
"pattern2-lineOffset": "0", |
|||
"pattern2-path-lineCap": "butt", |
|||
"pattern2-path-fillOpacity": "1" |
|||
}, |
|||
"style:left_both": { |
|||
"width": "{{ const[left].width }}", |
|||
"color": "{{ const[left].color }}", |
|||
"offset": "{{ -1 - const[left].width / 2 }}" |
|||
}, |
|||
"style:left": { |
|||
"width": "0", |
|||
"fill": "false", |
|||
"pattern": "arrowHead", |
|||
"pattern-offset": "{{ left_direction == 'forward' ? 29 : 1 }}", |
|||
"pattern-repeat": "60", |
|||
"pattern-polygon": "true", |
|||
"pattern-pixelSize": "9", |
|||
"pattern-angleCorrection": "{{ left_direction == 'forward' ? 0 : 180 }}", |
|||
"pattern-path-width": "0", |
|||
"pattern-path-color": "{{ const[left].color }}", |
|||
"pattern-path-fillOpacity": "1", |
|||
"pattern-lineOffset": "{{ -1 - const[left].width / 2 }}", |
|||
"pattern2": "dash", |
|||
"pattern2-offset": "{{ left_direction == 'forward' ? 13 : 17 }}", |
|||
"pattern2-repeat": "60", |
|||
"pattern2-pixelSize": "22", |
|||
"pattern2-path-width": "{{ const[left].width }}", |
|||
"pattern2-path-color": "{{ const[left].color }}", |
|||
"pattern2-lineOffset": "{{ -1 - const[left].width / 2 }}", |
|||
"pattern2-path-lineCap": "butt", |
|||
"pattern2-path-fillOpacity": "1" |
|||
}, |
|||
"style:right": { |
|||
"width": "0", |
|||
"fill": "false", |
|||
"pattern": "arrowHead", |
|||
"pattern-offset": "{{ right_direction == 'forward' ? 59 : 31 }}", |
|||
"pattern-repeat": "60", |
|||
"pattern-polygon": "true", |
|||
"pattern-pixelSize": "9", |
|||
"pattern-angleCorrection": "{{ right_direction == 'forward' ? 0 : 180 }}", |
|||
"pattern-path-width": "0", |
|||
"pattern-path-color": "{{ const[right].color }}", |
|||
"pattern-path-fillOpacity": "1", |
|||
"pattern-lineOffset": "{{ 1 + const[right].width / 2 }}", |
|||
"pattern2": "dash", |
|||
"pattern2-offset": "{{ right_direction == 'forward' ? 43 : 47 }}", |
|||
"pattern2-repeat": "60", |
|||
"pattern2-pixelSize": "22", |
|||
"pattern2-path-width": "{{ const[right].width }}", |
|||
"pattern2-path-color": "{{ const[right].color }}", |
|||
"pattern2-lineOffset": "{{ 1 + const[right].width / 2 }}", |
|||
"pattern2-path-lineCap": "butt", |
|||
"pattern2-path-fillOpacity": "1" |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
"{% for key, value in const if not value.info_hide %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({'width': value.width, 'color': value.color})|raw }}</div></td>", |
|||
" <td>{{ tagTrans(value.trans_tag|default('highway'), key) }}</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"</table>" |
|||
], |
|||
"const": { |
|||
"cycleway": { |
|||
"width": "2", |
|||
"color": "#0000ff" |
|||
}, |
|||
"track": { |
|||
"width": "2", |
|||
"color": "#7f7f00" |
|||
}, |
|||
"lane": { |
|||
"width": "2", |
|||
"color": "#7f0000" |
|||
}, |
|||
"share_busway": { |
|||
"width": "2", |
|||
"color": "#7f007f", |
|||
"trans_tag": "cycleway" |
|||
}, |
|||
"footway": { |
|||
"width": "2", |
|||
"color": "#00af00" |
|||
}, |
|||
"path": { |
|||
"width": "2", |
|||
"color": "#00af00", |
|||
"info_hide": true |
|||
}, |
|||
"pedestrian": { |
|||
"width": "4", |
|||
"color": "#5faf00" |
|||
}, |
|||
"living_street": { |
|||
"width": "4", |
|||
"color": "#00afff" |
|||
}, |
|||
"bicycle_road": { |
|||
"width": "4", |
|||
"color": "#003fff" |
|||
}, |
|||
"shared_lane": { |
|||
"width": "4", |
|||
"color": "#000000" |
|||
} |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue