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.

77 lines
2.0 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. "<table>",
  43. "{% for data in const %}",
  44. " <tr>",
  45. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.icon }}</div></td>",
  46. " <td>{{ attribute(data, \"name:en\") }}</td>",
  47. " </tr>",
  48. "{% endfor %}",
  49. "</table>"
  50. ],
  51. "const": [
  52. {
  53. "match": "^Malus",
  54. "icon": "🍏",
  55. "name:en": "Apple"
  56. },
  57. {
  58. "match": "^Pyrus",
  59. "icon": "🍐",
  60. "name:en": "Pear"
  61. },
  62. {
  63. "match": "^Morus",
  64. "icon": "M",
  65. "name:en": "Mulberry"
  66. },
  67. {
  68. "match": "^Prunus persica",
  69. "icon": "🍑",
  70. "name:en": "Peach"
  71. },
  72. {
  73. "match": "^Prunus cerasus",
  74. "icon": "🍒",
  75. "name:en": "Cherry"
  76. }
  77. ]
  78. }