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.

83 lines
2.5 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Edible Plants",
  5. "de": "Essbare Gewächse"
  6. },
  7. "query": {
  8. "14": [
  9. "(",
  10. "node[species~\"(Malus domestica|Pyrus domestica|Morus|Prunus persica|Prunus cerasus)\"];",
  11. "node[taxon~\"(Malus domestica|Pyrus domestica|Morus|Prunus persica|Prunus cerasus)\"];",
  12. ");"
  13. ]
  14. },
  15. "feature": {
  16. "pre": [
  17. "{% set species = null %}",
  18. "{% if tags.taxon %}",
  19. "{% set species = tags.taxon %}",
  20. "{% else %}",
  21. "{% set species = tags.species %}",
  22. "{% endif %}",
  23. "",
  24. "{% set data = null %}",
  25. "{% for d in const %}",
  26. "{% if species|matches(d.match) %}",
  27. "{% set data = d %}",
  28. "{% endif %}",
  29. "{% endfor %}"
  30. ],
  31. "description": [
  32. "{{ attribute(data, \"name:en\") }} -",
  33. "{% if tags.taxon %}",
  34. "{{ localizedTag(tags, 'taxon') }}",
  35. "{% else %}",
  36. "{{ localizedTag(tags, 'species') }}",
  37. "{% endif %}"
  38. ],
  39. "markerSign": "{{ data.icon }}"
  40. },
  41. "info": [
  42. "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.",
  43. "<table>",
  44. "{% for data in const %}",
  45. " <tr>",
  46. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.icon }}</div></td>",
  47. " <td>{{ attribute(data, \"name:en\") }} - {{ data.name }}</td>",
  48. " </tr>",
  49. "{% endfor %}",
  50. "</table>"
  51. ],
  52. "const": [
  53. {
  54. "match": "^Malus domestica",
  55. "icon": "🍏",
  56. "name": "Malus domestica",
  57. "name:en": "Apple"
  58. },
  59. {
  60. "match": "^Pyrus",
  61. "icon": "🍐",
  62. "name:en": "Pear",
  63. "name": "Pyrus domestica"
  64. },
  65. {
  66. "match": "^Morus",
  67. "icon": "M",
  68. "name": "Morus",
  69. "name:en": "Mulberry"
  70. },
  71. {
  72. "match": "^Prunus persica",
  73. "icon": "🍑",
  74. "name": "Prunus persica",
  75. "name:en": "Peach"
  76. },
  77. {
  78. "match": "^Prunus cerasus",
  79. "icon": "🍒",
  80. "name": "Prunus cerasus",
  81. "name:en": "Cherry"
  82. }
  83. ]
  84. }