A repository for testing purposes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.5 KiB

{
"type": "overpass",
"name": {
"en": "Edible Plants",
"de": "Essbare Gewächse"
},
"query": {
"14": [
"(",
"node[species~\"(Malus domestica|Pyrus domestica|Morus|Prunus persica|Prunus cerasus)\"];",
"node[taxon~\"(Malus domestica|Pyrus domestica|Morus|Prunus persica|Prunus cerasus)\"];",
");"
]
},
"feature": {
"pre": [
"{% set species = null %}",
"{% if tags.taxon %}",
"{% set species = tags.taxon %}",
"{% else %}",
"{% set species = tags.species %}",
"{% endif %}",
"",
"{% set data = null %}",
"{% for d in const %}",
"{% if species|matches(d.match) %}",
"{% set data = d %}",
"{% endif %}",
"{% endfor %}"
],
"description": [
"{{ attribute(data, \"name:en\") }} -",
"{% if tags.taxon %}",
"{{ localizedTag(tags, 'taxon') }}",
"{% else %}",
"{{ localizedTag(tags, 'species') }}",
"{% endif %}"
],
"markerSign": "{{ data.icon }}"
},
"info": [
"Map features that have a <a target='_blank' href='https://wiki.openstreetmap.org/wiki/Key:species'>species</a> or <a target='_blank' href='https://wiki.openstreetmap.org/wiki/Key:taxon'>taxon</a> tag with the latin plant name of an edible fruit.",
"<table>",
"{% for data in const %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.icon }}</div></td>",
" <td>{{ attribute(data, \"name:en\") }} - {{ data.name }}</td>",
" </tr>",
"{% endfor %}",
"</table>"
],
"const": [
{
"match": "^Malus domestica",
"icon": "🍏",
"name": "Malus domestica",
"name:en": "Apple"
},
{
"match": "^Pyrus",
"icon": "🍐",
"name:en": "Pear",
"name": "Pyrus domestica"
},
{
"match": "^Morus",
"icon": "M",
"name": "Morus",
"name:en": "Mulberry"
},
{
"match": "^Prunus persica",
"icon": "🍑",
"name": "Prunus persica",
"name:en": "Peach"
},
{
"match": "^Prunus cerasus",
"icon": "🍒",
"name": "Prunus cerasus",
"name:en": "Cherry"
}
]
}