When geocoding human readable address into lat lng e.g. 3 mystreetname, myarea, mycity, mypostcode.

Should I use full address or just some part of it, for instance post code?

I know that it works ether way, but I'd like to know what would be the best practice to avoid errors geocoding locations.

有帮助吗?

解决方案

Some cities span multiple postal codes, and some postal codes span multiple cities. You might not have problems with smaller data sets but as you start dealing with a lot of addresses things like that can pop up. It's entirely possible that there are two 201 Main Streets in the same zip code, located in two different cities.

So yep, give as much detail as you can.

I'd really recommend storing your information in a spatial datatype if your database supports that as well.

其他提示

This link is the google's documentation of geocoding https://developers.google.com/maps/documentation/geocoding/?csw=1

And refer below link for the real time sample..! http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html

And for better results use more information so that you will get accurate answers

Hope it helps

I would try running the queries with as much detail as possible, and if a query fails rerun without the zip, as sometimes the zip causes problems with the google api (especially zips greater then 5 digits).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top