0

Many times it's returning result within around 1.0 miles but not exact.

from pygeocoder import Geocoder
addr = "Hometown BI-LO, 1016 Pine Log Road, Aiken, SC 29803, United States"
Geocoder.geocode(addr)[0].coordinates

returns (33.516093, -81.73750240000001)

When same i searched on google map site it's showing 1 mile far.

My client gives me address and i convert them into geocodes.

I have also tried with geocode api.

[https://maps.googleapis.com/maps/api/geocode/json?address=BI-LO+HOMETOWN,+1016+PINE+LOG+ROAD,+AIKEN,+SC+29803][1]

My client gives me address and i convert them into geocodes.

Is there any way searching on google map site and using script always return same result?

Ankit Sachdeva
  • 179
  • 1
  • 9

1 Answers1

0

You could have a try with this library:

http://geocoder.readthedocs.org/en/latest/providers/Google/

It is an active open source project. You could ask help if you don't get the result you want and the best part of open source: you can fork and create a pull request.

Pyglouthon
  • 552
  • 4
  • 15
  • It return 5.0 miles away. `g = geocoder.mapquest('Hometown BI-LO, Hometown BI-LO, 1016 Pine Log Road, Aiken, SC 29803, United States')` `g.lat, g.lng` – Ankit Sachdeva Mar 16 '15 at 10:02
  • Did you try with the google provider? Because your command is for mapquest. If you want same result as Google map, you should use google provider – Pyglouthon Mar 16 '15 at 10:21
  • Yes, even with google provider not geeting correct output. `g = geocoder.google('Hometown BI-LO, Hometown BI-LO, 1016 Pine Log Road, Aiken, SC 29803, United States')` `g.latlng` [33.516093, -81.73750240000001] **Expected [33.523116, -81.724922]** @SBiilion – Ankit Sachdeva Mar 16 '15 at 10:29
  • Ok. I didn't understand that your problem was with the google map api. – Pyglouthon Mar 16 '15 at 11:54
  • 1
    http://stackoverflow.com/questions/10567487/google-maps-web-site-and-api-different-results – Pyglouthon Mar 16 '15 at 12:06