From 2bf45faa70b2f788ab8599b6a4864e6436a9adb2 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 19 Oct 2021 00:57:21 +0200 Subject: [PATCH 01/15] First test version of street lighting theme --- .../themes/street_lighting/license_info.json | 11 + assets/themes/street_lighting/street_lamp.svg | 4 + .../street_lighting/street_lighting.json | 380 ++++++++++++++++++ langs/themes/en.json | 151 +++++++ langs/themes/nl.json | 151 +++++++ 5 files changed, 697 insertions(+) create mode 100644 assets/themes/street_lighting/license_info.json create mode 100644 assets/themes/street_lighting/street_lamp.svg create mode 100644 assets/themes/street_lighting/street_lighting.json diff --git a/assets/themes/street_lighting/license_info.json b/assets/themes/street_lighting/license_info.json new file mode 100644 index 000000000..541b0ed40 --- /dev/null +++ b/assets/themes/street_lighting/license_info.json @@ -0,0 +1,11 @@ +[ + { + "path": "street_lamp.svg", + "authors": [ + "Yohan Boniface" + ], + "sources": [ + "https://raw.githubusercontent.com/hotosm/HDM-CartoCSS/master/icons/poi/street_lamp.svg" + ] + } +] \ No newline at end of file diff --git a/assets/themes/street_lighting/street_lamp.svg b/assets/themes/street_lighting/street_lamp.svg new file mode 100644 index 000000000..72602af3d --- /dev/null +++ b/assets/themes/street_lighting/street_lamp.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json new file mode 100644 index 000000000..79ff16975 --- /dev/null +++ b/assets/themes/street_lighting/street_lighting.json @@ -0,0 +1,380 @@ +{ + "id": "street_lighting", + "maintainer": "Robin van der Linde", + "version": "20211018", + "language": [ + "en", + "nl" + ], + "title": { + "en": "Street Lighting", + "nl": "Straatverlichting" + }, + "description": { + "en": "A theme showing information about street lamps, like light type, mounting, light colour and much more.", + "nl": "Een thema met details over straatlantaarns zoals verlichtingstype, montage, lichtkleur en veel meer." + }, + "icon": "./assets/themes/street_lighting/street_lamp.svg", + "startZoom": 19, + "startLat": 52.99319, + "startLon": 6.56113, + "layers": [ + { + "id": "streetlamps", + "name": { + "en": "Street Lamps", + "nl": "Straatlantaarns" + }, + "source": { + "osmTags": "highway=street_lamp" + }, + "minZoom": 16, + "title": { + "render": { + "en": "Street Lamp", + "nl": "Straatlantaarn" + } + }, + "icon": "./assets/themes/street_lighting/street_lamp.svg", + "presets": [ + { + "title": { + "en": "street lamp", + "nl": "straatlantaarn" + }, + "tags": [ + "highway=street_lamp" + ], + "preciseInput": true + } + ], + "tagRenderings": [ + { + "id": "ref", + "render": { + "en": "This street lamp has the reference number {ref}", + "nl": "Deze straatlantaarn heeft het nummer {ref}" + }, + "question": { + "en": "What is the reference number of this street lamp?", + "nl": "Wat is het nummer van deze straatlantaarn?" + }, + "freeform": { + "key": "ref" + } + }, + { + "id": "support", + "question": { + "en": "How is this street lamp mounted?", + "nl": "Hoe is deze straatlantaarn gemonteerd?" + }, + "mappings": [ + { + "if": "support=catenary", + "then": { + "en": "This lamp is suspended using cables", + "nl": "Deze lantaarn hangt aan kabels" + } + }, + { + "if": "support=ceiling", + "then": { + "en": "This lamp is mounted on a ceiling", + "nl": "Deze lantaarn hangt aan een plafond" + } + }, + { + "if": "support=ground", + "then": { + "en": "This lamp is mounted in the ground", + "nl": "Deze lantaarn zit in de grond" + } + }, + { + "if": "support=pedestal", + "then": { + "en": "This lamp is mounted on a short pole (mostly < 1.5m)", + "nl": "Deze lantaarn zit op een korte paal (meestal < 1.5m)" + } + }, + { + "if": "support=pole", + "then": { + "en": "This lamp is mounted on a pole", + "nl": "Deze lantaarn zit op een paal" + } + }, + { + "if": "support=wall", + "then": { + "en": "This lamp is mounted directly to the wall", + "nl": "Deze lantaarn hangt direct aan de muur" + } + }, + { + "if": "support=wall_mount", + "then": { + "en": "This lamp is mounted to the wall using a metal bar", + "nl": "Deze lantaarn hangt aan de muur met een metalen balk" + } + } + ] + }, + { + "id": "lamp_mount", + "question": { + "en": "How is this lamp mounted to the pole?", + "nl": "Hoe zit deze lantaarn aan de paal?" + }, + "condition": "support=pole", + "mappings": [ + { + "if": "lamp_mount=straight_mast", + "then": { + "en": "This lamp sits atop of a straight mast", + "nl": "Deze lantaarn zit boven op een rechte paal" + } + }, + { + "if": "lamp_mount=bent_mast", + "then": { + "en": "This lamp sits at the end of a bent mast", + "nl": "Deze lantaarn zit aan het eind van een gebogen paal" + } + } + ] + }, + { + "id": "method", + "question": { + "en": "What kind of lighting does this lamp use?", + "nl": "Wat voor verlichting gebruikt deze lantaarn?" + }, + "mappings": [ + { + "if": "light:method=electric", + "then": { + "en": "This lamp is lit electrically", + "nl": "Deze lantaarn is elektrisch verlicht" + }, + "hideInAnswer": true + }, + { + "if": "light:method=LED", + "then": { + "en": "This lamp uses LEDs", + "nl": "Deze lantaarn gebruikt LEDs" + } + }, + { + "if": "light:method=incandescent", + "then": { + "en": "This lamp uses incandescent lighting", + "nl": "Deze lantaarn gebruikt gloeilampen" + } + }, + { + "if": "light:method=halogen", + "then": { + "en": "This lamp uses halogen lighting", + "nl": "Deze lantaarn gebruikt halogeen verlichting" + } + }, + { + "if": "light:method=discharge", + "then": { + "en": "This lamp uses discharge lamps (unknown type)", + "nl": "Deze lantaarn gebruikt gasontladingslampen (onbekend type)" + } + }, + { + "if": "light:method=mercury", + "then": { + "en": "This lamp uses a mercury-vapour lamp (lightly blueish)", + "nl": "Deze lantaarn gebruikt een kwiklamp (enigszins blauwachtig)" + } + }, + { + "if": "light:method=metal-halide", + "then": { + "en": "This lamp uses metal-halide lamps (bright white)", + "nl": "Deze lantaarn gebruikt metaalhalidelampen" + } + }, + { + "if": "light:method=fluorescent", + "then": { + "en": "This lamp uses fluorescent lighting", + "nl": "Deze lantaarn gebruikt fluorescentieverlichting (TL en spaarlamp)" + } + }, + { + "if": "light:method=sodium", + "then": { + "en": "This lamp uses sodium lamps (unknown type)", + "nl": "Deze lantaarn gebruikt natriumlampen (onbekend type)" + } + }, + { + "if": "light:method=low_pressure_sodium", + "then": { + "en": "This lamp uses low pressure sodium lamps (monochrome orange)", + "nl": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" + } + }, + { + "if": "light:method=high_pressure_sodium", + "then": { + "en": "This lamp uses high pressure sodium lamps (orange with white)", + "nl": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" + } + }, + { + "if": "light:method=gas", + "then": { + "en": "This lamp is lit using gas", + "nl": "Deze lantaarn wordt verlicht met gas" + } + } + ] + } + ] + }, + { + "id": "lit_streets", + "name": { + "en": "Lit streets", + "nl": "Verlichte straten" + }, + "source": { + "osmTags": { + "and": [ + "highway!=", + "lit!=no" + ] + } + }, + "minZoom": 16, + "title": { + "render": { + "en": "Lit street", + "nl": "Verlichte straat" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "color": "#ff0", + "tagRenderings": [ + { + "id": "lit", + "question": { + "en": "Is this street lit?", + "nl": "Is deze straat verlicht?" + }, + "mappings": [ + { + "if": "lit=yes", + "then": { + "en": "This street is lit", + "nl": "Deze weg is verlicht" + } + }, + { + "if": "lit=no", + "then": { + "en": "This road is not lit", + "nl": "Deze weg is niet verlicht" + } + }, + { + "if": "lit=sunset-sunrise", + "then": { + "en": "This road is lit at night", + "nl": "Deze weg is 's nachts verlicht" + }, + "hideInAnswer": true + }, + { + "if": "lit=24/7", + "then": { + "en": "This road is lit 24/7", + "nl": "Deze weg is 24/7 verlicht" + } + } + ] + } + ], + "allowSplit": true + }, + { + "id": "all_streets", + "name": { + "en": "All streets", + "nl": "Alle straten" + }, + "source": { + "osmTags": "highway!=" + }, + "minZoom": 19, + "title": { + "render": { + "en": "Street", + "nl": "Straat" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "color": "#a9a9a9", + "tagRenderings": [ + { + "id": "lit", + "question": { + "en": "Is this street lit?", + "nl": "Is deze straat verlicht?" + }, + "mappings": [ + { + "if": "lit=yes", + "then": { + "en": "This street is lit", + "nl": "Deze weg is verlicht" + } + }, + { + "if": "lit=no", + "then": { + "en": "This road is not lit", + "nl": "Deze weg is niet verlicht" + } + }, + { + "if": "lit=sunset-sunrise", + "then": { + "en": "This road is lit at night", + "nl": "Deze weg is 's nachts verlicht" + }, + "hideInAnswer": true + }, + { + "if": "lit=24/7", + "then": { + "en": "This road is lit 24/7", + "nl": "Deze weg is 24/7 verlicht" + } + } + ] + } + ], + "allowSplit": true + } + ] +} \ No newline at end of file diff --git a/langs/themes/en.json b/langs/themes/en.json index 8bf77665b..9874ca47a 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1227,6 +1227,157 @@ "shortDescription": "A map showing sport pitches", "title": "Sport pitches" }, + "street_lighting": { + "description": "A theme showing information about street lamps, like light type, mounting, light colour and much more.", + "layers": { + "0": { + "name": "Street Lamps", + "presets": { + "0": { + "title": "street lamp" + } + }, + "tagRenderings": { + "lamp_mount": { + "mappings": { + "0": { + "then": "This lamp sits atop of a straight mast" + }, + "1": { + "then": "This lamp sits at the end of a bent mast" + } + }, + "question": "How is this lamp mounted to the pole?" + }, + "method": { + "mappings": { + "0": { + "then": "This lamp is lit electrically" + }, + "1": { + "then": "This lamp uses LEDs" + }, + "2": { + "then": "This lamp uses incandescent lighting" + }, + "3": { + "then": "This lamp uses halogen lighting" + }, + "4": { + "then": "This lamp uses discharge lamps (unknown type)" + }, + "5": { + "then": "This lamp uses a mercury-vapour lamp (lightly blueish)" + }, + "6": { + "then": "This lamp uses metal-halide lamps (bright white)" + }, + "7": { + "then": "This lamp uses fluorescent lighting" + }, + "8": { + "then": "This lamp uses sodium lamps (unknown type)" + }, + "9": { + "then": "This lamp uses low pressure sodium lamps (monochrome orange)" + }, + "10": { + "then": "This lamp uses high pressure sodium lamps (orange with white)" + }, + "11": { + "then": "This lamp is lit using gas" + } + }, + "question": "What kind of lighting does this lamp use?" + }, + "ref": { + "question": "What is the reference number of this street lamp?", + "render": "This street lamp has the reference number {ref}" + }, + "support": { + "mappings": { + "0": { + "then": "This lamp is suspended using cables" + }, + "1": { + "then": "This lamp is mounted on a ceiling" + }, + "2": { + "then": "This lamp is mounted in the ground" + }, + "3": { + "then": "This lamp is mounted on a short pole (mostly < 1.5m)" + }, + "4": { + "then": "This lamp is mounted on a pole" + }, + "5": { + "then": "This lamp is mounted directly to the wall" + }, + "6": { + "then": "This lamp is mounted to the wall using a metal bar" + } + }, + "question": "How is this street lamp mounted?" + } + }, + "title": { + "render": "Street Lamp" + } + }, + "1": { + "name": "Lit streets", + "tagRenderings": { + "lit": { + "mappings": { + "0": { + "then": "This street is lit" + }, + "1": { + "then": "This road is not lit" + }, + "2": { + "then": "This road is lit at night" + }, + "3": { + "then": "This road is lit 24/7" + } + }, + "question": "Is this street lit?" + } + }, + "title": { + "render": "Lit street" + } + }, + "2": { + "name": "All streets", + "tagRenderings": { + "lit": { + "mappings": { + "0": { + "then": "This street is lit" + }, + "1": { + "then": "This road is not lit" + }, + "2": { + "then": "This road is lit at night" + }, + "3": { + "then": "This road is lit 24/7" + } + }, + "question": "Is this street lit?" + } + }, + "title": { + "render": "Street" + } + } + }, + "title": "Street Lighting" + }, "surveillance": { "description": "On this open map, you can find surveillance cameras.", "shortDescription": "Surveillance cameras and other means of surveillance", diff --git a/langs/themes/nl.json b/langs/themes/nl.json index a6322e3d5..7045a2658 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -897,6 +897,157 @@ "shortDescription": "Deze kaart toont sportvelden", "title": "Sportvelden" }, + "street_lighting": { + "description": "Een thema met details over straatlantaarns zoals verlichtingstype, montage, lichtkleur en veel meer.", + "layers": { + "0": { + "name": "Straatlantaarns", + "presets": { + "0": { + "title": "straatlantaarn" + } + }, + "tagRenderings": { + "lamp_mount": { + "mappings": { + "0": { + "then": "Deze lantaarn zit boven op een rechte paal" + }, + "1": { + "then": "Deze lantaarn zit aan het eind van een gebogen paal" + } + }, + "question": "Hoe zit deze lantaarn aan de paal?" + }, + "method": { + "mappings": { + "0": { + "then": "Deze lantaarn is elektrisch verlicht" + }, + "1": { + "then": "Deze lantaarn gebruikt LEDs" + }, + "2": { + "then": "Deze lantaarn gebruikt gloeilampen" + }, + "3": { + "then": "Deze lantaarn gebruikt halogeen verlichting" + }, + "4": { + "then": "Deze lantaarn gebruikt gasontladingslampen (onbekend type)" + }, + "5": { + "then": "Deze lantaarn gebruikt een kwiklamp (enigszins blauwachtig)" + }, + "6": { + "then": "Deze lantaarn gebruikt metaalhalidelampen" + }, + "7": { + "then": "Deze lantaarn gebruikt fluorescentieverlichting (TL en spaarlamp)" + }, + "8": { + "then": "Deze lantaarn gebruikt natriumlampen (onbekend type)" + }, + "9": { + "then": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" + }, + "10": { + "then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" + }, + "11": { + "then": "Deze lantaarn wordt verlicht met gas" + } + }, + "question": "Wat voor verlichting gebruikt deze lantaarn?" + }, + "ref": { + "question": "Wat is het nummer van deze straatlantaarn?", + "render": "Deze straatlantaarn heeft het nummer {ref}" + }, + "support": { + "mappings": { + "0": { + "then": "Deze lantaarn hangt aan kabels" + }, + "1": { + "then": "Deze lantaarn hangt aan een plafond" + }, + "2": { + "then": "Deze lantaarn zit in de grond" + }, + "3": { + "then": "Deze lantaarn zit op een korte paal (meestal < 1.5m)" + }, + "4": { + "then": "Deze lantaarn zit op een paal" + }, + "5": { + "then": "Deze lantaarn hangt direct aan de muur" + }, + "6": { + "then": "Deze lantaarn hangt aan de muur met een metalen balk" + } + }, + "question": "Hoe is deze straatlantaarn gemonteerd?" + } + }, + "title": { + "render": "Straatlantaarn" + } + }, + "1": { + "name": "Verlichte straten", + "tagRenderings": { + "lit": { + "mappings": { + "0": { + "then": "Deze weg is verlicht" + }, + "1": { + "then": "Deze weg is niet verlicht" + }, + "2": { + "then": "Deze weg is 's nachts verlicht" + }, + "3": { + "then": "Deze weg is 24/7 verlicht" + } + }, + "question": "Is deze straat verlicht?" + } + }, + "title": { + "render": "Verlichte straat" + } + }, + "2": { + "name": "Alle straten", + "tagRenderings": { + "lit": { + "mappings": { + "0": { + "then": "Deze weg is verlicht" + }, + "1": { + "then": "Deze weg is niet verlicht" + }, + "2": { + "then": "Deze weg is 's nachts verlicht" + }, + "3": { + "then": "Deze weg is 24/7 verlicht" + } + }, + "question": "Is deze straat verlicht?" + } + }, + "title": { + "render": "Straat" + } + } + }, + "title": "Straatverlichting" + }, "surveillance": { "description": "Op deze open kaart kan je bewakingscamera's vinden.", "shortDescription": "Bewakingscameras en dergelijke", From dccb1daddb761319d4f343881450f6d36520ff1a Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 19 Oct 2021 01:28:42 +0200 Subject: [PATCH 02/15] Fix incomplete license --- assets/themes/street_lighting/license_info.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/themes/street_lighting/license_info.json b/assets/themes/street_lighting/license_info.json index 541b0ed40..d157db54d 100644 --- a/assets/themes/street_lighting/license_info.json +++ b/assets/themes/street_lighting/license_info.json @@ -1,11 +1,12 @@ [ { "path": "street_lamp.svg", + "license": "CC0", "authors": [ "Yohan Boniface" ], "sources": [ - "https://raw.githubusercontent.com/hotosm/HDM-CartoCSS/master/icons/poi/street_lamp.svg" + "https://github.com/hotosm/HDM-CartoCSS/blob/master/icons/poi/street_lamp.svg" ] } ] \ No newline at end of file From 3fbff4126159e352d4dae0f52577180c7addacb5 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 19 Oct 2021 12:11:56 +0200 Subject: [PATCH 03/15] Filter out roads without lit tag in lit_streets --- assets/themes/street_lighting/street_lighting.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index 79ff16975..389336899 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -251,7 +251,8 @@ "osmTags": { "and": [ "highway!=", - "lit!=no" + "lit!=no", + "lit!=" ] } }, From c6ae4e721e543e9131d797027caabd970e670c19 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 19 Oct 2021 12:14:31 +0200 Subject: [PATCH 04/15] More consistent wording --- .../street_lighting/street_lighting.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index 389336899..8e2f66c84 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -282,29 +282,29 @@ "if": "lit=yes", "then": { "en": "This street is lit", - "nl": "Deze weg is verlicht" + "nl": "Deze straat is verlicht" } }, { "if": "lit=no", "then": { - "en": "This road is not lit", - "nl": "Deze weg is niet verlicht" + "en": "This street is not lit", + "nl": "Deze straat is niet verlicht" } }, { "if": "lit=sunset-sunrise", "then": { - "en": "This road is lit at night", - "nl": "Deze weg is 's nachts verlicht" + "en": "This street is lit at night", + "nl": "Deze straat is 's nachts verlicht" }, "hideInAnswer": true }, { "if": "lit=24/7", "then": { - "en": "This road is lit 24/7", - "nl": "Deze weg is 24/7 verlicht" + "en": "This street is lit 24/7", + "nl": "Deze straat is 24/7 verlicht" } } ] @@ -347,29 +347,29 @@ "if": "lit=yes", "then": { "en": "This street is lit", - "nl": "Deze weg is verlicht" + "nl": "Deze straat is verlicht" } }, { "if": "lit=no", "then": { - "en": "This road is not lit", - "nl": "Deze weg is niet verlicht" + "en": "This street is not lit", + "nl": "Deze straat is niet verlicht" } }, { "if": "lit=sunset-sunrise", "then": { - "en": "This road is lit at night", - "nl": "Deze weg is 's nachts verlicht" + "en": "This street is lit at night", + "nl": "Deze straat is 's nachts verlicht" }, "hideInAnswer": true }, { "if": "lit=24/7", "then": { - "en": "This road is lit 24/7", - "nl": "Deze weg is 24/7 verlicht" + "en": "This street is lit 24/7", + "nl": "Deze straat is 24/7 verlicht" } } ] From 33ee2e8747440d6b63c98d156ee9a1970d0780ff Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 19 Oct 2021 13:12:20 +0200 Subject: [PATCH 05/15] Add more detailed questions to street lighting theme --- .../street_lighting/street_lighting.json | 126 +++++++++++++++++- langs/themes/en.json | 56 +++++++- langs/themes/nl.json | 64 +++++++-- 3 files changed, 232 insertions(+), 14 deletions(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index 8e2f66c84..0b0ca2389 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -238,6 +238,128 @@ } } ] + }, + { + "id": "colour", + "question": { + "en": "What colour light does this lamp emit?", + "nl": "Wat voor kleur licht geeft deze lantaarn?" + }, + "render": { + "en": "This lamp emits {light:colour} light", + "nl": "Deze lantaarn geeft {light:colour} licht" + }, + "freeform": { + "key": "light:colour" + }, + "mappings": [ + { + "if": "light:colour=white", + "then": { + "en": "This lamp emits white light", + "nl": "Deze lantaarn geeft wit licht" + } + }, + { + "if": "light:colour=green", + "then": { + "en": "This lamp emits green light", + "nl": "Deze lantaarn geeft groen licht" + } + }, + { + "if": "light:colour=orange", + "then": { + "en": "This lamp emits orange light", + "nl": "Deze lantaarn geeft oranje licht" + } + } + ] + }, + { + "id": "count", + "render": { + "en": "This lamp has {light:count} fixtures", + "nl": "Deze lantaarn heeft {light:count} lampen" + }, + "question": { + "en": "How many fixtures does this light have?", + "nl": "Hoeveel lampen heeft deze lantaarn?" + }, + "condition": "support=pole", + "freeform": { + "key": "light:count", + "type": "pnat" + }, + "mappings": [ + { + "if": "light:count=1", + "then": { + "en": "This lamp has 1 fixture", + "nl": "Deze lantaarn heeft 1 lamp" + } + }, + { + "if": "light:count=2", + "then": { + "en": "This lamp has 2 fixtures", + "nl": "Deze lantaarn heeft 2 lampen" + } + } + ] + }, + { + "id": "lit", + "question": { + "en": "When is this lamp lit?", + "nl": "Wanneer is deze lantaarn verlicht?" + }, + "mappings": [ + { + "if": "light:lit=dusk-dawn", + "then": { + "en": "This lamp is lit at night", + "nl": "Deze lantaarn is 's nachts verlicht" + } + }, + { + "if": "light:lit=24/7", + "then": { + "en": "This lamp is lit 24/7", + "nl": "Deze lantaarn is 24/7 verlicht" + } + }, + { + "if": "light:lit=motion", + "then": { + "en": "This lamp is lit based on motion", + "nl": "Deze lantaarn is verlicht op basis van beweging" + } + }, + { + "if": "light:lit=demand", + "then": { + "en": "This lamp is lit based on demand (e.g. with a pushbutton)", + "nl": "Deze lantaarn is verlicht op verzoek (bijv. met een drukknop)" + } + } + ] + }, + { + "id": "direction", + "render": { + "en": "This lamp points towards {light:direction}", + "nl": "Deze lantaarn is gericht naar {light:direction}" + }, + "question": { + "en": "Where does this lamp point to?", + "nl": "Waar is deze lamp heengericht?" + }, + "condition": "light:count=1", + "freeform": { + "key": "light:direction", + "type": "direction" + } } ] }, @@ -288,7 +410,7 @@ { "if": "lit=no", "then": { - "en": "This street is not lit", + "en": "This road is not lit", "nl": "Deze straat is niet verlicht" } }, @@ -353,7 +475,7 @@ { "if": "lit=no", "then": { - "en": "This street is not lit", + "en": "This road is not lit", "nl": "Deze straat is niet verlicht" } }, diff --git a/langs/themes/en.json b/langs/themes/en.json index 9874ca47a..2bb027ecb 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1238,6 +1238,37 @@ } }, "tagRenderings": { + "colour": { + "mappings": { + "0": { + "then": "This lamp emits white light" + }, + "1": { + "then": "This lamp emits green light" + }, + "2": { + "then": "This lamp emits orange light" + } + }, + "question": "What colour light does this lamp emit?", + "render": "This lamp emits {light:colour} light" + }, + "count": { + "mappings": { + "0": { + "then": "This lamp has 1 fixture" + }, + "1": { + "then": "This lamp has 2 fixtures" + } + }, + "question": "How many fixtures does this light have?", + "render": "This lamp has {light:count} fixtures" + }, + "direction": { + "question": "Where does this lamp point to?", + "render": "This lamp points towards {light:direction}" + }, "lamp_mount": { "mappings": { "0": { @@ -1249,6 +1280,23 @@ }, "question": "How is this lamp mounted to the pole?" }, + "lit": { + "mappings": { + "0": { + "then": "This lamp is lit at night" + }, + "1": { + "then": "This lamp is lit 24/7" + }, + "2": { + "then": "This lamp is lit based on motion" + }, + "3": { + "then": "This lamp is lit based on demand (e.g. with a pushbutton)" + } + }, + "question": "When is this lamp lit?" + }, "method": { "mappings": { "0": { @@ -1337,10 +1385,10 @@ "then": "This road is not lit" }, "2": { - "then": "This road is lit at night" + "then": "This street is lit at night" }, "3": { - "then": "This road is lit 24/7" + "then": "This street is lit 24/7" } }, "question": "Is this street lit?" @@ -1362,10 +1410,10 @@ "then": "This road is not lit" }, "2": { - "then": "This road is lit at night" + "then": "This street is lit at night" }, "3": { - "then": "This road is lit 24/7" + "then": "This street is lit 24/7" } }, "question": "Is this street lit?" diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 7045a2658..edd490c72 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -908,6 +908,37 @@ } }, "tagRenderings": { + "colour": { + "mappings": { + "0": { + "then": "Deze lantaarn geeft wit licht" + }, + "1": { + "then": "Deze lantaarn geeft groen licht" + }, + "2": { + "then": "Deze lantaarn geeft oranje licht" + } + }, + "question": "Wat voor kleur licht geeft deze lantaarn?", + "render": "Deze lantaarn geeft {light:colour} licht" + }, + "count": { + "mappings": { + "0": { + "then": "Deze lantaarn heeft 1 lamp" + }, + "1": { + "then": "Deze lantaarn heeft 2 lampen" + } + }, + "question": "Hoeveel lampen heeft deze lantaarn?", + "render": "Deze lantaarn heeft {light:count} lampen" + }, + "direction": { + "question": "Waar is deze lamp heengericht?", + "render": "Deze lantaarn is gericht naar {light:direction}" + }, "lamp_mount": { "mappings": { "0": { @@ -919,6 +950,23 @@ }, "question": "Hoe zit deze lantaarn aan de paal?" }, + "lit": { + "mappings": { + "0": { + "then": "Deze lantaarn is 's nachts verlicht" + }, + "1": { + "then": "Deze lantaarn is 24/7 verlicht" + }, + "2": { + "then": "Deze lantaarn is verlicht op basis van beweging" + }, + "3": { + "then": "Deze lantaarn is verlicht op verzoek (bijv. met een drukknop)" + } + }, + "question": "Wanneer is deze lantaarn verlicht?" + }, "method": { "mappings": { "0": { @@ -1001,16 +1049,16 @@ "lit": { "mappings": { "0": { - "then": "Deze weg is verlicht" + "then": "Deze straat is verlicht" }, "1": { - "then": "Deze weg is niet verlicht" + "then": "Deze straat is niet verlicht" }, "2": { - "then": "Deze weg is 's nachts verlicht" + "then": "Deze straat is 's nachts verlicht" }, "3": { - "then": "Deze weg is 24/7 verlicht" + "then": "Deze straat is 24/7 verlicht" } }, "question": "Is deze straat verlicht?" @@ -1026,16 +1074,16 @@ "lit": { "mappings": { "0": { - "then": "Deze weg is verlicht" + "then": "Deze straat is verlicht" }, "1": { - "then": "Deze weg is niet verlicht" + "then": "Deze straat is niet verlicht" }, "2": { - "then": "Deze weg is 's nachts verlicht" + "then": "Deze straat is 's nachts verlicht" }, "3": { - "then": "Deze weg is 24/7 verlicht" + "then": "Deze straat is 24/7 verlicht" } }, "question": "Is deze straat verlicht?" From b9f32749b0ca93045b5f19a58299e5a5a0d15e05 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 19 Oct 2021 14:49:44 +0200 Subject: [PATCH 06/15] Added color icon --- .../street_lighting/street_lighting.json | 30 +++++++++++++++++-- langs/themes/en.json | 5 ++++ langs/themes/nl.json | 5 ++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index 0b0ca2389..318c7c781 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -1,7 +1,7 @@ { "id": "street_lighting", "maintainer": "Robin van der Linde", - "version": "20211018", + "version": "20211019", "language": [ "en", "nl" @@ -33,9 +33,35 @@ "render": { "en": "Street Lamp", "nl": "Straatlantaarn" - } + }, + "mappings": [ + { + "if": "ref~*", + "then": { + "en": "Street Lamp {ref}", + "nl": "Straatlantaarn {ref}" + } + } + ] }, "icon": "./assets/themes/street_lighting/street_lamp.svg", + "iconOverlays": [ + { + "if": "light:colour=white", + "then": "circle:white", + "badge": true + }, + { + "if": "light:colour=orange", + "then": "circle:#FFB000", + "badge": true + }, + { + "if": "light:colour=green", + "then": "circle:#55FF55", + "badge": true + } + ], "presets": [ { "title": { diff --git a/langs/themes/en.json b/langs/themes/en.json index 2bb027ecb..c48072aa6 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1370,6 +1370,11 @@ } }, "title": { + "mappings": { + "0": { + "then": "Street Lamp {ref}" + } + }, "render": "Street Lamp" } }, diff --git a/langs/themes/nl.json b/langs/themes/nl.json index edd490c72..e4f9fae6f 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -1040,6 +1040,11 @@ } }, "title": { + "mappings": { + "0": { + "then": "Straatlantaarn {ref}" + } + }, "render": "Straatlantaarn" } }, From 445734470707c188b3b4a128efc8f7c5e043641d Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 20 Oct 2021 01:44:20 +0200 Subject: [PATCH 07/15] Add colour pick to light:colour question --- assets/themes/street_lighting/street_lighting.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index 318c7c781..aafa12838 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -276,7 +276,8 @@ "nl": "Deze lantaarn geeft {light:colour} licht" }, "freeform": { - "key": "light:colour" + "key": "light:colour", + "type": "color" }, "mappings": [ { From c71e5e8423dfa7db754b9a69ee927a4556907496 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 23 Oct 2021 00:46:47 +0200 Subject: [PATCH 08/15] Split off street lamps, test with Assen Open Data --- .../street_lamps}/license_info.json | 0 .../street_lamps}/street_lamp.svg | 0 assets/layers/street_lamps/street_lamps.json | 371 +++++++++++++++++ .../street_lighting/street_lighting.json | 376 +----------------- .../street_lighting_assen.json | 50 +++ langs/layers/en.json | 148 +++++++ langs/layers/nl.json | 148 +++++++ langs/themes/en.json | 148 ------- langs/themes/nl.json | 152 +------ 9 files changed, 724 insertions(+), 669 deletions(-) rename assets/{themes/street_lighting => layers/street_lamps}/license_info.json (100%) rename assets/{themes/street_lighting => layers/street_lamps}/street_lamp.svg (100%) create mode 100644 assets/layers/street_lamps/street_lamps.json create mode 100644 assets/themes/street_lighting/street_lighting_assen.json diff --git a/assets/themes/street_lighting/license_info.json b/assets/layers/street_lamps/license_info.json similarity index 100% rename from assets/themes/street_lighting/license_info.json rename to assets/layers/street_lamps/license_info.json diff --git a/assets/themes/street_lighting/street_lamp.svg b/assets/layers/street_lamps/street_lamp.svg similarity index 100% rename from assets/themes/street_lighting/street_lamp.svg rename to assets/layers/street_lamps/street_lamp.svg diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json new file mode 100644 index 000000000..40b37e88c --- /dev/null +++ b/assets/layers/street_lamps/street_lamps.json @@ -0,0 +1,371 @@ +{ + "id": "street_lamps", + "name": { + "en": "Street Lamps", + "nl": "Straatlantaarns" + }, + "source": { + "osmTags": "highway=street_lamp" + }, + "minZoom": 16, + "title": { + "render": { + "en": "Street Lamp", + "nl": "Straatlantaarn" + }, + "mappings": [ + { + "if": "ref~*", + "then": { + "en": "Street Lamp {ref}", + "nl": "Straatlantaarn {ref}" + } + } + ] + }, + "icon": "./assets/layers/street_lamps/street_lamp.svg", + "iconOverlays": [ + { + "if": "light:colour=white", + "then": "circle:white", + "badge": true + }, + { + "if": "light:colour=orange", + "then": "circle:#FFB000", + "badge": true + }, + { + "if": "light:colour=green", + "then": "circle:#55FF55", + "badge": true + } + ], + "presets": [ + { + "title": { + "en": "street lamp", + "nl": "straatlantaarn" + }, + "tags": [ + "highway=street_lamp" + ], + "preciseInput": true + } + ], + "tagRenderings": [ + { + "id": "ref", + "render": { + "en": "This street lamp has the reference number {ref}", + "nl": "Deze straatlantaarn heeft het nummer {ref}" + }, + "question": { + "en": "What is the reference number of this street lamp?", + "nl": "Wat is het nummer van deze straatlantaarn?" + }, + "freeform": { + "key": "ref" + } + }, + { + "id": "support", + "question": { + "en": "How is this street lamp mounted?", + "nl": "Hoe is deze straatlantaarn gemonteerd?" + }, + "mappings": [ + { + "if": "support=catenary", + "then": { + "en": "This lamp is suspended using cables", + "nl": "Deze lantaarn hangt aan kabels" + } + }, + { + "if": "support=ceiling", + "then": { + "en": "This lamp is mounted on a ceiling", + "nl": "Deze lantaarn hangt aan een plafond" + } + }, + { + "if": "support=ground", + "then": { + "en": "This lamp is mounted in the ground", + "nl": "Deze lantaarn zit in de grond" + } + }, + { + "if": "support=pedestal", + "then": { + "en": "This lamp is mounted on a short pole (mostly < 1.5m)", + "nl": "Deze lantaarn zit op een korte paal (meestal < 1.5m)" + } + }, + { + "if": "support=pole", + "then": { + "en": "This lamp is mounted on a pole", + "nl": "Deze lantaarn zit op een paal" + } + }, + { + "if": "support=wall", + "then": { + "en": "This lamp is mounted directly to the wall", + "nl": "Deze lantaarn hangt direct aan de muur" + } + }, + { + "if": "support=wall_mount", + "then": { + "en": "This lamp is mounted to the wall using a metal bar", + "nl": "Deze lantaarn hangt aan de muur met een metalen balk" + } + } + ] + }, + { + "id": "lamp_mount", + "question": { + "en": "How is this lamp mounted to the pole?", + "nl": "Hoe zit deze lantaarn aan de paal?" + }, + "condition": "support=pole", + "mappings": [ + { + "if": "lamp_mount=straight_mast", + "then": { + "en": "This lamp sits atop of a straight mast", + "nl": "Deze lantaarn zit boven op een rechte paal" + } + }, + { + "if": "lamp_mount=bent_mast", + "then": { + "en": "This lamp sits at the end of a bent mast", + "nl": "Deze lantaarn zit aan het eind van een gebogen paal" + } + } + ] + }, + { + "id": "method", + "question": { + "en": "What kind of lighting does this lamp use?", + "nl": "Wat voor verlichting gebruikt deze lantaarn?" + }, + "mappings": [ + { + "if": "light:method=electric", + "then": { + "en": "This lamp is lit electrically", + "nl": "Deze lantaarn is elektrisch verlicht" + }, + "hideInAnswer": true + }, + { + "if": "light:method=LED", + "then": { + "en": "This lamp uses LEDs", + "nl": "Deze lantaarn gebruikt LEDs" + } + }, + { + "if": "light:method=incandescent", + "then": { + "en": "This lamp uses incandescent lighting", + "nl": "Deze lantaarn gebruikt gloeilampen" + } + }, + { + "if": "light:method=halogen", + "then": { + "en": "This lamp uses halogen lighting", + "nl": "Deze lantaarn gebruikt halogeen verlichting" + } + }, + { + "if": "light:method=discharge", + "then": { + "en": "This lamp uses discharge lamps (unknown type)", + "nl": "Deze lantaarn gebruikt gasontladingslampen (onbekend type)" + } + }, + { + "if": "light:method=mercury", + "then": { + "en": "This lamp uses a mercury-vapour lamp (lightly blueish)", + "nl": "Deze lantaarn gebruikt een kwiklamp (enigszins blauwachtig)" + } + }, + { + "if": "light:method=metal-halide", + "then": { + "en": "This lamp uses metal-halide lamps (bright white)", + "nl": "Deze lantaarn gebruikt metaalhalidelampen" + } + }, + { + "if": "light:method=fluorescent", + "then": { + "en": "This lamp uses fluorescent lighting", + "nl": "Deze lantaarn gebruikt fluorescentieverlichting (TL en spaarlamp)" + } + }, + { + "if": "light:method=sodium", + "then": { + "en": "This lamp uses sodium lamps (unknown type)", + "nl": "Deze lantaarn gebruikt natriumlampen (onbekend type)" + } + }, + { + "if": "light:method=low_pressure_sodium", + "then": { + "en": "This lamp uses low pressure sodium lamps (monochrome orange)", + "nl": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" + } + }, + { + "if": "light:method=high_pressure_sodium", + "then": { + "en": "This lamp uses high pressure sodium lamps (orange with white)", + "nl": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" + } + }, + { + "if": "light:method=gas", + "then": { + "en": "This lamp is lit using gas", + "nl": "Deze lantaarn wordt verlicht met gas" + } + } + ] + }, + { + "id": "colour", + "question": { + "en": "What colour light does this lamp emit?", + "nl": "Wat voor kleur licht geeft deze lantaarn?" + }, + "render": { + "en": "This lamp emits {light:colour} light", + "nl": "Deze lantaarn geeft {light:colour} licht" + }, + "freeform": { + "key": "light:colour", + "type": "color" + }, + "mappings": [ + { + "if": "light:colour=white", + "then": { + "en": "This lamp emits white light", + "nl": "Deze lantaarn geeft wit licht" + } + }, + { + "if": "light:colour=green", + "then": { + "en": "This lamp emits green light", + "nl": "Deze lantaarn geeft groen licht" + } + }, + { + "if": "light:colour=orange", + "then": { + "en": "This lamp emits orange light", + "nl": "Deze lantaarn geeft oranje licht" + } + } + ] + }, + { + "id": "count", + "render": { + "en": "This lamp has {light:count} fixtures", + "nl": "Deze lantaarn heeft {light:count} lampen" + }, + "question": { + "en": "How many fixtures does this light have?", + "nl": "Hoeveel lampen heeft deze lantaarn?" + }, + "condition": "support=pole", + "freeform": { + "key": "light:count", + "type": "pnat" + }, + "mappings": [ + { + "if": "light:count=1", + "then": { + "en": "This lamp has 1 fixture", + "nl": "Deze lantaarn heeft 1 lamp" + } + }, + { + "if": "light:count=2", + "then": { + "en": "This lamp has 2 fixtures", + "nl": "Deze lantaarn heeft 2 lampen" + } + } + ] + }, + { + "id": "lit", + "question": { + "en": "When is this lamp lit?", + "nl": "Wanneer is deze lantaarn verlicht?" + }, + "mappings": [ + { + "if": "light:lit=dusk-dawn", + "then": { + "en": "This lamp is lit at night", + "nl": "Deze lantaarn is 's nachts verlicht" + } + }, + { + "if": "light:lit=24/7", + "then": { + "en": "This lamp is lit 24/7", + "nl": "Deze lantaarn is 24/7 verlicht" + } + }, + { + "if": "light:lit=motion", + "then": { + "en": "This lamp is lit based on motion", + "nl": "Deze lantaarn is verlicht op basis van beweging" + } + }, + { + "if": "light:lit=demand", + "then": { + "en": "This lamp is lit based on demand (e.g. with a pushbutton)", + "nl": "Deze lantaarn is verlicht op verzoek (bijv. met een drukknop)" + } + } + ] + }, + { + "id": "direction", + "render": { + "en": "This lamp points towards {light:direction}", + "nl": "Deze lantaarn is gericht naar {light:direction}" + }, + "question": { + "en": "Where does this lamp point to?", + "nl": "Waar is deze lamp heengericht?" + }, + "condition": "light:count=1", + "freeform": { + "key": "light:direction", + "type": "direction" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index aafa12838..31a94c047 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -1,7 +1,7 @@ { "id": "street_lighting", "maintainer": "Robin van der Linde", - "version": "20211019", + "version": "2021-10-22", "language": [ "en", "nl" @@ -14,382 +14,12 @@ "en": "A theme showing information about street lamps, like light type, mounting, light colour and much more.", "nl": "Een thema met details over straatlantaarns zoals verlichtingstype, montage, lichtkleur en veel meer." }, - "icon": "./assets/themes/street_lighting/street_lamp.svg", + "icon": "./assets/layers/street_lamps/street_lamp.svg", "startZoom": 19, "startLat": 52.99319, "startLon": 6.56113, "layers": [ - { - "id": "streetlamps", - "name": { - "en": "Street Lamps", - "nl": "Straatlantaarns" - }, - "source": { - "osmTags": "highway=street_lamp" - }, - "minZoom": 16, - "title": { - "render": { - "en": "Street Lamp", - "nl": "Straatlantaarn" - }, - "mappings": [ - { - "if": "ref~*", - "then": { - "en": "Street Lamp {ref}", - "nl": "Straatlantaarn {ref}" - } - } - ] - }, - "icon": "./assets/themes/street_lighting/street_lamp.svg", - "iconOverlays": [ - { - "if": "light:colour=white", - "then": "circle:white", - "badge": true - }, - { - "if": "light:colour=orange", - "then": "circle:#FFB000", - "badge": true - }, - { - "if": "light:colour=green", - "then": "circle:#55FF55", - "badge": true - } - ], - "presets": [ - { - "title": { - "en": "street lamp", - "nl": "straatlantaarn" - }, - "tags": [ - "highway=street_lamp" - ], - "preciseInput": true - } - ], - "tagRenderings": [ - { - "id": "ref", - "render": { - "en": "This street lamp has the reference number {ref}", - "nl": "Deze straatlantaarn heeft het nummer {ref}" - }, - "question": { - "en": "What is the reference number of this street lamp?", - "nl": "Wat is het nummer van deze straatlantaarn?" - }, - "freeform": { - "key": "ref" - } - }, - { - "id": "support", - "question": { - "en": "How is this street lamp mounted?", - "nl": "Hoe is deze straatlantaarn gemonteerd?" - }, - "mappings": [ - { - "if": "support=catenary", - "then": { - "en": "This lamp is suspended using cables", - "nl": "Deze lantaarn hangt aan kabels" - } - }, - { - "if": "support=ceiling", - "then": { - "en": "This lamp is mounted on a ceiling", - "nl": "Deze lantaarn hangt aan een plafond" - } - }, - { - "if": "support=ground", - "then": { - "en": "This lamp is mounted in the ground", - "nl": "Deze lantaarn zit in de grond" - } - }, - { - "if": "support=pedestal", - "then": { - "en": "This lamp is mounted on a short pole (mostly < 1.5m)", - "nl": "Deze lantaarn zit op een korte paal (meestal < 1.5m)" - } - }, - { - "if": "support=pole", - "then": { - "en": "This lamp is mounted on a pole", - "nl": "Deze lantaarn zit op een paal" - } - }, - { - "if": "support=wall", - "then": { - "en": "This lamp is mounted directly to the wall", - "nl": "Deze lantaarn hangt direct aan de muur" - } - }, - { - "if": "support=wall_mount", - "then": { - "en": "This lamp is mounted to the wall using a metal bar", - "nl": "Deze lantaarn hangt aan de muur met een metalen balk" - } - } - ] - }, - { - "id": "lamp_mount", - "question": { - "en": "How is this lamp mounted to the pole?", - "nl": "Hoe zit deze lantaarn aan de paal?" - }, - "condition": "support=pole", - "mappings": [ - { - "if": "lamp_mount=straight_mast", - "then": { - "en": "This lamp sits atop of a straight mast", - "nl": "Deze lantaarn zit boven op een rechte paal" - } - }, - { - "if": "lamp_mount=bent_mast", - "then": { - "en": "This lamp sits at the end of a bent mast", - "nl": "Deze lantaarn zit aan het eind van een gebogen paal" - } - } - ] - }, - { - "id": "method", - "question": { - "en": "What kind of lighting does this lamp use?", - "nl": "Wat voor verlichting gebruikt deze lantaarn?" - }, - "mappings": [ - { - "if": "light:method=electric", - "then": { - "en": "This lamp is lit electrically", - "nl": "Deze lantaarn is elektrisch verlicht" - }, - "hideInAnswer": true - }, - { - "if": "light:method=LED", - "then": { - "en": "This lamp uses LEDs", - "nl": "Deze lantaarn gebruikt LEDs" - } - }, - { - "if": "light:method=incandescent", - "then": { - "en": "This lamp uses incandescent lighting", - "nl": "Deze lantaarn gebruikt gloeilampen" - } - }, - { - "if": "light:method=halogen", - "then": { - "en": "This lamp uses halogen lighting", - "nl": "Deze lantaarn gebruikt halogeen verlichting" - } - }, - { - "if": "light:method=discharge", - "then": { - "en": "This lamp uses discharge lamps (unknown type)", - "nl": "Deze lantaarn gebruikt gasontladingslampen (onbekend type)" - } - }, - { - "if": "light:method=mercury", - "then": { - "en": "This lamp uses a mercury-vapour lamp (lightly blueish)", - "nl": "Deze lantaarn gebruikt een kwiklamp (enigszins blauwachtig)" - } - }, - { - "if": "light:method=metal-halide", - "then": { - "en": "This lamp uses metal-halide lamps (bright white)", - "nl": "Deze lantaarn gebruikt metaalhalidelampen" - } - }, - { - "if": "light:method=fluorescent", - "then": { - "en": "This lamp uses fluorescent lighting", - "nl": "Deze lantaarn gebruikt fluorescentieverlichting (TL en spaarlamp)" - } - }, - { - "if": "light:method=sodium", - "then": { - "en": "This lamp uses sodium lamps (unknown type)", - "nl": "Deze lantaarn gebruikt natriumlampen (onbekend type)" - } - }, - { - "if": "light:method=low_pressure_sodium", - "then": { - "en": "This lamp uses low pressure sodium lamps (monochrome orange)", - "nl": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" - } - }, - { - "if": "light:method=high_pressure_sodium", - "then": { - "en": "This lamp uses high pressure sodium lamps (orange with white)", - "nl": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" - } - }, - { - "if": "light:method=gas", - "then": { - "en": "This lamp is lit using gas", - "nl": "Deze lantaarn wordt verlicht met gas" - } - } - ] - }, - { - "id": "colour", - "question": { - "en": "What colour light does this lamp emit?", - "nl": "Wat voor kleur licht geeft deze lantaarn?" - }, - "render": { - "en": "This lamp emits {light:colour} light", - "nl": "Deze lantaarn geeft {light:colour} licht" - }, - "freeform": { - "key": "light:colour", - "type": "color" - }, - "mappings": [ - { - "if": "light:colour=white", - "then": { - "en": "This lamp emits white light", - "nl": "Deze lantaarn geeft wit licht" - } - }, - { - "if": "light:colour=green", - "then": { - "en": "This lamp emits green light", - "nl": "Deze lantaarn geeft groen licht" - } - }, - { - "if": "light:colour=orange", - "then": { - "en": "This lamp emits orange light", - "nl": "Deze lantaarn geeft oranje licht" - } - } - ] - }, - { - "id": "count", - "render": { - "en": "This lamp has {light:count} fixtures", - "nl": "Deze lantaarn heeft {light:count} lampen" - }, - "question": { - "en": "How many fixtures does this light have?", - "nl": "Hoeveel lampen heeft deze lantaarn?" - }, - "condition": "support=pole", - "freeform": { - "key": "light:count", - "type": "pnat" - }, - "mappings": [ - { - "if": "light:count=1", - "then": { - "en": "This lamp has 1 fixture", - "nl": "Deze lantaarn heeft 1 lamp" - } - }, - { - "if": "light:count=2", - "then": { - "en": "This lamp has 2 fixtures", - "nl": "Deze lantaarn heeft 2 lampen" - } - } - ] - }, - { - "id": "lit", - "question": { - "en": "When is this lamp lit?", - "nl": "Wanneer is deze lantaarn verlicht?" - }, - "mappings": [ - { - "if": "light:lit=dusk-dawn", - "then": { - "en": "This lamp is lit at night", - "nl": "Deze lantaarn is 's nachts verlicht" - } - }, - { - "if": "light:lit=24/7", - "then": { - "en": "This lamp is lit 24/7", - "nl": "Deze lantaarn is 24/7 verlicht" - } - }, - { - "if": "light:lit=motion", - "then": { - "en": "This lamp is lit based on motion", - "nl": "Deze lantaarn is verlicht op basis van beweging" - } - }, - { - "if": "light:lit=demand", - "then": { - "en": "This lamp is lit based on demand (e.g. with a pushbutton)", - "nl": "Deze lantaarn is verlicht op verzoek (bijv. met een drukknop)" - } - } - ] - }, - { - "id": "direction", - "render": { - "en": "This lamp points towards {light:direction}", - "nl": "Deze lantaarn is gericht naar {light:direction}" - }, - "question": { - "en": "Where does this lamp point to?", - "nl": "Waar is deze lamp heengericht?" - }, - "condition": "light:count=1", - "freeform": { - "key": "light:direction", - "type": "direction" - } - } - ] - }, + "street_lamps", { "id": "lit_streets", "name": { diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json new file mode 100644 index 000000000..2acfffa96 --- /dev/null +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -0,0 +1,50 @@ +{ + "id": "street_lighting_assen", + "maintainer": "Robin van der Linde", + "version": "2021-10-22", + "language": [ + "nl" + ], + "title": { + "nl": "Straatverlichting Assen" + }, + "description": { + "nl": "Straatverlichtingkaart met dataset Assen" + }, + "icon": "./assets/layers/street_lamps/street_lamp.svg", + "startZoom": 19, + "startLat": 52.99319, + "startLon": 6.56113, + "layers": [ + "street_lamps", + { + "id": "Assen", + "name": "Dataset Assen", + "source": { + "osmTags": "Lichtmastnummer~*", + "geoJson": "https://opendata.arcgis.com/datasets/ba37cdb372064b3199c548b75d16a609_0.geojson", + "isOsmCache": false + }, + "calculatedTags": [ + "_closest_osm_street_lamp=feat.closest('street_lamps')?.properties?.id", + "_closest_osm_street_lamp_distance=feat.distanceTo(feat.properties._closest_osm_street_lamp) * 1000", + "_has_closeby_feature=Number(feat.properties._closest_osm_street_lamp_distance) < 5 ? 'yes' : 'no'" + ], + "title": "Straatlantaarn in dataset", + "icon": { + "render": "circle:red", + "mappings": [ + { + "if": "_has_closeby_feature=yes", + "then": "circle:#008000aa" + } + ] + }, + "iconSize": "20,20,center", + "tagRenderings": [ + "all_tags" + ] + } + ], + "hideFromOverview": true +} \ No newline at end of file diff --git a/langs/layers/en.json b/langs/layers/en.json index dd3acaee9..ac83b2b58 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -3395,6 +3395,154 @@ "render": "Sport pitch" } }, + "street_lamps": { + "name": "Street Lamps", + "presets": { + "0": { + "title": "street lamp" + } + }, + "tagRenderings": { + "colour": { + "mappings": { + "0": { + "then": "This lamp emits white light" + }, + "1": { + "then": "This lamp emits green light" + }, + "2": { + "then": "This lamp emits orange light" + } + }, + "question": "What colour light does this lamp emit?", + "render": "This lamp emits {light:colour} light" + }, + "count": { + "mappings": { + "0": { + "then": "This lamp has 1 fixture" + }, + "1": { + "then": "This lamp has 2 fixtures" + } + }, + "question": "How many fixtures does this light have?", + "render": "This lamp has {light:count} fixtures" + }, + "direction": { + "question": "Where does this lamp point to?", + "render": "This lamp points towards {light:direction}" + }, + "lamp_mount": { + "mappings": { + "0": { + "then": "This lamp sits atop of a straight mast" + }, + "1": { + "then": "This lamp sits at the end of a bent mast" + } + }, + "question": "How is this lamp mounted to the pole?" + }, + "lit": { + "mappings": { + "0": { + "then": "This lamp is lit at night" + }, + "1": { + "then": "This lamp is lit 24/7" + }, + "2": { + "then": "This lamp is lit based on motion" + }, + "3": { + "then": "This lamp is lit based on demand (e.g. with a pushbutton)" + } + }, + "question": "When is this lamp lit?" + }, + "method": { + "mappings": { + "0": { + "then": "This lamp is lit electrically" + }, + "1": { + "then": "This lamp uses LEDs" + }, + "2": { + "then": "This lamp uses incandescent lighting" + }, + "3": { + "then": "This lamp uses halogen lighting" + }, + "4": { + "then": "This lamp uses discharge lamps (unknown type)" + }, + "5": { + "then": "This lamp uses a mercury-vapour lamp (lightly blueish)" + }, + "6": { + "then": "This lamp uses metal-halide lamps (bright white)" + }, + "7": { + "then": "This lamp uses fluorescent lighting" + }, + "8": { + "then": "This lamp uses sodium lamps (unknown type)" + }, + "9": { + "then": "This lamp uses low pressure sodium lamps (monochrome orange)" + }, + "10": { + "then": "This lamp uses high pressure sodium lamps (orange with white)" + }, + "11": { + "then": "This lamp is lit using gas" + } + }, + "question": "What kind of lighting does this lamp use?" + }, + "ref": { + "question": "What is the reference number of this street lamp?", + "render": "This street lamp has the reference number {ref}" + }, + "support": { + "mappings": { + "0": { + "then": "This lamp is suspended using cables" + }, + "1": { + "then": "This lamp is mounted on a ceiling" + }, + "2": { + "then": "This lamp is mounted in the ground" + }, + "3": { + "then": "This lamp is mounted on a short pole (mostly < 1.5m)" + }, + "4": { + "then": "This lamp is mounted on a pole" + }, + "5": { + "then": "This lamp is mounted directly to the wall" + }, + "6": { + "then": "This lamp is mounted to the wall using a metal bar" + } + }, + "question": "How is this street lamp mounted?" + } + }, + "title": { + "mappings": { + "0": { + "then": "Street Lamp {ref}" + } + }, + "render": "Street Lamp" + } + }, "surveillance_camera": { "name": "Surveillance camera's", "tagRenderings": { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index b484dc8c4..d3f3f6d41 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3623,6 +3623,154 @@ "render": "Sportterrein" } }, + "street_lamps": { + "name": "Straatlantaarns", + "presets": { + "0": { + "title": "straatlantaarn" + } + }, + "tagRenderings": { + "colour": { + "mappings": { + "0": { + "then": "Deze lantaarn geeft wit licht" + }, + "1": { + "then": "Deze lantaarn geeft groen licht" + }, + "2": { + "then": "Deze lantaarn geeft oranje licht" + } + }, + "question": "Wat voor kleur licht geeft deze lantaarn?", + "render": "Deze lantaarn geeft {light:colour} licht" + }, + "count": { + "mappings": { + "0": { + "then": "Deze lantaarn heeft 1 lamp" + }, + "1": { + "then": "Deze lantaarn heeft 2 lampen" + } + }, + "question": "Hoeveel lampen heeft deze lantaarn?", + "render": "Deze lantaarn heeft {light:count} lampen" + }, + "direction": { + "question": "Waar is deze lamp heengericht?", + "render": "Deze lantaarn is gericht naar {light:direction}" + }, + "lamp_mount": { + "mappings": { + "0": { + "then": "Deze lantaarn zit boven op een rechte paal" + }, + "1": { + "then": "Deze lantaarn zit aan het eind van een gebogen paal" + } + }, + "question": "Hoe zit deze lantaarn aan de paal?" + }, + "lit": { + "mappings": { + "0": { + "then": "Deze lantaarn is 's nachts verlicht" + }, + "1": { + "then": "Deze lantaarn is 24/7 verlicht" + }, + "2": { + "then": "Deze lantaarn is verlicht op basis van beweging" + }, + "3": { + "then": "Deze lantaarn is verlicht op verzoek (bijv. met een drukknop)" + } + }, + "question": "Wanneer is deze lantaarn verlicht?" + }, + "method": { + "mappings": { + "0": { + "then": "Deze lantaarn is elektrisch verlicht" + }, + "1": { + "then": "Deze lantaarn gebruikt LEDs" + }, + "2": { + "then": "Deze lantaarn gebruikt gloeilampen" + }, + "3": { + "then": "Deze lantaarn gebruikt halogeen verlichting" + }, + "4": { + "then": "Deze lantaarn gebruikt gasontladingslampen (onbekend type)" + }, + "5": { + "then": "Deze lantaarn gebruikt een kwiklamp (enigszins blauwachtig)" + }, + "6": { + "then": "Deze lantaarn gebruikt metaalhalidelampen" + }, + "7": { + "then": "Deze lantaarn gebruikt fluorescentieverlichting (TL en spaarlamp)" + }, + "8": { + "then": "Deze lantaarn gebruikt natriumlampen (onbekend type)" + }, + "9": { + "then": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" + }, + "10": { + "then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" + }, + "11": { + "then": "Deze lantaarn wordt verlicht met gas" + } + }, + "question": "Wat voor verlichting gebruikt deze lantaarn?" + }, + "ref": { + "question": "Wat is het nummer van deze straatlantaarn?", + "render": "Deze straatlantaarn heeft het nummer {ref}" + }, + "support": { + "mappings": { + "0": { + "then": "Deze lantaarn hangt aan kabels" + }, + "1": { + "then": "Deze lantaarn hangt aan een plafond" + }, + "2": { + "then": "Deze lantaarn zit in de grond" + }, + "3": { + "then": "Deze lantaarn zit op een korte paal (meestal < 1.5m)" + }, + "4": { + "then": "Deze lantaarn zit op een paal" + }, + "5": { + "then": "Deze lantaarn hangt direct aan de muur" + }, + "6": { + "then": "Deze lantaarn hangt aan de muur met een metalen balk" + } + }, + "question": "Hoe is deze straatlantaarn gemonteerd?" + } + }, + "title": { + "mappings": { + "0": { + "then": "Straatlantaarn {ref}" + } + }, + "render": "Straatlantaarn" + } + }, "surveillance_camera": { "name": "Bewakingscamera's", "tagRenderings": { diff --git a/langs/themes/en.json b/langs/themes/en.json index c48072aa6..4d0e46575 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1230,154 +1230,6 @@ "street_lighting": { "description": "A theme showing information about street lamps, like light type, mounting, light colour and much more.", "layers": { - "0": { - "name": "Street Lamps", - "presets": { - "0": { - "title": "street lamp" - } - }, - "tagRenderings": { - "colour": { - "mappings": { - "0": { - "then": "This lamp emits white light" - }, - "1": { - "then": "This lamp emits green light" - }, - "2": { - "then": "This lamp emits orange light" - } - }, - "question": "What colour light does this lamp emit?", - "render": "This lamp emits {light:colour} light" - }, - "count": { - "mappings": { - "0": { - "then": "This lamp has 1 fixture" - }, - "1": { - "then": "This lamp has 2 fixtures" - } - }, - "question": "How many fixtures does this light have?", - "render": "This lamp has {light:count} fixtures" - }, - "direction": { - "question": "Where does this lamp point to?", - "render": "This lamp points towards {light:direction}" - }, - "lamp_mount": { - "mappings": { - "0": { - "then": "This lamp sits atop of a straight mast" - }, - "1": { - "then": "This lamp sits at the end of a bent mast" - } - }, - "question": "How is this lamp mounted to the pole?" - }, - "lit": { - "mappings": { - "0": { - "then": "This lamp is lit at night" - }, - "1": { - "then": "This lamp is lit 24/7" - }, - "2": { - "then": "This lamp is lit based on motion" - }, - "3": { - "then": "This lamp is lit based on demand (e.g. with a pushbutton)" - } - }, - "question": "When is this lamp lit?" - }, - "method": { - "mappings": { - "0": { - "then": "This lamp is lit electrically" - }, - "1": { - "then": "This lamp uses LEDs" - }, - "2": { - "then": "This lamp uses incandescent lighting" - }, - "3": { - "then": "This lamp uses halogen lighting" - }, - "4": { - "then": "This lamp uses discharge lamps (unknown type)" - }, - "5": { - "then": "This lamp uses a mercury-vapour lamp (lightly blueish)" - }, - "6": { - "then": "This lamp uses metal-halide lamps (bright white)" - }, - "7": { - "then": "This lamp uses fluorescent lighting" - }, - "8": { - "then": "This lamp uses sodium lamps (unknown type)" - }, - "9": { - "then": "This lamp uses low pressure sodium lamps (monochrome orange)" - }, - "10": { - "then": "This lamp uses high pressure sodium lamps (orange with white)" - }, - "11": { - "then": "This lamp is lit using gas" - } - }, - "question": "What kind of lighting does this lamp use?" - }, - "ref": { - "question": "What is the reference number of this street lamp?", - "render": "This street lamp has the reference number {ref}" - }, - "support": { - "mappings": { - "0": { - "then": "This lamp is suspended using cables" - }, - "1": { - "then": "This lamp is mounted on a ceiling" - }, - "2": { - "then": "This lamp is mounted in the ground" - }, - "3": { - "then": "This lamp is mounted on a short pole (mostly < 1.5m)" - }, - "4": { - "then": "This lamp is mounted on a pole" - }, - "5": { - "then": "This lamp is mounted directly to the wall" - }, - "6": { - "then": "This lamp is mounted to the wall using a metal bar" - } - }, - "question": "How is this street lamp mounted?" - } - }, - "title": { - "mappings": { - "0": { - "then": "Street Lamp {ref}" - } - }, - "render": "Street Lamp" - } - }, "1": { "name": "Lit streets", "tagRenderings": { diff --git a/langs/themes/nl.json b/langs/themes/nl.json index e4f9fae6f..5848cc0a5 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -900,154 +900,6 @@ "street_lighting": { "description": "Een thema met details over straatlantaarns zoals verlichtingstype, montage, lichtkleur en veel meer.", "layers": { - "0": { - "name": "Straatlantaarns", - "presets": { - "0": { - "title": "straatlantaarn" - } - }, - "tagRenderings": { - "colour": { - "mappings": { - "0": { - "then": "Deze lantaarn geeft wit licht" - }, - "1": { - "then": "Deze lantaarn geeft groen licht" - }, - "2": { - "then": "Deze lantaarn geeft oranje licht" - } - }, - "question": "Wat voor kleur licht geeft deze lantaarn?", - "render": "Deze lantaarn geeft {light:colour} licht" - }, - "count": { - "mappings": { - "0": { - "then": "Deze lantaarn heeft 1 lamp" - }, - "1": { - "then": "Deze lantaarn heeft 2 lampen" - } - }, - "question": "Hoeveel lampen heeft deze lantaarn?", - "render": "Deze lantaarn heeft {light:count} lampen" - }, - "direction": { - "question": "Waar is deze lamp heengericht?", - "render": "Deze lantaarn is gericht naar {light:direction}" - }, - "lamp_mount": { - "mappings": { - "0": { - "then": "Deze lantaarn zit boven op een rechte paal" - }, - "1": { - "then": "Deze lantaarn zit aan het eind van een gebogen paal" - } - }, - "question": "Hoe zit deze lantaarn aan de paal?" - }, - "lit": { - "mappings": { - "0": { - "then": "Deze lantaarn is 's nachts verlicht" - }, - "1": { - "then": "Deze lantaarn is 24/7 verlicht" - }, - "2": { - "then": "Deze lantaarn is verlicht op basis van beweging" - }, - "3": { - "then": "Deze lantaarn is verlicht op verzoek (bijv. met een drukknop)" - } - }, - "question": "Wanneer is deze lantaarn verlicht?" - }, - "method": { - "mappings": { - "0": { - "then": "Deze lantaarn is elektrisch verlicht" - }, - "1": { - "then": "Deze lantaarn gebruikt LEDs" - }, - "2": { - "then": "Deze lantaarn gebruikt gloeilampen" - }, - "3": { - "then": "Deze lantaarn gebruikt halogeen verlichting" - }, - "4": { - "then": "Deze lantaarn gebruikt gasontladingslampen (onbekend type)" - }, - "5": { - "then": "Deze lantaarn gebruikt een kwiklamp (enigszins blauwachtig)" - }, - "6": { - "then": "Deze lantaarn gebruikt metaalhalidelampen" - }, - "7": { - "then": "Deze lantaarn gebruikt fluorescentieverlichting (TL en spaarlamp)" - }, - "8": { - "then": "Deze lantaarn gebruikt natriumlampen (onbekend type)" - }, - "9": { - "then": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" - }, - "10": { - "then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" - }, - "11": { - "then": "Deze lantaarn wordt verlicht met gas" - } - }, - "question": "Wat voor verlichting gebruikt deze lantaarn?" - }, - "ref": { - "question": "Wat is het nummer van deze straatlantaarn?", - "render": "Deze straatlantaarn heeft het nummer {ref}" - }, - "support": { - "mappings": { - "0": { - "then": "Deze lantaarn hangt aan kabels" - }, - "1": { - "then": "Deze lantaarn hangt aan een plafond" - }, - "2": { - "then": "Deze lantaarn zit in de grond" - }, - "3": { - "then": "Deze lantaarn zit op een korte paal (meestal < 1.5m)" - }, - "4": { - "then": "Deze lantaarn zit op een paal" - }, - "5": { - "then": "Deze lantaarn hangt direct aan de muur" - }, - "6": { - "then": "Deze lantaarn hangt aan de muur met een metalen balk" - } - }, - "question": "Hoe is deze straatlantaarn gemonteerd?" - } - }, - "title": { - "mappings": { - "0": { - "then": "Straatlantaarn {ref}" - } - }, - "render": "Straatlantaarn" - } - }, "1": { "name": "Verlichte straten", "tagRenderings": { @@ -1101,6 +953,10 @@ }, "title": "Straatverlichting" }, + "street_lighting_assen": { + "description": "Straatverlichtingkaart met dataset Assen", + "title": "Straatverlichting Assen" + }, "surveillance": { "description": "Op deze open kaart kan je bewakingscamera's vinden.", "shortDescription": "Bewakingscameras en dergelijke", From d689140c249347bc697653e12488a65cf442d8d7 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 23 Oct 2021 13:23:45 +0200 Subject: [PATCH 09/15] Move over to tiled GeoJSON + update description --- assets/themes/street_lighting/street_lighting.json | 4 ++-- .../themes/street_lighting/street_lighting_assen.json | 11 +++++++---- langs/themes/en.json | 2 +- langs/themes/nl.json | 6 +++--- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index 31a94c047..f1bd77be0 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -11,8 +11,8 @@ "nl": "Straatverlichting" }, "description": { - "en": "A theme showing information about street lamps, like light type, mounting, light colour and much more.", - "nl": "Een thema met details over straatlantaarns zoals verlichtingstype, montage, lichtkleur en veel meer." + "en": "On this map you can find everything about street lighting", + "nl": "Op deze kaart vind je alles over straatlantaarns" }, "icon": "./assets/layers/street_lamps/street_lamp.svg", "startZoom": 19, diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json index 2acfffa96..799950826 100644 --- a/assets/themes/street_lighting/street_lighting_assen.json +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -3,13 +3,14 @@ "maintainer": "Robin van der Linde", "version": "2021-10-22", "language": [ - "nl" + "nl", + "en" ], "title": { - "nl": "Straatverlichting Assen" + "nl": "Straatverlichting - Assen" }, "description": { - "nl": "Straatverlichtingkaart met dataset Assen" + "nl": "Op deze kaart vind je alles over straatlantaarns + een dataset van Assen" }, "icon": "./assets/layers/street_lamps/street_lamp.svg", "startZoom": 19, @@ -22,7 +23,9 @@ "name": "Dataset Assen", "source": { "osmTags": "Lichtmastnummer~*", - "geoJson": "https://opendata.arcgis.com/datasets/ba37cdb372064b3199c548b75d16a609_0.geojson", + "#geoJson": "https://opendata.arcgis.com/datasets/ba37cdb372064b3199c548b75d16a609_0.geojson", + "geoJson": "https://robinlinde.github.io/tiles/assen_street_lighting/{z}/{x}/{y}.json", + "geoJsonZoomLevel": 16, "isOsmCache": false }, "calculatedTags": [ diff --git a/langs/themes/en.json b/langs/themes/en.json index 4d0e46575..d6560316e 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1228,7 +1228,7 @@ "title": "Sport pitches" }, "street_lighting": { - "description": "A theme showing information about street lamps, like light type, mounting, light colour and much more.", + "description": "On this map you can find everything about street lighting", "layers": { "1": { "name": "Lit streets", diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 5848cc0a5..3d2097f3e 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -898,7 +898,7 @@ "title": "Sportvelden" }, "street_lighting": { - "description": "Een thema met details over straatlantaarns zoals verlichtingstype, montage, lichtkleur en veel meer.", + "description": "Op deze kaart vind je alles over straatlantaarns", "layers": { "1": { "name": "Verlichte straten", @@ -954,8 +954,8 @@ "title": "Straatverlichting" }, "street_lighting_assen": { - "description": "Straatverlichtingkaart met dataset Assen", - "title": "Straatverlichting Assen" + "description": "Op deze kaart vind je alles over straatlantaarns + een dataset van Assen", + "title": "Straatverlichting - Assen" }, "surveillance": { "description": "Op deze open kaart kan je bewakingscamera's vinden.", From c901c20d1d8a31b20824bfa609316d757961b0b2 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 24 Oct 2021 16:08:20 +0200 Subject: [PATCH 10/15] Update icon, allow move and delete --- assets/layers/street_lamps/street_lamps.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json index 40b37e88c..26b093261 100644 --- a/assets/layers/street_lamps/street_lamps.json +++ b/assets/layers/street_lamps/street_lamps.json @@ -41,6 +41,7 @@ "badge": true } ], + "iconSize": "40,40,bottom", "presets": [ { "title": { @@ -367,5 +368,10 @@ "type": "direction" } } - ] + ], + "deletion": true, + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": false + } } \ No newline at end of file From bb4125f5ad793bca69999940078bd0e0e5df2bd1 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Mon, 25 Oct 2021 22:33:55 +0200 Subject: [PATCH 11/15] Test with some new icons --- assets/layers/street_lamps/bent_pole_1.svg | 100 ++++++++++++ assets/layers/street_lamps/bent_pole_2.svg | 138 ++++++++++++++++ assets/layers/street_lamps/license_info.json | 24 +++ assets/layers/street_lamps/straight_pole.svg | 160 +++++++++++++++++++ assets/layers/street_lamps/street_lamps.json | 24 ++- 5 files changed, 445 insertions(+), 1 deletion(-) create mode 100644 assets/layers/street_lamps/bent_pole_1.svg create mode 100644 assets/layers/street_lamps/bent_pole_2.svg create mode 100644 assets/layers/street_lamps/straight_pole.svg diff --git a/assets/layers/street_lamps/bent_pole_1.svg b/assets/layers/street_lamps/bent_pole_1.svg new file mode 100644 index 000000000..ed33e232b --- /dev/null +++ b/assets/layers/street_lamps/bent_pole_1.svg @@ -0,0 +1,100 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/street_lamps/bent_pole_2.svg b/assets/layers/street_lamps/bent_pole_2.svg new file mode 100644 index 000000000..f41cdeaf9 --- /dev/null +++ b/assets/layers/street_lamps/bent_pole_2.svg @@ -0,0 +1,138 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/street_lamps/license_info.json b/assets/layers/street_lamps/license_info.json index d157db54d..34ca9cd83 100644 --- a/assets/layers/street_lamps/license_info.json +++ b/assets/layers/street_lamps/license_info.json @@ -1,4 +1,28 @@ [ + { + "path": "bent_pole_1.svg", + "license": "CC0", + "authors": [ + "Robin van der Linde" + ], + "sources": [] + }, + { + "path": "bent_pole_2.svg", + "license": "CC0", + "authors": [ + "Robin van der Linde" + ], + "sources": [] + }, + { + "path": "straight_pole.svg", + "license": "CC0", + "authors": [ + "Robin van der Linde" + ], + "sources": [] + }, { "path": "street_lamp.svg", "license": "CC0", diff --git a/assets/layers/street_lamps/straight_pole.svg b/assets/layers/street_lamps/straight_pole.svg new file mode 100644 index 000000000..c59f755d6 --- /dev/null +++ b/assets/layers/street_lamps/straight_pole.svg @@ -0,0 +1,160 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json index 26b093261..32383d616 100644 --- a/assets/layers/street_lamps/street_lamps.json +++ b/assets/layers/street_lamps/street_lamps.json @@ -23,7 +23,29 @@ } ] }, - "icon": "./assets/layers/street_lamps/street_lamp.svg", + "icon": { + "render": "./assets/layers/street_lamps/straight_pole.svg", + "mappings": [ + { + "if": { + "and": [ + "lamp_mount=bent_mast", + "light:count=1" + ] + }, + "then": "./assets/layers/street_lamps/bent_pole_1.svg" + }, + { + "if": { + "and": [ + "lamp_mount=bent_mast", + "light:count=2" + ] + }, + "then": "./assets/layers/street_lamps/bent_pole_2.svg" + } + ] + }, "iconOverlays": [ { "if": "light:colour=white", From 0ee6a1a47b6cf05385d17e2328dbe6ee87395b9d Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Wed, 3 Nov 2021 11:58:14 +0100 Subject: [PATCH 12/15] Update mapRendering --- assets/layers/street_lamps/street_lamps.json | 48 ++++--------------- assets/themes/postboxes/postboxes.json | 6 +-- .../street_lighting/street_lighting.json | 12 ++++- .../street_lighting_assen.json | 25 ++++++---- 4 files changed, 37 insertions(+), 54 deletions(-) diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json index 32383d616..96a64b76f 100644 --- a/assets/layers/street_lamps/street_lamps.json +++ b/assets/layers/street_lamps/street_lamps.json @@ -23,47 +23,19 @@ } ] }, - "icon": { - "render": "./assets/layers/street_lamps/straight_pole.svg", - "mappings": [ - { - "if": { - "and": [ - "lamp_mount=bent_mast", - "light:count=1" - ] - }, - "then": "./assets/layers/street_lamps/bent_pole_1.svg" - }, - { - "if": { - "and": [ - "lamp_mount=bent_mast", - "light:count=2" - ] - }, - "then": "./assets/layers/street_lamps/bent_pole_2.svg" - } - ] - }, - "iconOverlays": [ + "mapRendering": [ { - "if": "light:colour=white", - "then": "circle:white", - "badge": true - }, - { - "if": "light:colour=orange", - "then": "circle:#FFB000", - "badge": true - }, - { - "if": "light:colour=green", - "then": "circle:#55FF55", - "badge": true + "location": "point", + "icon": "./assets/layers/street_lamps/street_lamp.svg", + "iconBadges": [ + { + "if": "light:colour~*", + "then": "circle:{light:colour}" + } + ], + "iconSize": "40,40,bottom" } ], - "iconSize": "40,40,bottom", "presets": [ { "title": { diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json index 7741ac2d6..a81d180e7 100644 --- a/assets/themes/postboxes/postboxes.json +++ b/assets/themes/postboxes/postboxes.json @@ -48,7 +48,7 @@ "tagRenderings": [ "images", { - + "id": "minimap", "render": "{minimap(17): height: 10rem; overflow: hidden; border: 1px solid #DADADA; border-radius: 0.5rem; }" } ], @@ -128,8 +128,6 @@ "images", { "id": "minimap", - - "render": "{minimap(17): height: 10rem; overflow: hidden; border: 1px solid #DADADA; border-radius: 0.5rem; }" }, { @@ -227,4 +225,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index f1bd77be0..c7bb25c5a 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -48,7 +48,11 @@ } ] }, - "color": "#ff0", + "mapRendering": [ + { + "color": "#ff0" + } + ], "tagRenderings": [ { "id": "lit", @@ -113,7 +117,11 @@ } ] }, - "color": "#a9a9a9", + "mapRendering": [ + { + "color": "#a9a9a9" + } + ], "tagRenderings": [ { "id": "lit", diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json index 799950826..695347f42 100644 --- a/assets/themes/street_lighting/street_lighting_assen.json +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -34,16 +34,21 @@ "_has_closeby_feature=Number(feat.properties._closest_osm_street_lamp_distance) < 5 ? 'yes' : 'no'" ], "title": "Straatlantaarn in dataset", - "icon": { - "render": "circle:red", - "mappings": [ - { - "if": "_has_closeby_feature=yes", - "then": "circle:#008000aa" - } - ] - }, - "iconSize": "20,20,center", + "mapRendering": [ + { + "location": "point", + "icon": { + "render": "circle:red", + "mappings": [ + { + "if": "_has_closeby_feature=yes", + "then": "circle:#008000aa" + } + ] + }, + "iconSize": "20,20,center" + } + ], "tagRenderings": [ "all_tags" ] From c5d4846def0000720212fadc8415d04e719b951e Mon Sep 17 00:00:00 2001 From: Joost Date: Wed, 3 Nov 2021 15:00:02 +0100 Subject: [PATCH 13/15] removed "deze zaak" This implies opening hours are for a business. But the opening hours syntax is shown for other things as well --- langs/nl.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langs/nl.json b/langs/nl.json index d0b5573e0..e98ec679e 100644 --- a/langs/nl.json +++ b/langs/nl.json @@ -171,7 +171,7 @@ }, "opening_hours": { "error_loading": "Sorry, deze openingsuren kunnen niet getoond worden", - "open_during_ph": "Op een feestdag is deze zaak", + "open_during_ph": "Op een feestdag is dit", "opensAt": "vanaf", "openTill": "tot", "closed_until": "Gesloten - open op {date}", @@ -181,7 +181,7 @@ "ph_closed": "gesloten", "ph_open": "open", "ph_open_as_usual": "geopend zoals gewoonlijk", - "not_all_rules_parsed": "De openingsuren van deze zaak zijn ingewikkeld. De volgende regels worden niet getoond bij het ingeven:", + "not_all_rules_parsed": "De openingsuren zijn ingewikkeld. De volgende regels worden niet getoond bij het ingeven:", "loadingCountry": "Het land wordt nog bepaald…" }, "skippedQuestions": "Enkele vragen werden overgeslaan", From f76bf2f0148ada21265940c15c3ae8510bd0e50f Mon Sep 17 00:00:00 2001 From: Joost Date: Wed, 3 Nov 2021 15:02:04 +0100 Subject: [PATCH 14/15] removed amenity/shop reference Opening hours not just used on shops and amenities --- langs/en.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/langs/en.json b/langs/en.json index ef1c347af..e93a28ade 100644 --- a/langs/en.json +++ b/langs/en.json @@ -218,10 +218,10 @@ }, "opening_hours": { "error_loading": "Error: could not visualize these opening hours.", - "open_during_ph": "During a public holiday, this amenity is", + "open_during_ph": "During a public holiday, this is", "opensAt": "from", "openTill": "till", - "not_all_rules_parsed": "The opening hours of this shop are complicated. The following rules are ignored in the input element:", + "not_all_rules_parsed": "These opening hours are complicated. The following rules are ignored in the input element:", "closed_until": "Closed until {date}", "closed_permanently": "Closed for an unkown duration", "open_24_7": "Opened around the clock", @@ -298,4 +298,4 @@ "partOfRelation": "This feature is part of a relation. Use another editor to move it.", "cancel": "Cancel move" } -} \ No newline at end of file +} From bb47575982d577da3b4c4137e9f19630b1ff3df8 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 4 Nov 2021 17:27:45 +0100 Subject: [PATCH 15/15] Fix typo --- assets/themes/street_lighting/street_lighting.json | 4 ++-- langs/themes/en.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index c7bb25c5a..305eb18ef 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -71,7 +71,7 @@ { "if": "lit=no", "then": { - "en": "This road is not lit", + "en": "This street is not lit", "nl": "Deze straat is niet verlicht" } }, @@ -140,7 +140,7 @@ { "if": "lit=no", "then": { - "en": "This road is not lit", + "en": "This street is not lit", "nl": "Deze straat is niet verlicht" } }, diff --git a/langs/themes/en.json b/langs/themes/en.json index 4bdbe5ff8..ea49506bc 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1341,7 +1341,7 @@ "then": "This street is lit" }, "1": { - "then": "This road is not lit" + "then": "This street is not lit" }, "2": { "then": "This street is lit at night"