6

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?

BIOS
  • 1,655
  • 5
  • 20
  • 36
  • Which address are you experiencing this with? – Matt Oct 08 '12 at 20:11
  • Unit 1,Fonthill Retail Park,Lucan,Co. Dublin for example returns diff co-ords to: http://maps.googleapis.com/maps/api/geocode/json?address=Unit+1,Fonthill+Retail+Park,Lucan,Co.+Dublin&sensor=false – BIOS Oct 08 '12 at 20:48
  • 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 Oct 08 '12 at 21:18
  • but what is the reason for the discrepancy? – BIOS Oct 08 '12 at 21:47
  • Why this question is down voted I have no idea. – BIOS Oct 16 '12 at 10:18
  • possible duplicate of [Google Maps Web site and API : different results](http://stackoverflow.com/questions/10567487/google-maps-web-site-and-api-different-results) – jwueller Apr 01 '13 at 04:09

1 Answers1

0

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?

Micromega
  • 12,486
  • 7
  • 35
  • 72
  • Do you mean 'region=ie'? This produces the same json result. – BIOS Oct 08 '12 at 21:58
  • This produces the same json result – BIOS Oct 08 '12 at 22:01
  • I've added some more information, in essence you need to compare name and address to improve your accuracy. – Micromega Oct 08 '12 at 23:35
  • 2
    This still doesn't account for the location difference between google maps and geocode API using exactly the same input. They should return the same results ideally :( – BIOS Oct 16 '12 at 10:16
  • Ok. But it's answering your 2nd question how to improve your accuracy? Maybe the use different databases? – Micromega Oct 16 '12 at 14:05