{% extends "base.html" %} {% block title %} {%- if result.commons_cat %}{{ result.commons_cat.title }} {%- elif result.wikidata %}{{ result.wikidata }} {%- else %}{{ lat }}, {{ lon }} {%- endif %} — Geocode {% endblock %} {% block link %} {% endblock %} {% block script %} {% endblock %} {% block style %} {% endblock %} {% block content %}

{%- if result.commons_cat %}{{ result.commons_cat.title }} {%- elif result.wikidata %}{{ result.wikidata }} {%- else %}No result {%- endif %}

{{ "%.5f"|format(lat) }}, {{ "%.5f"|format(lon) }}

{% if result.wikidata %} {% endif %} {% if result.commons_cat %} {% endif %} {% if result.admin_level %}
Admin level {{ result.admin_level }}
{% endif %}
Home API endpoint OpenStreetMap {% if result.commons_cat %} Commons category {% endif %} {% if result.wikidata %} {{ result.wikidata }} {% endif %} # {% if needs_commons %} Try without Commons Category {% else %} Require Commons Category {% endif %}
API response
{{ result | tojson(indent=2) }}
{% if elements %} {% set elem_count = elements.count() %}
{{ elem_count }} surrounding OSM element{{ 's' if elem_count != 1 }}
{% for element in elements %} {% set tags = element.tags %}
{{ tags.name or ('relation' if element.osm_id < 0 else 'way') ~ ' ' ~ element.osm_id|abs }}
{% if tags.wikidata %} {{ tags.wikidata }} {% endif %} OSM
{% for key, value in tags.items() if not (key == "way_area" or "name:" in key or key.startswith("source") or key == "name" or key == "wikidata") %}
{{ key }}{{ value }}
{% endfor %}
{% endfor %} {% else %}

No surrounding elements found.

{% endif %} {% if query %}
SPARQL geosearch query run on Wikidata ↗
{{ query | highlight_sparql | safe }}
{% endif %}
{% endblock %}