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] 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",