Compare commits
merge into: OpenStreetBrowser:master
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: OpenStreetBrowser:parking-lanes
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
7 Commits
master
...
parking-la
Author | SHA1 | Message | Date |
---|---|---|---|
Stephan Bösch-Plepelits | ac2904604f |
parking_lanes: support deprecated tagging (with warning)
|
2 years ago |
Stephan Bösch-Plepelits | 96ddf6dadc |
parking_lanes: add conditions and restrictions
|
2 years ago |
Stephan Bösch-Plepelits | 5a1aa7f9b2 |
parking_lanes: show separate type
|
2 years ago |
Stephan Bösch-Plepelits | 8e2ef8dbbb |
parking_lanes: Info, improve styles
|
2 years ago |
Stephan Bösch-Plepelits | da0cc9b866 |
parking_lanes: improve details/body
|
2 years ago |
Stephan Bösch-Plepelits | dcec12c639 |
parking_lanes: type offset depending on kerbPosition
|
2 years ago |
Stephan Bösch-Plepelits | d383e9f541 |
parking_lanes: first attempt
|
2 years ago |
2 changed files with 290 additions and 0 deletions
-
3index.json
-
287parking_lanes.yaml
@ -0,0 +1,287 @@ |
|||
query: |
|||
10: | |
|||
( |
|||
way["parking:left"];way["parking:right"];way["parking:both"]; |
|||
way["parking:lane:left"];way["parking:lane:right"];way["parking:lane:both"]; |
|||
) |
|||
feature: |
|||
pre: | |
|||
{% set deprecated = attribute(tags, 'parking:lane:left') or attribute(tags, 'parking:lane:right') or attribute(tags, 'parking:lane:both') %} |
|||
{% set leftOrientation = attribute(tags, 'parking:left:orientation')|default(attribute(tags, 'parking:lane:left'))|default(attribute(tags, 'parking:both:orientation'))|default(attribute(tags, 'parking:lane:both'))|default('unknown') %} |
|||
{% set rightOrientation = attribute(tags, 'parking:right:orientation')|default(attribute(tags, 'parking:lane:right'))|default(attribute(tags, 'parking:both:orientation'))|default(attribute(tags, 'parking:lane:both'))|default('unknown') %} |
|||
{% set leftType = attribute(tags, 'parking:left')|default(attribute(tags, 'parking:lane:left:' ~ leftOrientation))|default(attribute(tags, 'parking:both'))|default(attribute(tags, 'parking:lane:both:' ~ leftOrientation))|default('unknown') %} |
|||
{% set rightType = attribute(tags, 'parking:right')|default(attribute(tags, 'parking:lane:right:' ~ rightOrientation))|default(attribute(tags, 'parking:both'))|default(attribute(tags, 'parking:lane:both:' ~ rightOrientation))|default('unknown') %} |
|||
{% if (attribute(tags, 'parking:lane:left:' ~ leftOrientation) or attribute(tags, 'parking:lane:both:' ~ leftOrientation)) and leftType == 'on_street' %} |
|||
{% set leftType = 'lane' %} |
|||
{% endif %} |
|||
{% if (attribute(tags, 'parking:lane:right:' ~ rightOrientation) or attribute(tags, 'parking:lane:both:' ~ rightOrientation)) and rightType == 'on_street' %} |
|||
{% set rightType = 'lane' %} |
|||
{% endif %} |
|||
|
|||
{% set leftCondition = 'undefined' %} |
|||
{% if attribute(tags, 'parking:left:fee')|default(attribute(tags, 'parking:both:fee')) == 'no' %} |
|||
{% set leftRestriction = 'free' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:left:maxstay')|default(attribute(tags, 'parking:both:maxstay')) not in [undefined, 'no'] %} |
|||
{% set leftRestriction = 'free_time_limit' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:left:fee')|default(attribute(tags, 'parking:both:fee')) not in [undefined, 'no'] or attribute(tags, 'parking:left:fee:conditional')|default(attribute(tags, 'parking:both:fee:conditional')) matches '/yes/' %} |
|||
{% set leftRestriction = 'paid' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:left:access')|default(attribute(tags, 'parking:both:access')) == 'customers' or attribute(tags, 'parking:left:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/customers/' %} |
|||
{% set leftRestriction = 'customers' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:left:access')|default(attribute(tags, 'parking:both:access')) == 'no' or attribute(tags, 'parking:left:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/no/' %} |
|||
{% set leftRestriction = 'non_public' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:left:disabled')|default(attribute(tags, 'parking:both:disabled')) not in [undefined, 'no'] or attribute(tags, 'parking:left:disabled:conditional')|default(attribute(tags, 'parking:both:disabled:conditional')) %} |
|||
{% set leftRestriction = 'disabled' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:left')|default(attribute(tags, 'parking:both')) == 'no' and attribute(tags, 'parking:left:reason')|default(attribute(tags, 'parking:both:reason')) %} |
|||
{% set leftRestriction = 'reason' %} |
|||
{% endif %} |
|||
{% for r in ['charging_only', 'loading_only', 'no_parking', 'no_standing', 'no_stopping'] %} |
|||
{% if attribute(tags, 'parking:left:restriction')|default(attribute(tags, 'parking:both:restriction')) == r or attribute(tags, 'parking:left:restriction:conditional')|default(attribute(tags, 'parking:both:restriction:conditional')) matches ('/' ~ r ~ '/') %} |
|||
{% set leftRestriction = r %} |
|||
{% endif %} |
|||
{% endfor %} |
|||
|
|||
{% set rightCondition = 'undefined' %} |
|||
{% if attribute(tags, 'parking:right:fee')|default(attribute(tags, 'parking:both:fee')) == 'no' %} |
|||
{% set rightRestriction = 'free' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:right:maxstay')|default(attribute(tags, 'parking:both:maxstay')) not in [undefined, 'no'] %} |
|||
{% set rightRestriction = 'free_time_limit' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:right:fee')|default(attribute(tags, 'parking:both:fee')) not in [undefined, 'no'] or attribute(tags, 'parking:right:fee:conditional')|default(attribute(tags, 'parking:both:fee:conditional')) matches '/yes/' %} |
|||
{% set rightRestriction = 'paid' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:right:access')|default(attribute(tags, 'parking:both:access')) == 'customers' or attribute(tags, 'parking:right:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/customers/' %} |
|||
{% set rightRestriction = 'customers' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:right:access')|default(attribute(tags, 'parking:both:access')) == 'no' or attribute(tags, 'parking:right:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/no/' %} |
|||
{% set rightRestriction = 'non_public' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:right:disabled')|default(attribute(tags, 'parking:both:disabled')) not in [undefined, 'no'] or attribute(tags, 'parking:right:disabled:conditional')|default(attribute(tags, 'parking:both:disabled:conditional')) %} |
|||
{% set rightRestriction = 'disabled' %} |
|||
{% endif %} |
|||
{% if attribute(tags, 'parking:right')|default(attribute(tags, 'parking:both')) == 'no' and attribute(tags, 'parking:right:reason')|default(attribute(tags, 'parking:both:reason')) %} |
|||
{% set rightRestriction = 'reason' %} |
|||
{% endif %} |
|||
{% for r in ['charging_only', 'loading_only', 'no_parking', 'no_standing', 'no_stopping'] %} |
|||
{% if attribute(tags, 'parking:right:restriction')|default(attribute(tags, 'parking:both:restriction')) == r or attribute(tags, 'parking:right:restriction:conditional')|default(attribute(tags, 'parking:both:restriction:conditional')) matches ('/' ~ r ~ '/') %} |
|||
{% set rightRestriction = r %} |
|||
{% endif %} |
|||
{% endfor %} |
|||
|
|||
body: | |
|||
Left: <ul> |
|||
<li>Type: {{ leftType }}</li> |
|||
{% if leftType not in ['no', 'separate'] %} |
|||
<li>Orientation: {{ leftOrientation }}</li> |
|||
{% endif %} |
|||
</ul> |
|||
Right: <ul> |
|||
<li>Type: {{ rightType }}</li> |
|||
{% if rightType not in ['no', 'separate'] %} |
|||
<li>Orientation: {{ rightOrientation }}</li> |
|||
{% endif %} |
|||
</ul> |
|||
{% if deprecated %}<div class='warning'>{{ repoTrans('deprecated', 'parking:lane:left/right/both', 'https://wiki.openstreetmap.org/wiki/Key:parking:lane')|raw }}</div>{% endif %} |
|||
markerSymbol: '' |
|||
listMarkerSymbol: line |
|||
details: | |
|||
Left: {{ leftType }} / {{ leftOrientation }}<br> |
|||
Right: {{ rightType }} / {{ rightOrientation }} |
|||
styles: | |
|||
default |
|||
{% if leftType == 'separate' %} |
|||
,leftSeparate |
|||
{% elseif leftType in ['no', 'unknown'] and leftOrientation == 'unknown' %} |
|||
,leftType |
|||
{% else %} |
|||
,leftType,leftOrientation |
|||
{% endif %} |
|||
{% if rightType == 'separate' %} |
|||
,rightSeparate |
|||
{% elseif rightType in ['no', 'unknown'] and rightOrientation == 'unknown' %} |
|||
,rightType |
|||
{% else %} |
|||
,rightType,rightOrientation |
|||
{% endif %} |
|||
style: |
|||
color: | |
|||
{{ deprecated ? '#ff0000' : '#7f7f7f' }} |
|||
style:leftType: |
|||
color: | |
|||
{{ const.restriction[leftRestriction].color }} |
|||
offset: | |
|||
{{ 0 - ((const.orientation[leftOrientation].width) * const.type[leftType].kerbPosition + (const.type[leftType].width / 2) + 4) }} |
|||
lineCap: butt |
|||
width: | |
|||
{{ const.type[leftType].width }} |
|||
dashArray: | |
|||
{{ const.type[leftType].dashArray }} |
|||
style:leftOrientation: |
|||
color: | |
|||
{{ const.restriction[leftRestriction].color }} |
|||
offset: | |
|||
{{ 0 - ((const.type[leftType].width) * (1 - const.type[leftType].kerbPosition) + const.orientation[leftOrientation].width / 2 + 4) }} |
|||
lineCap: butt |
|||
width: | |
|||
{{ const.orientation[leftOrientation].width }} |
|||
dashArray: | |
|||
{{ const.orientation[leftOrientation].dashArray }} |
|||
style:leftSeparate: |
|||
width: 0 |
|||
pattern: arrowHead |
|||
pattern-angleCorrection: -90 |
|||
pattern-pixelSize: 7 |
|||
pattern-lineOffset: -10 |
|||
pattern-polygon: false |
|||
pattern-repeat: 15 |
|||
pattern-path-color: | |
|||
{{ const.restriction[leftRestriction].color }} |
|||
style:rightType: |
|||
color: | |
|||
{{ const.restriction[rightRestriction].color }} |
|||
offset: | |
|||
{{ (const.orientation[rightOrientation].width) * const.type[rightType].kerbPosition + (const.type[rightType].width / 2) + 4 }} |
|||
lineCap: butt |
|||
width: | |
|||
{{ const.type[rightType].width }} |
|||
dashArray: | |
|||
{{ const.type[rightType].dashArray }} |
|||
style:rightOrientation: |
|||
color: | |
|||
{{ const.restriction[rightRestriction].color }} |
|||
offset: | |
|||
{{ (const.type[rightType].width) * (1 - const.type[rightType].kerbPosition) + const.orientation[rightOrientation].width / 2 + 4 }} |
|||
lineCap: butt |
|||
width: | |
|||
{{ const.orientation[rightOrientation].width }} |
|||
dashArray: | |
|||
{{ const.orientation[rightOrientation].dashArray }} |
|||
style:rightSeparate: |
|||
width: 0 |
|||
pattern: arrowHead |
|||
pattern-angleCorrection: 90 |
|||
pattern-pixelSize: 7 |
|||
pattern-lineOffset: 10 |
|||
pattern-polygon: false |
|||
pattern-repeat: 15 |
|||
pattern-path-color: | |
|||
{{ const.restriction[rightRestriction].color }} |
|||
info: | |
|||
Tagging scheme: |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerLine({ color: '#7f7f7f', width: 2 }) }}</td> |
|||
<td><a target='_blank' href="https://wiki.openstreetmap.org/wiki/Street_parking">Street parking</a></td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine({ color: '#ff0000', width: 2 }) }}</td> |
|||
<td><a target='_blank' href="https://wiki.openstreetmap.org/wiki/Key:parking:lane">Deprecated tagging</a></td> |
|||
</tr> |
|||
</table> |
|||
Parking Type: |
|||
<table> |
|||
{% for k, def in const.type %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ 'parking:both': k, 'parking:both:orientation': (k in ['no', 'unknown'] ? '' : 'parallel') })) }}</td> |
|||
<td>{{ k }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
Parking Orientation: |
|||
<table> |
|||
{% for k, def in const.orientation %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ 'parking:both': k, 'parking:both:orientation': (k in ['no', 'unknown'] ? '' : 'parallel') })) }}</td> |
|||
<td>{{ k }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
Parking Conditions/Restrictions: |
|||
<table> |
|||
{% for k, def in const.restriction %} |
|||
<tr> |
|||
<td>{{ markerLine({ color: def.color, width: 5 }) }}</td> |
|||
<td>{{ k }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
const: |
|||
type: |
|||
'no': |
|||
width: 6 |
|||
dashArray: '6,10' |
|||
kerbPosition: 0 |
|||
lane: |
|||
width: 2 |
|||
dashArray: '' |
|||
kerbPosition: 1 |
|||
street_side: |
|||
width: 2 |
|||
dashArray: '5,5' |
|||
kerbPosition: 1 |
|||
half_on_kerb: |
|||
width: 2 |
|||
dashArray: '' |
|||
kerbPosition: 0.5 |
|||
on_kerb: |
|||
width: 2 |
|||
dashArray: '' |
|||
kerbPosition: 0 |
|||
shoulder: |
|||
width: 3 |
|||
dashArray: '5,5' |
|||
kerbPosition: 0 |
|||
separate: |
|||
width: 0 |
|||
dashArray: '' |
|||
kerbPosition: 0 |
|||
unknown: |
|||
width: 3 |
|||
dashArray: '1,1' |
|||
kerbPosition: 0 |
|||
orientation: |
|||
parallel: |
|||
width: 5 |
|||
dashArray: '10,3' |
|||
diagonal: |
|||
width: 8 |
|||
dashArray: '5,5' |
|||
perpendicular: |
|||
width: 12 |
|||
dashArray: '3,3' |
|||
unknown: |
|||
width: 8 |
|||
dashArray: '1,1' |
|||
restriction: |
|||
undefined: |
|||
color: '#0000ff' |
|||
free: |
|||
color: chartreuse |
|||
free_time_limit: |
|||
color: dodgerblue |
|||
paid: |
|||
color: hotpink |
|||
customers: |
|||
color: darkorange |
|||
non_public: |
|||
color: red |
|||
disabled: |
|||
color: turquoise |
|||
reason: |
|||
color: plum |
|||
charging_only: |
|||
color: limegreen |
|||
loading_only: |
|||
color: lightcyan |
|||
no_parking: |
|||
color: orange |
|||
no_standing: |
|||
color: salmon |
|||
no_stopping: |
|||
color: red |
Write
Preview
Loading…
Cancel
Save
Reference in new issue