1

To calculate road distance I have used Google Map Distance Matrix API.

For some addresses, wrong distance is return.

To identify the issue, I have directly verified the address on google map. but Google Map API, Google Maps & Google Search are detecting wrong address.

Example:

Requested Address: 14401 N Interstate Hwy 35, Elm Mott, Texas 76640, USA
Google Response Address: 14401 I-35, Denton, TX 76210, USA.

Google Map Link: 14401 N Interstate Hwy 35, Elm Mott, Texas 76640, USA
Map Quest Link: 14401 N Interstate Hwy 35, Elm Mott, Texas 76640, USA

  • Where is that address coming from? Seems like it might need to be "14401 N Interstate Hwy 35 Frontage Rd, Elm Mott, Texas 76640, USA" (added the "Frontage Rd") – geocodezip Oct 12 '18 at 10:26
  • @geocodezip I can understand this, but why even zip code is getting changed when we have explicitly provided city and zip code both in the address? Sometimes it might be possible that the complete street address would not be there to search. – Varun Bhatt Oct 12 '18 at 10:44
  • Google returns the best match in its data. – geocodezip Oct 12 '18 at 11:14
  • @geocodezip Yes, by default it would return the best match but it is not correct. Is there any way to identify that distance returned by Google API is correct(based on the requested address)? – Varun Bhatt Oct 12 '18 at 12:17
  • If you trust the town/state or zip code; you could either check that or geocode that and check the distance against a threshold. But a general algorithm will be hard to define. – geocodezip Oct 12 '18 at 13:01
  • The Google Maps link also redirects to `14401 I-35 Denton, TX 76210 USA`. I suspect this address is missing in Google database and they return a best match. – xomena Oct 12 '18 at 19:12
  • Fwiw, the MapQuest directions api response contains the geocode results of the route locations. The quality code is also included so the accuracy and confidence of the geocode results can be used to determine if the address is right, wrong, good enough, or otherwise. – MQBrian Oct 23 '18 at 17:10

0 Answers0