Google geocoding: points of interest within a specified radius

4.4k views Asked by At

After searching around it appears that many people already have the lat/long data of the geographic points of interest they are interested in reverse-geocoding.

In my scenario I know a starting location and would like to find all points of interest (mainly residences within a neighborhood) that lie within a specific radius (say, 1 mile).

The first step is simply specifying a starting point and a radius to search within but I can't seem to figure out how to do this using the the Google Geocoding API (I'm not tied to Google... just figured I'd start there).

I am currently working in python (geopy and pygeocoder) but will eventually port it to iOS.

Any pointers would be much appreciated.

3

There are 3 answers

2
Andrew Boyle On

I think you may be going down the wrong path with the Google Geocoding API. What you probably want to use is Google Places API.

One (simplified) way to think about is geocoding takes in a point and returns a point. What it sounds like you want to do is pass in an area, defined by a central point and a radius, and receive a collection of points contained within that area. It looks like the Google Places API can help you with that.

0
scai On

Have you considered using OpenStreetMap for your task? With the help of the Overpass API you can query for all data within a given bounding box. For example this query returns all data within the current view. It uses the overpass turbo for visualization and the Overpass API only in the background but of course you can also use the Overpass API directly for returning raw data as XML or JSON.

You can even specify which exact data categories to return, for example all shops selling clothes. Take a look at commonly used tags and the Overpass API language guide for more information.

0
majman On

In case you haven't already, check out Radar Search & Nearby Search https://developers.google.com/places/documentation/search#RadarSearchRequests