forked from OpenStreetBrowser/main
Compare commits
merge into: side:master
side:buildings
side:filter
side:fitness_trail
side:fossil
side:heritage
side:master
side:maxspeed
side:pattern
side:pt
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: side:buildings
side:buildings
side:filter
side:fitness_trail
side:fossil
side:heritage
side:master
side:maxspeed
side:pattern
side:pt
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
2 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Stephan Bösch-Plepelits | aea862cb40 |
Buildings: height
|
7 years ago |
Stephan Bösch-Plepelits | 9a818b3a49 |
Buildings: create a real 'figure-ground diagram' as sub category of buildings
|
7 years ago |
3 changed files with 149 additions and 29 deletions
@ -0,0 +1,37 @@ |
|||||
|
{ |
||||
|
"type": "overpass", |
||||
|
"name": { |
||||
|
"de": "Schwarzplan", |
||||
|
"en": "Figure-ground diagram" |
||||
|
}, |
||||
|
"query": { |
||||
|
"16": [ |
||||
|
"(", |
||||
|
" way[building];", |
||||
|
" relation[building];", |
||||
|
")" |
||||
|
] |
||||
|
}, |
||||
|
"feature": { |
||||
|
"markerSymbol": null, |
||||
|
"priority": [ |
||||
|
"{% set p = 100 %}", |
||||
|
"{% if tags.name %}{% set p = p - 10 %}{% endif %}", |
||||
|
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.historic %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.culture %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.highway %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.railway %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.aeroway %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{% if tags.tourism %}{% set p = p - 1 %}{% endif %}", |
||||
|
"{{ p }}" |
||||
|
], |
||||
|
"style": { |
||||
|
"width": "0", |
||||
|
"color": "#000000", |
||||
|
"fillColor": "#000000", |
||||
|
"fillOpacity": "1" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
{ |
||||
|
"type": "overpass", |
||||
|
"name": { |
||||
|
"de": "Gebäudehöhen", |
||||
|
"en": "Building height" |
||||
|
}, |
||||
|
"query": { |
||||
|
"16": [ |
||||
|
"(", |
||||
|
" way[building];", |
||||
|
" relation[building];", |
||||
|
")" |
||||
|
] |
||||
|
}, |
||||
|
"feature": { |
||||
|
"pre": [ |
||||
|
"{% if tags.height %}", |
||||
|
"{% set approxHeight = tags.height %}", |
||||
|
"{% elseif attribute(tags, 'building:levels') %}", |
||||
|
"{% set approxHeight = attribute(tags, 'building:levels') * 3.5 %}", |
||||
|
"{% endif %}", |
||||
|
"", |
||||
|
"{% if approxHeight <= 50 %}", |
||||
|
"{% set color = colorInterpolate(['green', 'red'], approxHeight / 50) %}", |
||||
|
"{% elseif approxHeight %}", |
||||
|
"{% set color = colorInterpolate(['red', 'yellow'], (approxHeight - 50) / 250) %} ", |
||||
|
"{% else %}", |
||||
|
"{% set color = '#7f7f7f' %}", |
||||
|
"{% endif %}" |
||||
|
], |
||||
|
"description": [ |
||||
|
"{% if tags.height %}", |
||||
|
"{{ tags.height }}m", |
||||
|
"{% endif %}", |
||||
|
"", |
||||
|
"{% if attribute(tags, 'building:levels') %}", |
||||
|
"{{ attribute(tags, 'building:levels') }} {{ keyTrans('building:levels') }}", |
||||
|
"{% endif %}" |
||||
|
], |
||||
|
"markerSymbol": null, |
||||
|
"listMarkerSymbol": "{{ markerCircle({fillColor: color})|raw }}", |
||||
|
"priority": "{{ (approxHeight|default(0)) * -1 }}", |
||||
|
"style": { |
||||
|
"width": "1", |
||||
|
"color": "#000000", |
||||
|
"fillColor": "{{ color }}", |
||||
|
"fillOpacity": "1" |
||||
|
} |
||||
|
}, |
||||
|
"info": [ |
||||
|
"<div style='display: inline-block'>", |
||||
|
"{{ tagTrans('height') }}", |
||||
|
"<table>", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': '#7f7f7f' })|raw }}</td>", |
||||
|
" <td colspan>{{ trans('unknown') }}</td>", |
||||
|
" </tr>", |
||||
|
"{% for i in range(0, 50, 10) %}", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': colorInterpolate(['green', 'red'], i / 50) })|raw }}</td>", |
||||
|
" <td>{{ i }}m</td>", |
||||
|
" </tr>", |
||||
|
"{% endfor %}", |
||||
|
"{% for i in range(100, 250, 50) %}", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': colorInterpolate(['red', 'yellow'], (i - 50) / 250) })|raw }}</td>", |
||||
|
" <td>{{ i }}m</td>", |
||||
|
" </tr>", |
||||
|
"{% endfor %}", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': 'yellow' })|raw }}</td>", |
||||
|
" <td>≥300m</td>", |
||||
|
" </tr>", |
||||
|
"</table>", |
||||
|
"</div>", |
||||
|
"", |
||||
|
"<div style='display: inline-block'>", |
||||
|
"{{ tagTrans('building:levels') }}", |
||||
|
"<table>", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': '#7f7f7f' })|raw }}</td>", |
||||
|
" <td colspan>{{ trans('unknown') }}</td>", |
||||
|
" </tr>", |
||||
|
"{% for i in range(0, 12, 3) %}", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': colorInterpolate(['green', 'red'], (i * 3.5) / 50) })|raw }}</td>", |
||||
|
" <td>{{ i }}</td>", |
||||
|
" </tr>", |
||||
|
"{% endfor %}", |
||||
|
"{% for i in range(15, 84, 15) %}", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': colorInterpolate(['red', 'yellow'], (i * 3.5 - 50) / 250) })|raw }}</td>", |
||||
|
" <td>{{ i }}</td>", |
||||
|
" </tr>", |
||||
|
"{% endfor %}", |
||||
|
" <tr>", |
||||
|
" <td>{{ markerCircle({ 'fillColor': 'yellow' })|raw }}</td>", |
||||
|
" <td>≥85</td>", |
||||
|
" </tr>", |
||||
|
"</table>", |
||||
|
"", |
||||
|
"</div>" |
||||
|
] |
||||
|
} |
@ -1,38 +1,17 @@ |
|||||
{ |
{ |
||||
"type": "overpass", |
|
||||
|
"type": "index", |
||||
"name": { |
"name": { |
||||
"de": "Gebäude", |
"de": "Gebäude", |
||||
"en": "Buildings", |
"en": "Buildings", |
||||
"fr": "Bâtiments", |
"fr": "Bâtiments", |
||||
"pt-br": "Edificações" |
"pt-br": "Edificações" |
||||
}, |
}, |
||||
"query": { |
|
||||
"16": [ |
|
||||
"(", |
|
||||
" way[building];", |
|
||||
" relation[building];", |
|
||||
")" |
|
||||
] |
|
||||
}, |
|
||||
"feature": { |
|
||||
"markerSymbol": null, |
|
||||
"priority": [ |
|
||||
"{% set p = 100 %}", |
|
||||
"{% if tags.name %}{% set p = p - 10 %}{% endif %}", |
|
||||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.historic %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.culture %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.highway %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.railway %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.aeroway %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{% if tags.tourism %}{% set p = p - 1 %}{% endif %}", |
|
||||
"{{ p }}" |
|
||||
], |
|
||||
"style": { |
|
||||
"width": "1", |
|
||||
"color": "#000000", |
|
||||
"fillColor": "#000000" |
|
||||
|
"subCategories": [ |
||||
|
{ |
||||
|
"id": "buildings-figure-ground" |
||||
|
}, |
||||
|
{ |
||||
|
"id": "buildings-height" |
||||
} |
} |
||||
} |
|
||||
|
] |
||||
} |
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue