0

I'm attempting to use Google Geocode to convert a textual address to a longitude/latitude position.

Sometimes, the geocoding operation fails (e.g. the city name is listed as "Rouyn Centre Rouyn-Noranda" instead of "Rouyn-Noranda"). Now, it just so happens that I've got a longitude/latitude point that is near the desired address (say within 1km of the actual address).

Is there a way to look up the coordinates of a street name, number (excluding city, postal code and country) that is "near" a second point?

Gili
  • 86,244
  • 97
  • 390
  • 689
  • Actually forget that... I think your answer is here: http://stackoverflow.com/questions/6159074/given-the-lat-long-coordinates-how-can-we-find-out-the-city-country – Cliff Ribaudo Dec 01 '14 at 21:45
  • @CliffRibaudo, I know how to reverse geocode. The question is how to restrict forward geocoding to addresses close to a point. Reverse geocoding alone is not the answer. – Gili Dec 01 '14 at 22:10
  • Yeah... so not really sure why Borgwardt's answer or the other one don't cover it. There is no easy answer to your question. You're going to have to do work. – Cliff Ribaudo Dec 01 '14 at 22:17
  • *look up the coordinates of a street name, number that is "near" a second point* - That is called [biaising](https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingViewports). – MrUpsidown Dec 02 '14 at 11:23

1 Answers1

0

You could test any subsequent points to see if they're within 1km of the original point using google.maps.geometry.spherical.computeDistanceBetween().

Chris Smith
  • 480
  • 5
  • 12