Main categories of OpenStreetBrowser
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.

55 lines
1.8 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Wikipedia"
  5. },
  6. "query": {
  7. "14": [
  8. "(",
  9. "node[~\"wikipedia\"~\".\"];",
  10. "way[~\"wikipedia\"~\".\"];",
  11. "relation[~\"wikipedia\"~\".\"];",
  12. "",
  13. "node[~\"wikidata$\"~\".\"];",
  14. "way[~\"wikidata$\"~\".\"];",
  15. "relation[~\"wikidata$\"~\".\"];",
  16. "",
  17. "node[wikimedia_commons];",
  18. "way[wikimedia_commons];",
  19. "relation[wikimedia_commons];",
  20. ")"
  21. ]
  22. },
  23. "feature": {
  24. "pre": [
  25. "{% set errors = [] %}",
  26. "{% for k, v in tags %}",
  27. "",
  28. "{% if k|matches(\"^wikipedia:\") %}",
  29. " {% set errors = errors|merge([\"Uses <tt>wikipedia</tt> and old-style <tt>\" ~ k ~ \"</tt> tag\"]) %}",
  30. "{% elseif k|matches(\"^wikipedia:\") %}",
  31. " {% set errors = errors|merge([\"Uses old-style <tt>\" ~ k ~ \"</tt> tag\"]) %}",
  32. "{% endif %}",
  33. "",
  34. "{% if k|matches(\":?wikipedia$\") and not v|matches(\"^[a-z-]+:\") %}",
  35. " {% set errors = errors|merge([\"Tag <tt>\" ~ k ~ \"</tt> does not contain language information: \" ~ v ]) %}",
  36. "{% endif %}",
  37. "",
  38. "{% endfor %}"
  39. ],
  40. "description": [
  41. "{% if errors|length %}",
  42. "{{ errors|length }} {{ trans('error', errors|length) }}",
  43. "{% endif %}"
  44. ],
  45. "body": [
  46. "{% if errors|length %}",
  47. "{{ trans('error', errors|length) }}:<ul>",
  48. "{% for e in errors %}",
  49. " <li>{{ e|raw }}</li>",
  50. "{% endfor %}",
  51. "</ul>",
  52. "{% endif %}"
  53. ]
  54. }
  55. }