6
votes

I am currently attempting to geocode addresses but I'm having an issue with getting accurate co-ordinates. For example if I enter the address into google maps it shows up correctly, but if I geocode the same address I only get an APPROXIMATE location type from the geocode json response as well as different co-ordinates.

What is causing the discrepancy and is there anything I can do to improve the accuracy of my geocoding to get to the level of a manual google maps address search?

1
Which address are you experiencing this with?Matt
Unit 1,Fonthill Retail Park,Lucan,Co. Dublin for example returns diff co-ords to: maps.googleapis.com/maps/api/geocode/…BIOS
It looks like one of them is on the street and another is the actual building on the side of the street, but they are basically the same...?Matt
but what is the reason for the discrepancy?BIOS
Why this question is down voted I have no idea.BIOS

1 Answers

0
votes

Try adding the country to the query. With Fonthill Road, Lucan, Dublin it gives different size results:

  1. http://maps.google.com/maps/geo?q=Fonthill%20Road,Lucan,Dublin,Ie
  2. http://maps.google.com/maps/geo?q=Fonthill%20Road,Lucan,Dublin

Note: I use Fonthill Road, Lucan, Dublin. Thus putting the region to the query makes a huge difference in size of the response. The geocode -6.4059442, 53.3473048 is very close to Unit 1,Fonthill Retail Park,Lucan,Co. Dublin.

My conclusion is you need to compare name and address, because the result from your query is:

"name": "Fonthill Retail Park,Lucan,Co. Dublin,Ie", "address": "Lucan, Co. Dublin, Irland",

and thus there isn't a Fonthill Retail Park in Google so the reverse geocode is Lucan, Dublin and this is exactly what you find in the map!?!

In my example I use address Fonthill Road..., the result gives

"name": "Fonthill Road,Lucan,Dublin,Ie" and address: "address": "Fonthill Rd N, Dublin, Co. Dublin, Irland",

which is exactly the same and the geocode is also showing the correct location but I'm not sure if the region is so important, it's probably I'm wrong but I think you need to loop through the response if you want to improve your accuracy anyway??

Have you read: https://developers.google.com/maps/documentation/geocoding/index#RegionCodes?