{% extends "base.html" %} {% block title %}Geocode to Commons{% endblock %} {% block content %} <div class="m-3"> <h1>Geocode coordinates to Commons Category</h1> <ol> <li>Overpass query to find OSM polygon that contain given lat/lon.</li> <li>Sort list of OSM polygons by admin_level descending.</li> <li>Check each polygon for wikidata tag, starting with highest admin_level first.</li> <li>If the wikidata tag isn't found try looking for a 'ref:gss' tag and look for matching Wikidata item using the Wikidata Query service (WDQS)</li> <li>Finally try match by name. Look for nearby items with the same name using WDQS.</li> <li>Return the most specific Wikidata QID and Commons Category.</li> </ol> <p><a href="{{ url_for("map_page") }}">Interactive map with clickable pin for geocode testing</a>: click on any location within the map to place a pin and see the geocoding results for that specific point.</p> <form> Latitude/Longitude: <input name="q"/> (e.g. 54.375, -2.999) <input type="submit" value="go"/> </form> <p>Examples</p> <ul> {% for lat, lon, name in samples %} <li><a href="detail?lat={{ lat }}&lon={{ lon }}">{{ name }}</a> ({{ lat }}, {{ lon }}) — <a href="?lat={{ lat }}&lon={{ lon }}">API call</a></li> {% endfor %} </ul> {% set repo = "https://git.4angle.com/edward/geocode" %} <p>source code: <a href="{{ repo }}">{{ repo }}</a></p> </div> {% endblock %}