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.

78 lines
2.3 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|Pyrus|Morus|Prunus persica|Prunus cerasus)\"];",
  11. "node[taxon~\"(Malus|Pyrus|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\") }}</td>",
  48. " </tr>",
  49. "{% endfor %}",
  50. "</table>"
  51. ],
  52. "const": [
  53. {
  54. "match": "^Malus",
  55. "icon": "🍏",
  56. "name:en": "Apple"
  57. },
  58. {
  59. "match": "^Pyrus",
  60. "icon": "🍐",
  61. "name:en": "Pear"
  62. },
  63. {
  64. "match": "^Morus",
  65. "icon": "M",
  66. "name:en": "Mulberry"
  67. },
  68. {
  69. "match": "^Prunus persica",
  70. "icon": "🍑",
  71. "name:en": "Peach"
  72. },
  73. {
  74. "match": "^Prunus cerasus",
  75. "icon": "🍒",
  76. "name:en": "Cherry"
  77. }
  78. ]
  79. }