From c55c2754c8f6cc991c5a5d8faa3537d50d0a0214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 29 Nov 2018 14:16:01 +0100 Subject: [PATCH 1/7] Re-order fields (like openstreetbrowser-editor orders) --- car_maxspeed.json | 2 +- cycle_routes.json | 50 ++++++++++++------------- pt.json | 94 +++++++++++++++++++++++------------------------ 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/car_maxspeed.json b/car_maxspeed.json index b2249f3..b077c96 100644 --- a/car_maxspeed.json +++ b/car_maxspeed.json @@ -53,7 +53,7 @@ "{{ trans('unknown') }}", "{% endif %}" ], - "markerSymbol": null, + "markerSymbol": "", "listMarkerSymbol": "line", "style": { "width": "3", diff --git a/cycle_routes.json b/cycle_routes.json index 828dfaf..2cb57ed 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -16,18 +16,18 @@ }, "members": true, "feature": { - "priority": "{{ const[tags.network].priority|default(4) }}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", "description": "{{ tagTrans('network', tags.network) }}", + "markerSymbol": "", "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}", - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "priority": "{{ const[tags.network].priority|default(4) }}", "styles": "", "style:hover": { - "width": 0 + "width": "0" }, "style:selected": { - "width": 0 - }, - "markerSymbol": "" + "width": "0" + } }, "memberFeature": { "pre": [ @@ -72,62 +72,62 @@ "listExclude": "1", "styles": "default{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}", "style": { - "color": "{{ const[network].color }}", "width": "4", + "color": "{{ const[network].color }}", + "opacity": "1", + "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}", "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}", - "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", - "opacity": 1, "text": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", - "textFontWeight": "bold", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", - "pattern-pixelSize": "9", - "pattern-repeat": "35", "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}", + "pattern-repeat": "35", "pattern-polygon": "true", + "pattern-pixelSize": "9", "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", "pattern-path-width": "0", + "pattern-path-color": "{{ const[network].color }}", "pattern-path-fillOpacity": "1", - "pattern-path-color": "{{ const[network].color }}" + "textFontWeight": "bold" }, "style:hover": { "pane": "hover", "width": "4", + "color": "black", + "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}", "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}", - "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", - "color": "black", "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "9", - "pattern-repeat": "35", "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", + "pattern-repeat": "35", "pattern-polygon": "true", + "pattern-pixelSize": "9", "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", "pattern-path-width": "0", - "pattern-path-fillOpacity": "1", - "pattern-path-color": "black" + "pattern-path-color": "black", + "pattern-path-fillOpacity": "1" }, "style:selected": { "pane": "selected", "width": "4", + "color": "#3f3f3f", + "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}", "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}", - "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", - "color": "#3f3f3f", "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "9", - "pattern-repeat": "35", "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", + "pattern-repeat": "35", "pattern-polygon": "true", + "pattern-pixelSize": "9", "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", "pattern-path-width": "0", - "pattern-path-fillOpacity": "1", - "pattern-path-color": "#3f3f3f" + "pattern-path-color": "#3f3f3f", + "pattern-path-fillOpacity": "1" } }, "const": { diff --git a/pt.json b/pt.json index 7ade18d..9c26bf2 100644 --- a/pt.json +++ b/pt.json @@ -69,10 +69,10 @@ "markerSymbol": "", "styles": "", "style:hover": { - "width": 0 + "width": "0" }, "style:selected": { - "width": 0 + "width": "0" }, "listStopsExclude": "true", "listRoutesMarkerSign": "{{ const[tags.route].sign|raw }}", @@ -136,78 +136,78 @@ "{% endfor %}", "" ], + "markerSign": " ", + "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerPointer({ })|raw }}{% endif %}{% endif %}", "styles": "{% if isStop and stopCount > 0 %}stop{% elseif isWay %}casing,way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}", + "style:hover": { + "pane": "hover", + "width": "4", + "color": "black", + "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", + "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}", + "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}", + "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", + "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", + "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", + "pattern-repeat": "35", + "pattern-polygon": "true", + "pattern-pixelSize": "9", + "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", + "pattern-path-width": "0", + "pattern-path-color": "black", + "pattern-path-fillOpacity": "1" + }, + "style:selected": { + "pane": "selected", + "width": "4", + "color": "#3f3f3f", + "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", + "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}", + "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}", + "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", + "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", + "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", + "pattern-repeat": "35", + "pattern-polygon": "true", + "pattern-pixelSize": "9", + "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", + "pattern-path-width": "0", + "pattern-path-color": "#3f3f3f", + "pattern-path-fillOpacity": "1" + }, "listStopsMarkerSign": null, "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsExclude": "{{ not isStop or stopCount == 0 }}", "listStopsTitle": "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}
  • {{ trans('loading') }}
  • {% endif %}", "listStopsDescription": "{{ refs|join(' · ') }}", "listRoutesExclude": "true", - "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerPointer({ })|raw }}{% endif %}{% endif %}", - "markerSign": " ", "style:stop": { - "color": "{{ color|default('#ff0000') }}", "width": "4", + "color": "{{ color|default('#ff0000') }}", "radius": "3", "zIndex": "1" }, "style:way": { - "color": "{{ color|default('#ff0000') }}", "width": "4", + "color": "{{ color|default('#ff0000') }}", + "opacity": "1", + "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}", "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}", - "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", - "opacity": 1, "text": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", - "textFontWeight": "bold", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", - "pattern-pixelSize": "9", - "pattern-repeat": "35", "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}", - "pattern-polygon": "true", - "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", - "pattern-path-width": "0", - "pattern-path-fillOpacity": "1", - "pattern-path-color": "{{ color|default('#ff0000') }}" - }, - "style:hover": { - "pane": "hover", - "width": "4", - "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}", - "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}", - "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", - "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", - "color": "black", - "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "9", "pattern-repeat": "35", - "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", - "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", - "pattern-path-width": "0", - "pattern-path-fillOpacity": "1", - "pattern-path-color": "black" - }, - "style:selected": { - "pane": "selected", - "width": "4", - "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}", - "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}", - "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", - "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", - "color": "#3f3f3f", - "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "35", - "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", - "pattern-polygon": "true", - "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", + "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", "pattern-path-width": "0", + "pattern-path-color": "{{ color|default('#ff0000') }}", "pattern-path-fillOpacity": "1", - "pattern-path-color": "#3f3f3f" + "textFontWeight": "bold" } }, "info": [ From e4c9c180ccfa19332aa39ed957900f4aa2a7e0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 29 Nov 2018 18:44:31 +0100 Subject: [PATCH 2/7] public: include office=government and office=administration --- public.json | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/public.json b/public.json index cf28f62..63061c0 100644 --- a/public.json +++ b/public.json @@ -27,6 +27,7 @@ "node[amenity=recycling][recyling_type=centre];", "way[amenity=recycling][recyling_type=centre];", "relation[amenity=recycling][recyling_type=centre];", + "nwr[office~\"^(government|administration)$\"];", ");" ], "16": [ @@ -35,23 +36,36 @@ "way[amenity~'^(courthouse|embassy|public_building|townhall|recycling|toilets)$'];", "relation[amenity~'^(courthouse|embassy|public_building|townhall|recycling|toilets)$'];", "node[drinking_water];", + "nwr[office~\"^(government|administration)$\"];", ");" ] }, "feature": { "pre": [ "{% if tags.drinking_water %}", + "{% set key = 'amenity' %}", "{% set value = 'drinking_water' %}", - "{% else %}", + "{% elseif tags.amenity %}", + "{% set key = 'amenity' %}", "{% set value = tags.amenity %}", + "{% elseif tags.office %}", + "{% set key = 'office' %}", + "{% set value = tags.office %}", "{% endif %}" ], "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', value)) }}", - "description": "{{ tagTrans('amenity', value) }}", + "description": [ + "{% if key == 'office' %}", + " {{ keyTrans('office') }} ({{ tagTrans('office', tags.office) }})", + "{% else %}", + " {{ tagTrans(key, value) }}", + "{% endif %}" + ], "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
    {% endif %}", "markerSign": [ - "{% if const[value] %}", - "{{ const[value]|raw }}", + "{% set kv = key ~ '=' ~ value %}", + "{% if const[kv] %}", + "{{ const[kv]|raw }}", "{% endif %}" ] }, @@ -66,13 +80,15 @@ "" ], "const": { - "courthouse": "⚖", - "clock": "", - "drinking_water": "", - "embassy": "", - "public_building": "", - "recycling": "", - "toilets": "", - "townhall": "" + "amenity=courthouse": "⚖", + "amenity=clock": "", + "amenity=drinking_water": "", + "amenity=embassy": "", + "amenity=public_building": "", + "amenity=recycling": "", + "amenity=toilets": "", + "amenity=townhall": "", + "office=administration": "", + "office=government": "" } } From 99512fc2adf3f367939e8f295cacb54c7587c865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 29 Nov 2018 18:53:46 +0100 Subject: [PATCH 3/7] education: include office=educational_institution and =research --- education.json | 51 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/education.json b/education.json index c366e82..5b4772d 100644 --- a/education.json +++ b/education.json @@ -32,6 +32,7 @@ "node[amenity~'^(college|university|library|school|kindergarten|language_school)$'];", "way[amenity~'^(college|university|library|school|kindergarten|language_school)$'];", "relation[amenity~'^(college|university|library|school|kindergarten|language_school)$'];", + "nwr[office~\"^(educational_institution|research)$\"];", ")" ], "16": [ @@ -39,20 +40,30 @@ "node[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];", "way[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];", "relation[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];", + "nwr[office~\"^(educational_institution|research)$\"];", ")" ] }, "feature": { - "description": "{{ tagTrans('amenity', tags.amenity) }}", + "pre": [ + "{% if tags.office == 'educational_institution' or tags.office == 'research' %}", + " {% set key = 'office' %}", + " {% set value = tags.office %}", + "{% else %}", + " {% set key = 'amenity' %}", + " {% set value = tags.amenity %}", + "{% endif %}" + ], + "description": "{{ tagTrans(key, value) }}", "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
    {% endif %}", "markerSign": [ - "{% set data = const[tags.amenity] %}", + "{% set data = const[key ~ '=' ~ value] %}", "{% if data %}", - "{{ data.sign }}", + "{{ data.sign|raw }}", "{% endif %}" ], "priority": [ - "{% set data = const[tags.amenity] %}", + "{% set data = const[key ~ '=' ~ value] %}", "{% if data %}", "{{ data.priority }}", "{% endif %}" @@ -60,51 +71,63 @@ }, "info": [ "", - "{% for value, data in const %}", + "{% for kv, data in const %}", "{% if data.zoom <= map.zoom %}", " ", - " ", - " ", + " ", + " ", " ", "{% endif %}", "{% endfor %}", "
    {{ markerCircle({})|raw }}
    {{ data.sign }}
    {{ tagTrans('amenity', value) }}{{ markerCircle({})|raw }}
    {{ data.sign|raw }}
    ", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + "
    " ], "const": { - "university": { + "amenity=university": { "priority": 0, "sign": "🎓", "zoom": 11 }, - "college": { + "amenity=college": { "priority": 1, "sign": "🎓", "zoom": 11 }, - "library": { + "amenity=library": { "priority": 2, "sign": "🕮", "zoom": 11 }, - "school": { + "amenity=school": { "priority": 3, "sign": "🏫", "zoom": 14 }, - "language_school": { + "amenity=language_school": { "priority": 3, "sign": "🏫", "zoom": 14 }, - "kindergarten": { + "amenity=kindergarten": { "priority": 4, "sign": "⛹", "zoom": 14 }, - "public_bookcase": { + "amenity=public_bookcase": { "priority": 5, "sign": "📚", "zoom": 16 + }, + "office=educational_institution": { + "priority": 3, + "sign": "🏢", + "zoom": 14 + }, + "office=research": { + "priority": 3, + "sign": "", + "zoom": 14 } } } From 67069f4d9f22209461b7efe577df801f25496474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 29 Nov 2018 19:05:02 +0100 Subject: [PATCH 4/7] communication: include office=telecommunication and office=it --- communication.json | 48 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/communication.json b/communication.json index 27f8372..dbdb662 100644 --- a/communication.json +++ b/communication.json @@ -25,21 +25,38 @@ "node[amenity~'^(post_office|internet_cafe)$'];", "way[amenity~'^(post_office|internet_cafe)$'];", "relation[amenity~'^(post_office|internet_cafe)$'];", + "nwr[office~\"^(telecommunication|it)$\"];", ");" ], "16": [ "(node[amenity~'^(post_office|internet_cafe|post_box|telephone)$'];", "way[amenity~'^(post_office|internet_cafe)$'];", "relation[amenity~'^(post_office|internet_cafe)$'];", + "nwr[office~\"^(telecommunication|it)$\"];", ");" ] }, "feature": { + "pre": [ + "{% if tags.amenity %}", + " {% set key = 'amenity' %}", + " {% set value = tags.amenity %}", + "{% else %}", + " {% set key = 'office' %}", + " {% set value = tags.office %}", + "{% endif %}" + ], "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) |default(tagTrans('amenity', tags.amenity)) }}", - "description": "{{ tagTrans('amenity', tags.amenity) }}", + "description": [ + "{% if key == 'office' %}", + " {{ keyTrans('office') }} ({{ tagTrans('office', tags.office) }})", + "{% else %}", + " {{ tagTrans(key, value) }}", + "{% endif %}" + ], "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
    {% endif %}", "markerSign": [ - "{% set data = const[tags.amenity] %}", + "{% set data = const[key ~ '=' ~ value] %}", "{% if data %}", "{{ data.sign|raw }}", "{% endif %}" @@ -47,30 +64,45 @@ }, "info": [ "", - "{% for value, data in const %}", + "{% for kv, data in const %}", "{% if data.zoom <= map.zoom %}", " ", " ", - " ", + " ", " ", "{% endif %}", "{% endfor %}", "
    {{ markerCircle({})|raw }}
    {{ data.sign|raw }}
    {{ tagTrans('amenity', value) }}", + " {% if kv|split('=')[0] == 'office' %}", + " {{ keyTrans('office') }}", + " ({{ tagTrans('office', kv|split('=')[1]) }})", + " {% else %}", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + " {% endif %}", + "
    " ], "const": { - "post_office": { + "amenity=post_office": { "sign": "", "zoom": 13 }, - "post_box": { + "amenity=post_box": { "sign": "", "zoom": 16 }, - "internet_cafe": { + "amenity=internet_cafe": { "sign": "", "zoom": 13 }, - "telephone": { + "office=telecommunication": { + "sign": "", + "zoom": 13 + }, + "office=it": { + "sign": "", + "zoom": 13 + }, + "amenity=telephone": { "sign": "", "zoom": 16 } From e062e0ea4955fdb974ff8fa1975b24944c3eac42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 4 Dec 2018 09:18:32 +0100 Subject: [PATCH 5/7] new category organisations --- index.json | 3 ++ organisations.json | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 organisations.json diff --git a/index.json b/index.json index 77bd73e..b2f3364 100644 --- a/index.json +++ b/index.json @@ -100,6 +100,9 @@ }, { "id": "tourism_services" + }, + { + "id": "organisations" } ] }, diff --git a/organisations.json b/organisations.json new file mode 100644 index 0000000..dcc1aa4 --- /dev/null +++ b/organisations.json @@ -0,0 +1,75 @@ +{ + "type": "overpass", + "name": { + "en": "Organisations" + }, + "query": { + "13": [ + "(", + "nwr[office~\"^(ngo|quango|political_party|association|charity)$\"];", + ")" + ] + }, + "feature": { + "pre": [ + "{% set key = 'office' %}", + "{% set value = tags.office %}", + "" + ], + "description": "{{ tagTrans(key, value) }}", + "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
    {% endif %}", + "markerSign": [ + "{% set data = const[key ~ '=' ~ value] %}", + "{% if data %}", + "{{ data.sign|raw }}", + "{% endif %}" + ], + "priority": [ + "{% set data = const[key ~ '=' ~ value] %}", + "{% if data %}", + "{{ data.priority }}", + "{% endif %}" + ] + }, + "info": [ + "", + "{% for kv, data in const %}", + "{% if data.zoom <= map.zoom %}", + " ", + " ", + " ", + " ", + "{% endif %}", + "{% endfor %}", + "
    {{ markerCircle({})|raw }}
    {{ data.sign|raw }}
    ", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + "
    " + ], + "const": { + "office=ngo": { + "priority": 0, + "sign": "", + "zoom": 13 + }, + "office=quango": { + "priority": 0, + "sign": "", + "zoom": 13 + }, + "office=political_party": { + "priority": 0, + "sign": "", + "zoom": 13 + }, + "office=association": { + "priority": 0, + "sign": "", + "zoom": 13 + }, + "office=charity": { + "priority": 0, + "sign": "", + "zoom": 13 + } + } +} From d9c72528ad38f2bd8ba8a92f30f9003fbeab981c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 10 Jan 2019 11:31:23 +0100 Subject: [PATCH 6/7] Include more office-tags (new category: law) --- communication.json | 30 ++++++++++++++++-- financial.json | 56 ++++++++++++++++++++++++++++------ index.json | 3 ++ law.json | 59 +++++++++++++++++++++++++++++++++++ organisations.json | 5 +++ public.json | 13 ++++---- tourism_services.json | 71 ++++++++++++++++++++++++++++++++++--------- 7 files changed, 203 insertions(+), 34 deletions(-) create mode 100644 law.json diff --git a/communication.json b/communication.json index dbdb662..83a90d3 100644 --- a/communication.json +++ b/communication.json @@ -25,14 +25,14 @@ "node[amenity~'^(post_office|internet_cafe)$'];", "way[amenity~'^(post_office|internet_cafe)$'];", "relation[amenity~'^(post_office|internet_cafe)$'];", - "nwr[office~\"^(telecommunication|it)$\"];", + "nwr[office~\"^(telecommunication|it|newspaper|publisher|advertising_agency)$\"];", ");" ], "16": [ "(node[amenity~'^(post_office|internet_cafe|post_box|telephone)$'];", "way[amenity~'^(post_office|internet_cafe)$'];", "relation[amenity~'^(post_office|internet_cafe)$'];", - "nwr[office~\"^(telecommunication|it)$\"];", + "nwr[office~\"^(telecommunication|it|newspaper|publisher|advertising_agency)$\"];", ");" ] }, @@ -95,13 +95,37 @@ "zoom": 13 }, "office=telecommunication": { - "sign": "", + "sign": "", "zoom": 13 }, "office=it": { "sign": "", "zoom": 13 }, + "office=newspaper": { + "sign": "", + "zoom": 13 + }, + "office=publisher": { + "sign": "", + "zoom": 13 + }, + "office=advertising_agency": { + "sign": "", + "zoom": 13 + }, + "office=public_relations": { + "sign": "", + "zoom": 13 + }, + "office=audiovisual_production": { + "sign": "", + "zoom": 13 + }, + "office=film_production": { + "sign": "", + "zoom": 13 + }, "amenity=telephone": { "sign": "", "zoom": 16 diff --git a/financial.json b/financial.json index b0ea37a..82b3bfb 100644 --- a/financial.json +++ b/financial.json @@ -31,37 +31,75 @@ "node[amenity~\"^(bank|bureau_de_change|atm)$\"];", "way[amenity~\"^(bank|bureau_de_change|atm)$\"];", "relation[amenity~\"^(bank|bureau_de_change|atm)$\"];", + "node[office~\"^(financial|accountant|insurance|tax|tax_advisor)$\"];", + "way[office~\"^(financial|accountant|insurance|tax|tax_advisor)$\"];", + "relation[office~\"^(financial|accountant|insurance|tax|tax_advisor)$\"];", ")" ] }, "feature": { - "description": "{{ tagTrans('amenity', tags.amenity) }}", - "markerSign": "{{ const[tags.amenity].sign|raw }}" + "pre": [ + "{% if tags.amenity %}", + " {% set key = 'amenity' %}", + " {% set value = tags.amenity %}", + "{% else %}", + " {% set key = 'office' %}", + " {% set value = tags.office %}", + "{% endif %}" + ], + "description": "{{ tagTrans(key, value) }}", + "markerSign": "{{ const[key ~ '=' ~ value].sign|raw }}" }, "info": [ "", - "{% for value, data in const %}", + "{% for kv, data in const %}", "{% if data.zoom <= map.zoom %}", " ", " ", - " ", + " ", " ", "{% endif %}", "{% endfor %}", "
    {{ markerCircle({})|raw }}
    {{ data.sign|raw }}
    {{ tagTrans('amenity', value) }}", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + "
    " ], "const": { - "atm": { - "sign": "", + "amenity=atm": { + "sign": "", "zoom": 15 }, - "bank": { - "sign": "", + "amenity=bank": { + "sign": "", "zoom": 14 }, - "bureau_de_change": { + "amenity=bureau_de_change": { "sign": "⇄", "zoom": 15 + }, + "office=financial": { + "sign": "", + "zoom": 15 + }, + "office=accountant": { + "sign": "", + "zoom": 15 + }, + "office=insurance": { + "sign": "", + "zoom": 15 + }, + "office=tax": { + "sign": "%", + "zoom": 15 + }, + "office=tax_advisor": { + "sign": "%", + "zoom": 15 + }, + "office=cooperative": { + "sign": "", + "zoom": 15 } } } diff --git a/index.json b/index.json index b2f3364..cff222f 100644 --- a/index.json +++ b/index.json @@ -95,6 +95,9 @@ { "id": "financial" }, + { + "id": "law" + }, { "id": "public" }, diff --git a/law.json b/law.json new file mode 100644 index 0000000..02beff1 --- /dev/null +++ b/law.json @@ -0,0 +1,59 @@ +{ + "type": "overpass", + "name": { + "en": "Law" + }, + "query": { + "14": [ + "(", + "node[amenity~\"^(courthouse)$\"];", + "way[amenity~\"^(courthouse)$\"];", + "relation[amenity~\"^(courthouse)$\"];", + "node[office~\"^(lawyer|notary)$\"];", + "way[office~\"^(lawyer|notary)$\"];", + "relation[office~\"^(lawyer|notary)$\"];", + ")" + ] + }, + "feature": { + "pre": [ + "{% if tags.amenity %}", + " {% set key = 'amenity' %}", + " {% set value = tags.amenity %}", + "{% else %}", + " {% set key = 'office' %}", + " {% set value = tags.office %}", + "{% endif %}" + ], + "description": "{{ tagTrans(key, value) }}", + "markerSign": "{{ const[key ~ '=' ~ value].sign|raw }}" + }, + "info": [ + "", + "{% for kv, data in const %}", + "{% if data.zoom <= map.zoom %}", + " ", + " ", + " ", + " ", + "{% endif %}", + "{% endfor %}", + "
    {{ markerCircle({})|raw }}
    {{ data.sign|raw }}
    ", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + "
    " + ], + "const": { + "amenity=courthouse": { + "sign": "", + "zoom": 14 + }, + "office=lawyer": { + "sign": "⚖", + "zoom": 14 + }, + "office=notary": { + "sign": "", + "zoom": 14 + } + } +} diff --git a/organisations.json b/organisations.json index dcc1aa4..a6652b3 100644 --- a/organisations.json +++ b/organisations.json @@ -66,6 +66,11 @@ "sign": "", "zoom": 13 }, + "office=foundation": { + "priority": 0, + "sign": "", + "zoom": 13 + }, "office=charity": { "priority": 0, "sign": "", diff --git a/public.json b/public.json index 63061c0..956e60a 100644 --- a/public.json +++ b/public.json @@ -21,9 +21,9 @@ "query": { "12": [ "(", - "node[amenity~'^(courthouse|embassy|public_building|townhall)$'];", - "way[amenity~'^(courthouse|embassy|public_building|townhall)$'];", - "relation[amenity~'^(courthouse|embassy|public_building|townhall)$'];", + "node[amenity~'^(embassy|public_building|townhall)$'];", + "way[amenity~'^(embassy|public_building|townhall)$'];", + "relation[amenity~'^(embassy|public_building|townhall)$'];", "node[amenity=recycling][recyling_type=centre];", "way[amenity=recycling][recyling_type=centre];", "relation[amenity=recycling][recyling_type=centre];", @@ -32,9 +32,9 @@ ], "16": [ "(", - "node[amenity~'^(courthouse|embassy|public_building|townhall|clock|drinking_water|recycling|toilets)$'];", - "way[amenity~'^(courthouse|embassy|public_building|townhall|recycling|toilets)$'];", - "relation[amenity~'^(courthouse|embassy|public_building|townhall|recycling|toilets)$'];", + "node[amenity~'^(embassy|public_building|townhall|clock|drinking_water|recycling|toilets)$'];", + "way[amenity~'^(embassy|public_building|townhall|recycling|toilets)$'];", + "relation[amenity~'^(embassy|public_building|townhall|recycling|toilets)$'];", "node[drinking_water];", "nwr[office~\"^(government|administration)$\"];", ");" @@ -80,7 +80,6 @@ "" ], "const": { - "amenity=courthouse": "⚖", "amenity=clock": "", "amenity=drinking_water": "", "amenity=embassy": "", diff --git a/tourism_services.json b/tourism_services.json index 721916e..d6e5ad2 100644 --- a/tourism_services.json +++ b/tourism_services.json @@ -25,6 +25,7 @@ "node[tourism~\"^(alpine_hut|apartment|camp_site|caravan_site|chalet|guest_house|hostel|hotel|motel|wilderness_hut)$\"];", "way[tourism~\"^(alpine_hut|apartment|camp_site|caravan_site|chalet|guest_house|hostel|hotel|motel|wilderness_hut)$\"];", "relation[tourism~\"^(alpine_hut|apartment|camp_site|caravan_site|chalet|guest_house|hostel|hotel|motel|wilderness_hut)$\"];", + "nwr[office~\"^(guide|tourism|tourist_accommodation)$\"];", ")" ], "16": [ @@ -32,67 +33,107 @@ "node[tourism~\"^(alpine_hut|apartment|camp_site|caravan_site|chalet|guest_house|hostel|hotel|information|motel|wilderness_hut)$\"];", "way[tourism~\"^(alpine_hut|apartment|camp_site|caravan_site|chalet|guest_house|hostel|hotel|information|motel|wilderness_hut)$\"];", "relation[tourism~\"^(alpine_hut|apartment|camp_site|caravan_site|chalet|guest_house|hostel|hotel|information|motel|wilderness_hut)$\"];", + "nwr[office~\"^(guide|tourism|tourist_accommodation)$\"];", ")" ] }, "feature": { - "description": "{{ tagTrans('tourism', tags.tourism) }}", - "markerSign": "{{ const[tags.tourism].sign|raw }}" + "pre": [ + "{% if tags.tourism %}", + " {% set key = 'tourism' %}", + " {% set value = tags.tourism %}", + "{% else %}", + " {% set key = 'office' %}", + " {% set value = tags.office %}", + "{% endif %}" + ], + "description": [ + "{% if key == 'office' %}", + " {{ keyTrans('office') }} ({{ tagTrans('office', tags.office) }})", + "{% else %}", + " {{ tagTrans(key, value) }}", + "{% endif %}" + ], + "markerSign": [ + "{% set data = const[key ~ '=' ~ value] %}", + "{% if data %}", + "{{ data.sign|raw }}", + "{% endif %}" + ] }, "info": [ "", - "{% for value, data in const %}", + "{% for kv, data in const %}", "{% if data.zoom <= map.zoom %}", " ", " ", - " ", + " ", " ", "{% endif %}", "{% endfor %}", "
    {{ markerCircle({})|raw }}
    {{ data.sign|raw }}
    {{ tagTrans('tourism', value) }}", + " {% if kv|split('=')[0] == 'office' %}", + " {{ keyTrans('office') }}", + " ({{ tagTrans('office', kv|split('=')[1]) }})", + " {% else %}", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + " {% endif %}", + "
    " ], "const": { - "alpine_hut": { + "tourism=alpine_hut": { "sign": "🛌", "zoom": 13 }, - "apartment": { + "tourism=apartment": { "sign": "🛌", "zoom": 13 }, - "camp_site": { + "tourism=camp_site": { "sign": "⛺", "zoom": 13 }, - "caravan_site": { + "tourism=caravan_site": { "sign": "⛺", "zoom": 13 }, - "chalet": { + "tourism=chalet": { "sign": "🛌", "zoom": 13 }, - "guest_house": { + "tourism=guest_house": { "sign": "🛌", "zoom": 13 }, - "hostel": { + "tourism=hostel": { "sign": "🛌", "zoom": 13 }, - "hotel": { + "tourism=hotel": { "sign": "🛌", "zoom": 13 }, - "motel": { + "tourism=motel": { "sign": "🛌", "zoom": 13 }, - "wilderness_hut": { + "tourism=wilderness_hut": { "sign": "", "zoom": 13 }, - "information": { + "office=tourism": { + "sign": "", + "zoom": 13 + }, + "office=guide": { + "sign": "", + "zoom": 13 + }, + "office=tourist_accommodation": { + "sign": "🛌", + "zoom": 13 + }, + "tourism=information": { "sign": "ℹ️", "zoom": 16 } From a2e0f316f053638c2c0e4a9d8cbe00aa87c61778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 10 Jan 2019 11:31:56 +0100 Subject: [PATCH 7/7] religion: include some office tags --- religion.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/religion.json b/religion.json index ebdc2b6..b3e2c5a 100644 --- a/religion.json +++ b/religion.json @@ -38,6 +38,7 @@ "node[historic~\"^wayside_(cross|shrine|chapel)$\"];", "way[historic~\"^wayside_(cross|shrine|chapel)$\"];", "relation[historic~\"^wayside_(cross|shrine|chapel)$\"];", + "nwr[office~\"^(parish|religion)$\"];", ")" ] }, @@ -49,6 +50,9 @@ "{% elseif tags.historic in [ 'wayside_cross', 'wayside_shrine', 'wayside_chapel' ] %}", "{% set key = 'historic' %}", "{% set value = tags.historic %}", + "{% elseif tags.office %}", + "{% set key = 'office' %}", + "{% set value = tags.office %}", "{% else %}", "{% set key = 'amenity' %}", "{% set value = tags.amenity %}",