Geocode coordinates to Commons Category
- Overpass query to find OSM polygon that contain given lat/lon.
- Sort list of OSM polygons by admin_level descending.
- Check each polygon for wikidata tag, starting with highest admin_level first.
- 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)
- Finally try match by name. Look for nearby items with the same name using WDQS.
- Return the most specific Wikidata QID and Commons Category.
Interactive map with clickable pin for geocode testing: click on any location within the map to place a pin and see the geocoding results for that specific point.
Examples
- Adur (50.8326, -0.2689)
—
API call
- Babcary (51.05, -2.598)
—
API call
- Berwick St James (51.158, -1.906)
—
API call
- Brackenborough with Little Grimsby (53.392, -0.022)
—
API call
- Buckland, Hertfordshire (51.9687, -0.0327)
—
API call
- Camberwell and Peckham (51.486, -0.089)
—
API call
- Corby (52.4914, -0.69645)
—
API call
- Danehill (51.059, 0.05)
—
API call
- Dartford (51.473, 0.221)
—
API call
- East Kilbride (55.7644, -4.177)
—
API call
- Ebbesbourne Wake (51.034, -2.005)
—
API call
- Ely (52.387, 0.294)
—
API call
- England (52.9469, 0.1324)
—
API call
- Fernhurst (51.07, -0.718)
—
API call
- Fleet Marston (51.8532, -0.8829)
—
API call
- Fulstow (53.463, -0.027)
—
API call
- Halton (53.351, -2.701)
—
API call
- Harlow (51.779, 0.128)
—
API call
- Hartington Town Quarter (53.154, -1.8034)
—
API call
- Haugham (53.322, 0.032)
—
API call
- Hollingbury Castle (50.8553, -0.1192)
—
API call
- Hotwells, Bristol (51.452, -2.621)
—
API call
- Lambourn (51.51, -1.547)
—
API call
- London Borough of Hounslow (51.4785, -0.354)
—
API call
- Minstead (50.9, -1.6)
—
API call
- Newton St Petrock (50.893, -4.265)
—
API call
- Papworth Everard (52.253, -0.122)
—
API call
- Sheffield (53.309, -1.539)
—
API call
- Shenstone (52.62, -1.884)
—
API call
- South Kilworth (52.43, -1.11)
—
API call
- Stoke-on-Trent (52.9953, -2.1768)
—
API call
- Tattershall Thorpe (53.117, -0.202)
—
API call
- Terrington St Clement (52.766, 0.31)
—
API call
- Upton Snodsbury (52.18, -2.08)
—
API call
- Warkton (52.421, -0.651)
—
API call
- West Lindsey (53.498, -0.415)
—
API call
- Weston-on-the-Green (51.867, -1.204)
—
API call
- Wildmore (53.059, -0.144)
—
API call
- Windsor (51.4564, -0.6486)
—
API call
- Zeals (51.0804, -2.3263)
—
API call
source code: https://git.4angle.com/edward/geocode