Merge pull request 'hut' (#2513) from Osmwithspace/MapComplete:hut into develop

Reviewed-on: MapComplete/MapComplete#2513
Reviewed-by: Pieter Vander Vennet <pietervdvn@posteo.net>
This commit is contained in:
Pieter Vander Vennet 2025-08-26 23:30:24 +00:00
commit fbd8a21b89
7 changed files with 218 additions and 1 deletions

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="14" height="14" viewBox="0 0 14 14" id="svg2">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6"/>
<rect width="14" height="14" x="0" y="0" id="canvas" style="fill:none;stroke:none;visibility:hidden"/>
<path id="path757" d="M 7 0 L 0 3.5 L 0 5.5 L 1.5 4.8496094 L 1.5 14 L 3 14 L 3 4.1992188 L 7 2.5 L 11 4.1992188 L 11 14 L 12.5 14 L 12.5 4.8496094 L 14 5.5 L 14 3.5 L 7 0 z M 6.9726562 5.0488281 C 6.5840971 5.0488281 6.2675781 5.3630448 6.2675781 5.7519531 C 6.2675781 6.1417342 6.584097 6.4550781 6.9726562 6.4550781 C 7.361041 6.4550781 7.6757812 6.1417342 7.6757812 5.7519531 C 7.6757812 5.3630448 7.3608664 5.0488281 6.9726562 5.0488281 z M 5.0488281 6.1875 C 4.9393822 6.162539 4.8312529 6.2261094 4.8066406 6.3339844 L 4.3144531 8.375 C 4.2879211 8.483224 4.3541425 8.5899565 4.4628906 8.6171875 L 5.0488281 8.7578125 C 5.1556558 8.7859125 5.2664033 8.7195541 5.2910156 8.6113281 L 5.7832031 6.5722656 C 5.8095609 6.4640416 5.7430227 6.355181 5.6367188 6.328125 L 5.0488281 6.1875 z M 6.7675781 6.5644531 C 6.1938161 6.5499631 6.0488281 7.1523437 6.0488281 7.1523438 L 4.5605469 13.40625 C 4.5553069 13.43959 4.5527344 13.472519 4.5527344 13.505859 C 4.5527344 13.78026 4.7744278 14 5.0488281 14 C 5.2720838 14 5.4610884 13.85019 5.5214844 13.646484 L 6.3730469 10.126953 L 7.1816406 13.625 C 7.2340066 13.841273 7.4308241 14 7.6621094 14 C 7.9354624 14 8.1542969 13.780085 8.1542969 13.505859 C 8.1542969 13.468499 8.1525944 13.431918 8.1464844 13.396484 L 7.0332031 8.7480469 L 7.1269531 8.3398438 L 7.1992188 8.6621094 C 7.2652007 8.8720994 7.4570312 8.890625 7.4570312 8.890625 L 8.6015625 9.1835938 C 8.6249525 9.1875937 8.648315 9.1894531 8.671875 9.1894531 C 8.859346 9.1894531 9.0097656 9.0406386 9.0097656 8.8535156 C 9.0097656 8.6934486 8.900292 8.5569194 8.75 8.5214844 L 7.7578125 8.2734375 L 7.4863281 7.1660156 C 7.3564592 6.5486156 6.7675781 6.5644531 6.7675781 6.5644531 z M 9.8300781 7.2792969 C 9.7478581 7.2792969 9.6872029 7.3408519 9.6699219 7.4199219 L 8.4882812 13.826172 C 8.4882812 13.830372 8.4863281 13.833837 8.4863281 13.835938 C 8.4863281 13.925487 8.5592405 13.998047 8.6484375 13.998047 C 8.7296075 13.998047 8.7993749 13.935444 8.8105469 13.857422 L 9.9902344 7.4511719 L 9.9902344 7.4394531 C 9.9902344 7.3521731 9.9192711 7.2792969 9.8300781 7.2792969 z " style="fill:#0092da;stroke-width:0.17455491"/>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Geozeisig
SPDX-License-Identifier: CC0-1.0

160
assets/layers/hut/hut.json Normal file
View file

@ -0,0 +1,160 @@
{
"id": "hut",
"name": {
"en": "Huts"
},
"description": {
"en": "Layer showing basic huts, wilderness huts and alpine huts"
},
"source": {
"osmTags": {
"or": [
"tourism=wilderness_hut",
"tourism=alpine_hut",
{
"and": [
"amenity=shelter",
"shelter_type=basic_hut"
]
}
]
}
},
"minzoom": 10,
"title": {
"render": "Hut",
"mappings": [
{
"if": "name~*",
"then": "{name}"
},
{
"if": "tourism=wilderness_hut",
"then": "wilderness hut"
},
{
"if": "tourism=alpine_hut",
"then": "alpine hut"
},
{
"if": {
"and": [
"amenity=shelter",
"shelter_type=basic_hut"
]
},
"then": "basic hut"
}
]
},
"pointRendering": [
{
"location": [
"point",
"centroid"
],
"marker": [
{
"icon": {
"render": "./assets/layers/shelter/shelter.svg",
"mappings": [
{
"if": "tourism=wilderness_hut",
"then": "./assets/layers/hut/wilderness_hut.svg"
},
{
"if": "tourism=alpine_hut",
"then": "./assets/layers/hut/alpine_hut.svg"
},
{
"if": {
"and": [
"amenity=shelter",
"shelter_type=basic_hut"
]
},
"then": "./assets/layers/shelter/shelter.svg"
}
]
}
}
]
}
],
"lineRendering": [],
"presets": [
{
"tags": [
"tourism=wilderness_hut"
],
"title": {
"en": "wilderness hut"
},
"description": {
"en": "An unserviced fully enclosed hut (with roof and walls) with beds or suitable sleeping areas and a fireplace or stove for heating and cooking."
}
},
{
"tags": [
"tourism=alpine_hut"
],
"title": {
"en": "alpine hut"
},
"description": {
"en": "A serviced remote building located in the mountains intended to provide board and lodging."
}
},
{
"tags": [
"amenity=shelter",
"shelter_type=basic_hut"
],
"title": {
"en": "basic hut"
},
"description": {
"en": "An unserviced fully enclosed hut (with roof and walls) with beds or suitable sleeping areas <b>without</b> a fireplace or stove."
}
}
],
"tagRenderings": [
"images",
"name",
"reservation",
"caravansites.caravansites-fee",
{
"id": "drinking_water",
"question": {
"en": "Is drinking water available here?"
},
"mappings": [
{
"if": "drinking_water=yes",
"then": {
"en": "Here is drinking water available."
}
},
{
"if": "drinking_water=no",
"then": {
"en": "Here is no drinking water available."
}
}
]
},
"has_toilets",
"description",
{
"id": "preset_type",
"render": "{preset_type_select()}"
}
],
"filter":[
"free"
],
"allowMove": {
"enableRelocation": false,
"enableImproveAccuracy": true
}
}

View file

@ -0,0 +1,22 @@
[
{
"path": "alpine_hut.svg",
"license": "CC0-1.0",
"authors": [
"Geozeisig"
],
"sources": [
"https://wiki.openstreetmap.org/wiki/File:Alpinehut.svg"
]
},
{
"path": "wilderness_hut.svg",
"license": "CC0-1.0",
"authors": [
"Geozeisig"
],
"sources": [
"https://wiki.openstreetmap.org/wiki/File:Wilderness_hut.svg"
]
}
]

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="14" height="14" viewBox="0 0 14 14" id="svg2">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6"/>
<rect width="14" height="14" x="0" y="0" id="canvas" style="fill:none;stroke:none;visibility:hidden"/>
<path id="wilderness-hut" d="M 8,0 8,2 7,1.5 0,5 0,7 1.5,6.3496094 1.5,14 3,14 3,5.6992188 7,4 8,4.4257812 8,9 4.5,9 c 0.025314,1.65157 -0.034277,3.38952 0,5 l 5,0 C 9.518206,11.046736 9.50603,8.0503867 9.5,5.0625 L 11,5.6992188 11,14 12.5,14 12.5,6.3496094 14,7 14,5 9.5,2.75 C 9.4984477,1.8314022 9.5,0.9158261 9.5,0 L 8,0 Z M 7,11 c 0,0 1,0 1,1 l 0,1 -2,0 0,-1 c 0,-1 1,-1 1,-1 z" style="fill:#0092da;fill-opacity:1;stroke:none"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Geozeisig
SPDX-License-Identifier: CC0-1.0

View file

@ -60,7 +60,8 @@
"nature_reserve",
{
"builtin": [
"shelter"
"shelter",
"hut"
],
"override": {
"minzoom": 11