google-mapsreverse-geocodinggoogle-geocoding-api

Regions of England in Google Maps API


I have a list of latitude/longitude which point to some cities in England. For each of these coordinates I want to get the region they belong to.

By region, I mean one of these: https://en.wikipedia.org/wiki/Regions_of_England

For instance: For coordinates (53.38112, -1.47008), ie. Sheffield, I need to find Yorkshire and the Humber.

To achieve this, I tried to use Google Reverse Geocoding API:

https://maps.googleapis.com/maps/api/geocode/json?latlng=53.38112,-1.47008&key=

Google then tells me that:

So Google returns me the correct State, County and District. However, Region is missing. Is there any way to obtain it?


Solution

  • Looking at the documentation I don't think the Google API returns such information.

    An alternative way to get round this would be to build a list of which counties belong in which of the 9 regions and then look up the region based on the county name. Obviously, this would be a bit of work on your part putting all the county names into a list.