Work on fire hydrants layer

This commit is contained in:
Midgard 2021-04-03 16:55:46 +02:00
parent 998fd4bd74
commit d527189783
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4
3 changed files with 235 additions and 243 deletions

View file

@ -18,22 +18,31 @@
] ]
} }
}, },
"title": { "title": {
"render": { "render": {
"nl": "Hydrant", "nl": "Hydrant {ref}",
"en": "Hydrant" "en": "Hydrant {ref}"
}, },
"mappings": [ "mappings": [
{
"if": "ref~*", {"if": {"or": [
"then": { "disused:emergency=fire_hydrant",
"nl": "Hydrant <i>{ref}</i>", "abandoned:emergency=fire_hydrant"
"en": "Hydrant <i>{ref}</i>" ]}, "then": {
} "nl": "Onbruikbare hydrant {ref}",
} "en": "Unusable hydrant {ref}"
}},
{"if": {"or": [ "removed:emergency=fire_hydrant" ]}, "then": {
"nl": "Verwijderde hydrant {ref}",
"en": "Removed hydrant {ref}"
}}
] ]
}, },
"tagRenderings": [ "tagRenderings": [
{ {
"question": { "question": {
"nl": "Wat is de meest opvallende kleur van de hydrant?", "nl": "Wat is de meest opvallende kleur van de hydrant?",
@ -43,98 +52,88 @@
"nl": "Kleur (in het Engels): {colour}", "nl": "Kleur (in het Engels): {colour}",
"en": "Colour: {colour}" "en": "Colour: {colour}"
}, },
"condition": { "condition": { "and": [
"and": [ "fire_hydrant:type!=underground",
"fire_hydrant:type!~underground", "fire_hydrant:type!=pipe"
"fire_hydrant:type!~pipe" ] },
] "freeform": { "key": "colour" },
},
"freeform": {
"key": "colour"
},
"mappings": [ "mappings": [
{
"if": { {"if": {"and": ["colour=red"]}, "then": {
"and": ["colour=red"]
},
"then": {
"nl": "De hydrant is rood", "nl": "De hydrant is rood",
"en": "The hydrant is red" "en": "The hydrant is red"
} }},
},
{ {"if": {"and": ["colour=yellow"]}, "then": {
"if": {
"and": ["colour=yellow"]
},
"then": {
"nl": "De hydrant is geel", "nl": "De hydrant is geel",
"en": "The hydrant is yellow" "en": "The hydrant is yellow"
} }},
},
{ {"if": {"and": ["colour=grey"]}, "then": {
"if": {
"and": ["colour=grey"]
},
"then": {
"nl": "De hydrant is grijs", "nl": "De hydrant is grijs",
"en": "The hydrant is grey" "en": "The hydrant is grey"
} }}
}
] ]
}, },
{ {
"question": { "question": {
"nl": "Welk soort hydrant is het?", "nl": "Welk soort hydrant is het?",
"en": "What type of hydrant is it?" "en": "What type of hydrant is it?"
}, },
"mappings": [ "mappings": [
{
"if": { {"if": {"and": ["fire_hydrant:type=underground"]}, "then": {
"and": ["fire_hydrant:type=underground"]
},
"then": {
"nl": "Ondergrondse hydrant", "nl": "Ondergrondse hydrant",
"en": "Underground hydrant" "en": "Underground hydrant"
} }},
},
{ {"if": {"and": ["fire_hydrant:type=pillar"]}, "then": {
"if": {
"and": ["fire_hydrant:type=pillar"]
},
"then": {
"nl": "Bovengrondse pilaarachtige hydrant", "nl": "Bovengrondse pilaarachtige hydrant",
"en": "Overground pillar hydrant" "en": "Overground pillar hydrant"
} }},
},
{ {"if": {"and": ["fire_hydrant:type=pipe"]}, "then": {
"if": {
"and": ["fire_hydrant:type=pipe"]
},
"then": {
"nl": "Bovengrondse pijphydrant", "nl": "Bovengrondse pijphydrant",
"en": "Overground pipe hydrant" "en": "Overground pipe hydrant"
} }},
},
{ {"if": {"and": ["fire_hydrant:type=wall"]}, "then": {
"if": {
"and": ["fire_hydrant:type=wall"]
},
"then": {
"nl": "Hydrant aan muur", "nl": "Hydrant aan muur",
"en": "Wall-attached hydrant" "en": "Wall-attached hydrant"
} }},
},
{ {"if": {"and": ["fire_hydrant:type~*"]}, "then": {
"if": {
"and": ["fire_hydrant:type~*"]
},
"then": {
"nl": "Ander soort hydrant", "nl": "Ander soort hydrant",
"en": "Other type of hydrant" "en": "Other type of hydrant"
}, "hideInAnswer": true }
]
},
{
"question": {
"nl": "Wat is de nominale diameter van de aanvoerleiding in millimeter?",
"en": "What is the nominal diameter of the supply in millimeters?"
},
"render": {
"nl": "Nominale diameter van aanvoerleiding: {fire_hydrant:diameter}",
"en": "Nominal diameter of supply: {fire_hydrant:diameter}"
},
"freeform": {
"key": "fire_hydrant:diameter",
"type": "pnat"
},
"mappings": [
{
"if": { "and": [ "fire_hydrant:diameter~^[0-9.]+$" ] }, "then": {
"nl": "Nominale diameter van aanvoerleiding: {fire_hydrant:diameter}&nbsp;mm",
"en": "Nominal diameter of supply: {fire_hydrant:diameter}&nbsp;mm"
} }
} }
] ]
}, },
{ {
"question": { "question": {
"nl": "Hoeveel aansluitingen zijn er?", "nl": "Hoeveel aansluitingen zijn er?",
@ -147,8 +146,10 @@
"freeform": { "freeform": {
"key": "couplings", "key": "couplings",
"type": "pnat" "type": "pnat"
}
}, },
"condition": {"or": ["fire_hydrant:type=pillar", "fire_hydrant:type=wall", "couplings~[0-9]+"]}
},
{ {
"render": { "render": {
"nl": "Referentiecode: {ref}", "nl": "Referentiecode: {ref}",
@ -160,25 +161,19 @@
}, },
"freeform": { "freeform": {
"key": "ref", "key": "ref",
"addExtraTags": [ "addExtraTags": [ "noref=" ]
"noref="
]
}, },
"mappings": [ "mappings": [
{ { "if": { "and": [
"if": {
"and": [
"ref=", "ref=",
"noref=yes" "noref=yes"
] ] }, "then": {
},
"then": {
"nl": "De hydrant heeft geen referentiecode.", "nl": "De hydrant heeft geen referentiecode.",
"en": "The hydrant does not have a reference code." "en": "The hydrant does not have a reference code."
} } }
}
] ]
}, },
{ {
"question": { "question": {
"nl": "Update de status van de hydrant.", "nl": "Update de status van de hydrant.",
@ -188,84 +183,101 @@
"nl": "Status", "nl": "Status",
"en": "Status" "en": "Status"
}, },
"freeform": { "freeform": { "key": "disused:emergency" },
"key": "disused:emergency"
},
"mappings": [ "mappings": [
{ { "if": { "and": [
"if": {
"and": [
"emergency=fire_hydrant", "emergency=fire_hydrant",
"disused:emergency=", "disused:emergency=", "abandoned:emergency=", "removed:emergency="
"abandoned:emergency=", ] }, "then": {
"removed:emergency="
]
},
"then": {
"nl": "De hydrant lijkt (volledig of gedeeltelijk) functioneel.", "nl": "De hydrant lijkt (volledig of gedeeltelijk) functioneel.",
"en": "The hydrant looks like it's (fully or partially) working." "en": "The hydrant looks like it's (fully or partially) working."
} } },
},
{ { "if": { "and": [
"if": {
"or": [
{"and": [
"disused:emergency=fire_hydrant", "disused:emergency=fire_hydrant",
"abandoned:emergency=", "abandoned:emergency=", "emergency=", "removed:emergency="
"emergency=", ] }, "then": {
"removed:emergency="
]},
{"and": [
"abandoned:emergency=fire_hydrant",
"disused:emergency=",
"emergency=",
"removed:emergency="
]}
]
},
"then": {
"nl": "De hydrant is onbruikbaar.", "nl": "De hydrant is onbruikbaar.",
"en": "The hydrant is unavailable for use." "en": "The hydrant is unavailable for use."
} } },
},
{ { "if": { "and": [
"if": { "abandoned:emergency=fire_hydrant",
"and": [ "disused:emergency=", "emergency=", "removed:emergency="
] }, "then": {
"nl": "De hydrant is onbruikbaar.",
"en": "The hydrant is unavailable for use."
}, "hideInAnswer": true },
{ "if": { "and": [
"removed:emergency=fire_hydrant", "removed:emergency=fire_hydrant",
"disused:emergency=", "disused:emergency=", "abandoned:emergency=", "emergency="
"abandoned:emergency=", ] }, "then": {
"emergency="
]
},
"then": {
"nl": "De hydrant is verwijderd.", "nl": "De hydrant is verwijderd.",
"en": "The hydrant has been removed." "en": "The hydrant has been removed."
} } }
}
] ]
}, },
{ {
"#": "Marker for working hydrant",
"question": {
"nl": "Is er een bordje aanwezig?",
"en": "Is there a marker for the hydrant?"
},
"mappings": [
{"if": {"and": ["has_marker=no"]}, "then": {
"nl": "Een bordje ontbreekt!",
"en": "A marker is missing!"
}},
{"if": {"and": ["has_marker="]}, "then": {
"nl": "Er is een bordje voor de hydrant.",
"en": "A marker is present."
}},
{"if": {"and": ["has_marker=yes"]}, "then": {
"nl": "Er is een bordje voor de hydrant.",
"en": "A marker is present."
}, "hideInAnswer": true }
],
"condition": {"and": ["emergency=fire_hydrant"]}
},
{
"#": "Marker for disused hydrant",
"question": {
"nl": "Is er een bordje aanwezig?",
"en": "Is there a marker for the hydrant?"
},
"mappings": [
{"if": {"and": ["has_marker=no"]}, "then": {
"nl": "Een bordje ontbreekt.",
"en": "A marker is missing."
}},
{"if": {"and": ["has_marker="]}, "then": {
"nl": "Er is een bordje voor de hydrant.",
"en": "A marker is present."
}}
],
"condition": {"or": ["disused:emergency=fire_hydrant", "abandoned:emergency=fire_hydrant"]}
},
{
"#": "Marker for removed hydrant",
"question": { "question": {
"nl": "Is er nog (ten onrechte) een bordje voor de verwijderde hydrant?", "nl": "Is er nog (ten onrechte) een bordje voor de verwijderde hydrant?",
"en": "Is there a (now incorrect) marker left for the removed hydrant?" "en": "Is there a (now incorrect) marker left for the removed hydrant?"
}, },
"mappings": [ "mappings": [
{ {"if": {"and": ["has_marker=yes"]}, "then": {
"if": {
"and": ["has_marker=yes"]
},
"then": {
"nl": "Er is ten onrechte een bordje!", "nl": "Er is ten onrechte een bordje!",
"en": "Underground hydrant" "en": "There's a marker here, but no hydrant!"
} }},
} {"if": {"and": ["has_marker=no"]}, "then": {
"nl": "Het bordje is weggehaald.",
"en": "The marker is removed too."
}}
], ],
"condition": { "condition": {"and": ["removed:emergency=fire_hydrant"]}
"and": [
"removed:emergency=fire_hydrant"
]
}
}, },
{ {
"question": { "question": {
"nl": "Waar bevindt de hydrant zich?", "nl": "Waar bevindt de hydrant zich?",
@ -276,34 +288,30 @@
"en": "Position: {fire_hydrant:position}" "en": "Position: {fire_hydrant:position}"
}, },
"mappings": [ "mappings": [
{ {"if": {"and": ["fire_hydrant:position=lane"]}, "then": {
"if": {
"and": ["fire_hydrant:position=lane"]
},
"then": {
"nl": "In of naast de rijbaan", "nl": "In of naast de rijbaan",
"en": "In or along the road" "en": "In or along the road"
} }},
},
{ {"if": {"and": ["fire_hydrant:position=parking_lot"]}, "then": {
"if": { "nl": "In een parking",
"and": ["fire_hydrant:position=sidewalk"] "en": "In a parking lot"
}, }},
"then": {
"nl": "Trottoir", {"if": {"and": ["fire_hydrant:position=sidewalk"]}, "then": {
"en": "Sidewalk" "nl": "Op het trottoir",
} "en": "On a sidewalk"
} }},
{"if": {"and": ["fire_hydrant:position=green"]}, "then": {
"nl": "In het gras",
"en": "In a grassy area"
}}
], ],
"freeform": { "freeform": {"key": "fire_hydrant:position"},
"key": "fire_hydrant:position" "condition": {"and": ["removed:emergency!=fire_hydrant"]}
},
"condition": {
"and": [
"removed:emergency!=fire_hydrant"
]
}
}, },
{ {
"question": { "question": {
"nl": "Heb je opmerkingen die niet pasten in de andere vragen?", "nl": "Heb je opmerkingen die niet pasten in de andere vragen?",
@ -313,51 +321,35 @@
"nl": "Extra info: <i>{description:0}</i>", "nl": "Extra info: <i>{description:0}</i>",
"en": "Extra info: <i>{description:0}</i>" "en": "Extra info: <i>{description:0}</i>"
}, },
"freeform": { "freeform": {"key": "description:0"}
"key": "description:0"
}
} }
], ],
"hideUnderlayingFeaturesMinPercentage": 0, "hideUnderlayingFeaturesMinPercentage": 0,
"icon": { "icon": {
"render": "./assets/layers/fire_hydrants/hydrant_unknown.svg", "render": "./assets/layers/fire_hydrants/hydrant_unknown.svg",
"mappings": [ "mappings": [
{
"if": { { "if": { "or": [
"or": [
"disused:emergency=fire_hydrant", "disused:emergency=fire_hydrant",
"abandoned:emergency=fire_hydrant" "abandoned:emergency=fire_hydrant"
] ] }, "then": "./assets/layers/fire_hydrants/hydrant_disused.svg" },
},
"then": "./assets/layers/fire_hydrants/hydrant_disused.svg" { "if": { "and": [
},
{
"if": {
"and": [
"removed:emergency=fire_hydrant", "removed:emergency=fire_hydrant",
"has_marker=yes" "has_marker=yes"
] ] }, "then": "./assets/layers/fire_hydrants/hydrant_marker_only.svg" },
},
"then": "./assets/layers/fire_hydrants/hydrant_marker_only.svg" { "if": { "and": [
},
{
"if": {
"and": [
"emergency=fire_hydrant", "emergency=fire_hydrant",
"fire_hydrant:type=underground" "fire_hydrant:type=underground"
] ] }, "then": "./assets/layers/fire_hydrants/hydrant_underground.svg" },
},
"then": "./assets/layers/fire_hydrants/hydrant_underground.svg" { "if": { "and": [
},
{
"if": {
"and": [
"emergency=fire_hydrant", "emergency=fire_hydrant",
"fire_hydrant:type=pillar" "fire_hydrant:type=pillar"
] ] }, "then": "./assets/layers/fire_hydrants/hydrant_pillar_without_h.svg" }
},
"then": "./assets/layers/fire_hydrants/hydrant_pillar_without_h.svg"
}
] ]
}, },
"wayHandling": 1, "wayHandling": 1,

View file

@ -9,21 +9,21 @@
"en": "Map fire hydrants" "en": "Map fire hydrants"
}, },
"description": { "description": {
"nl": "De brandweer kan in hun tankwagens maar een beperkte hoeveelheid bluswater meenemen. Bij een brand zijn hydranten (brandkranen) dan ook van levensbelang. Als tijdens de rit al een kaart van de hydranten beschikbaar is, wordt tijd er uitgespaard en kan er dus sneller geblust worden.\n\nIn België: neem eens een kijkje op straat, je vindt vast een wit bord met een rode rand. Op het bord staat bv. H100 (hydrant met aanvoerleiding met diameter 100 mm), een referentiecode, en afstanden in meter die wijzen naar waar de hydrant zich werkelijk bevindt. Als het goed is, vind je op de aangegeven plaats een ovaal putdeksel met een \"H\" of \"brandkraan\" op of een bovengrondse brandkraan.", "nl": "<p>De brandweer kan in hun tankwagens maar een beperkte hoeveelheid bluswater meenemen. Bij een brand zijn hydranten (brandkranen) dan ook van levensbelang. Als tijdens de rit al een kaart van de hydranten beschikbaar is, wordt tijd er uitgespaard en kan er dus sneller geblust worden.</p><p>In België: neem eens een kijkje op straat, je vindt vast een wit bord met een rode rand. Op het bord staat bv. H100 (hydrant met aanvoerleiding met diameter 100 mm), een referentiecode, en afstanden in meter die wijzen naar waar de hydrant zich werkelijk bevindt. Als het goed is, vind je op de aangegeven plaats een ovaal putdeksel met een \"H\" of \"brandkraan\" op of een bovengrondse brandkraan.</p>",
"en": "Fire engines can hold only so much water, so hydrants are crucial for firefighting. If the team has access to a map of the hydrants while driving, time is saved when they arrive at the scene. Time they can use to put out the fire sooner.\n\nIn Belgium: take a look outside on the street, you're bound to find a white sign with a red rim. The sign says e.g. H100 (hydrant with supply pipe with diameter of 100 mm), a reference code, and distances in meter that point to where the hydrant is installed. Normally you should find an oval covering with \"H\" or \"hydrant\" on it or a pillar." "en": "<p>Fire engines can hold only so much water, so hydrants are crucial for firefighting. If the team has access to a map of the hydrants while driving, time is saved when they arrive at the scene. Time they can use to put out the fire sooner.</p><p>In Belgium: take a look outside on the street, you're bound to find a white sign with a red rim. The sign says e.g. H100 (hydrant with supply pipe with diameter of 100 mm), a reference code, and distances in meter that point to where the hydrant is installed. Normally you should find an oval covering with \"H\" or \"hydrant\" on it or a pillar.</p>"
}, },
"language": [ "language": [
"nl", "nl",
"en" "en"
], ],
"maintainer": "Midgard", "maintainer": "Midgard",
"icon": "./assets/layers/fire_hydrants/pillar.svg", "icon": "./assets/layers/fire_hydrants/hydrant_pillar.svg",
"version": "0", "version": "0",
"startLat": 50.642, "startLat": 50.642,
"startLon": 4.482, "startLon": 4.482,
"startZoom": 8, "startZoom": 8,
"widenFactor": 0.01, "widenFactor": 0.01,
"socialImage": "./assets/layers/fire_hydrants/pillar.svg", "socialImage": "./assets/layers/fire_hydrants/hydrant_pillar.svg",
"clustering": { "clustering": {
"maxZoom": 18 "maxZoom": 18
}, },

View file

@ -4,7 +4,7 @@
"license": "", "license": "",
"authors": [], "authors": [],
"sources": [ "sources": [
"https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_pillar.svg" "https://mapcomplete.braindeaddev.com/assets/layers/fire_hydrants/hydrant_pillar.svg"
] ]
}, },
{ {
@ -12,7 +12,7 @@
"license": "", "license": "",
"authors": [], "authors": [],
"sources": [ "sources": [
"https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_unknown.svg" "https://mapcomplete.braindeaddev.com/assets/layers/fire_hydrants/hydrant_unknown.svg"
] ]
}, },
{ {
@ -20,7 +20,7 @@
"license": "", "license": "",
"authors": [], "authors": [],
"sources": [ "sources": [
"https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_underground.svg" "https://mapcomplete.braindeaddev.com/assets/layers/fire_hydrants/hydrant_underground.svg"
] ]
}, },
{ {