How to geocode non-standard business addresses - google-maps

I have small database of business and their addresses. Using the Google Geocode API, I've been abel to get maybe 80% accuracy. If a business has a simple address on a street, Google usually does a good job. However, many business have odd addresses, which are presented differently depending on the database. Example:
Royal Copenhagen
Manly 1
Shop 2A, The Corso (Wharf End)
Manly NSW 2095
(02) 9977 1618‎
Google's Geocoder fails to find a good address for this location. However, if I Google for 'Royal Copenhagen, Manly NSW 2095', I can easily find the address, and the pin has the correct location:
2 The Corso
Manly New South Wales 2095, Australia
(02) 9977 1618‎
Right now, I have my geocoding program trying various combinations of the address fields in attempt to get the best location. Note, on Google Maps, entering the phone number and city returns very good results, but the geocoder returns much different results.
Has anyone had any success programatically geocoding databases like this?

Personally I use YAHOO's geocoder for getting the long/lat information and I use Google's API to map the data. I ran into the same issue where Google just wasn't quite up to the job of more complicated addresses but the Yahoo API has more flexibility. I'm also running a very small application and its not an issue using both but your mileage may vary.

It's possible that the Google API is not sufficiently sophisticated for this purpose.
I once used a commercial product for geocoding. The product included a stack of DVDs, updated monthly, for geocode data for as much of the world as you might wish to pay for. This was not a trivial system to use, but it got its parsing and geocoding data from the Postal Authorities of countries around the world, so could stay up to date. The theory was that any address which would permit a letter to be delivered could be parsed and geocoded.
I do not recommend this product. I will tell you the name only so that you can search and find their competitors. The product was Trillium.

I found I could use the Google AJAX Search API for my purposes. It's design to be used from within JavaScript, but it's possible to call directly from Python. For a search, it will return a list of matching business, and their geocoded locations.

google only can geocode those address which is in there database , it is not dynamic
if you want to do this i think that yopu have to write an application to find the latitude and longitude and save to your database then it will be easy.......... :)

Related

Simple address validation with Google maps

Saw some answers here which suggest paid services or complicated address validation designs, but it doesn't apply to our specific case.
We have a lead capture form that lets users start typing the address and it autocompletes it for them:
And there's 2 common mistakes which we keep seeing:
1) Missing door number
2) Missing city name (as in the screenshot)
We're looking for a loose address verification which has room for error and that checks if there is a:
a street number and city name in the address
We could do a simple regex to make sure there's numbers in users' input, but if we could do both using Google API that would be great.
P.S: We do display a Google map so we're not breaking their TOS by making API calls to validate the address.
Update:
I was thinking of using JSON like this http://maps.googleapis.com/maps/api/geocode/json?address=45.4993726,%20-73.5653678&sensor=false
which is returned by Google maps and does contain street numbers etc. By door number I mean street number (it's under long_name)
I work for a company called Addressy, and we offer the exact product you're looking for. It will integrate into your form in a very similar way to the Google Maps API, but we are very proud of our data quality.
Have a play around with the service on our website, and see if it's for you. We offer 100 free USA lookups per month, with plans starting at $25 per month for 500 USA and Canadian lookups.
Please feel free to get in touch with me on StackOverflow or through the contact form on our website if you have any queries. :)

Getting all addresses on a street - Google Maps Geocoding API

My task is to take a specific street and find all of the houses on that street. My input is a complete address with city, zip, etc - except without the house number. The desired output is a literal list of every home on that street and their respective house numbers. (411 Street Dr., 413 Street Dr.)
I can't find anything in the Maps / Geocoding API which provides this functionality, or even something similar like finding all of the addresses within a polygon.
The only real solution is to "guess" house numbers on the street and verify whether not it's a real address. To make this slightly more accurate, the TIGER database could potentially be leveraged. It does include "address ranges" for streets, such as "400 - 432".
My question is: does anybody know of alternate API or another combination which provides complete results (every address 99% of the time)?
It is so burdensome to make that many requests and having to essentially throw most of them in the trash!
PS. The Places API will not work here because the need is residential homes.
The Google Maps APIs do not offer bulk download of maps data as you seem to be looking for. You can use the APIs to let users find places, but they are not for you to obtain exhaustive maps data sets.
Maybe you can use the Google Maps APIs to build your application/s in such a way that you don't really need to have all houses in each street, enabling each user to find the one place s/he needs.

Google Geocode API Address Formatting United States

This question is similar in spirit to. http: //stackoverflow.com/questions/7764244/correct-address-format-to-get-the-most-accurate-results-from-google-geocoding-ap
I've read the FAQ on the google geocode developers guidelines and it states that the suggested format for addresses is based off the country's postal service. In some of my testing this is not always working and sometimes I'm seeing better results putting the street at the end of query.
example being: http://maps.google.com/maps/api/geocode/xml?address=+3700%20W%20FLAMINGO%20RD++LAS%20VEGAS+NV
This returns zero results, but swapping road to the end returns a correct result:
http://maps.google.com/maps/api/geocode/xml?address=++LAS%20VEGAS+NV+3700%20W%20FLAMINGO%20RD
On top of that if I include the zipcode (89103) to the second request, that one will return no results as well.
Can anyone help me to understand what the appropriate format should look like for US addresses?
Thanks much!
-Chris
The answer you can find in this document
https://developers.google.com/maps/faq#geocoder_queryformat
How should I format my geocoder queries to maximise the number of successful requests?
Specify addresses in accordance with the format used by the national postal service of the country concerned.
Do not specify additional address elements such as business names, unit numbers, floor numbers, or suite numbers that are not included in the address as defined by the postal service of the country concerned.
Use the street number of a premise in preference to the building name where possible.
Use street number addressing in preference to specifying cross streets where possible.
Do not provide 'hints' such as nearby landmarks

Geocoding with Google Maps API - accuracy and limitations

It is easy to use the Google Maps API to find a specific street address and return the latitude and longitude. For example, link.
However, it appears that typing in the name of a specific location, for example a park, causes problems. Often these don't have a specific street number (at least, not easily findable). Despite the fact that Cadigal Reserve is located at the same address as in the link above, if I enter that as part of the query string and remove the street number, the results become rather useless: link
Typing this directly into maps.google.com easily finds the park itself (and of course, you could then find the latitude/longitude by looking in the URL).
Is there not any way of using the Google Maps API to geocode a park location like this?
It is important to understand that geocoding is not an exact science. The recommended practice if you have addresses that you know should geocode to a specific location is to build a cache and use local (client-side) geocoding.
In version 2 of the api you would build your own client-side cache that contains pre-computed geocoder responses by extending the GeocodeCache. Once a cache is defined, you would call the setCache() method and away you go. This is pretty much explained here:
http://code.google.com/apis/maps/documentation/javascript/v2/services.html#Geocoding_Caching
However, AFAIK GeocodeCache was removed in V3 of the api...
So, I would suggest implementing your own client -side caching-strategy of known addresses and their corresponding coordinates. When your application receives a geocode request for a known address the response would come from your cache (rather than Google's geocoding servers).
Failing all that you can always use a payed geocoding service that, in theory, will have a much more accurate dataset (as well as a higher limit on requests, etc).
Finally, you should also take a look through the Geocoding Strategies document as it gives a good handle on some of the issues here.

How to handle inaccurate Google Maps locations?

When I type in addresses in Google maps for locations in Asia, quite a lot of them are off by more than 200 metres. For example, "blk 85 bedok north road, singapore" is off by more than 300 metres. While I don't expect Google Maps to be spot on every time, sometimes the error is too great for certain use cases. What options do I have to handle inaccurate Google Maps locations in a web app? The web app should let the user enter an address or postal code as part of an entry and I will geocode the address and store the lat-long.
You could use bing, yahoo's and google's Geo Location api's to find latitude and longitude for a location, average the results together and use the result. Thus, if they all agree, you still get a good location, but if they disagree you get the best approximation of all three.
You could even programmatically compare the results from each engine and throw out any that don't agree with the others (for instance, if bing and yahoo agree and google does not, you could throw out google).
Beyond that, if you have a collection of addresses you know to be wrong, you could simply store the correct longitude and latitude for those points, and override the results in those cases.
Of course, to get around this problem at all, you'll need to geocode the addresses, check their validity in some way (as described above), and plot them using their latitude and longitude.
You don't have any fixes for this really, you're at the mercy of the accuracy of google maps here. The important part is you don't know if the address in inaccurate when doing one search to the next, so nothing you can do to handle it.
You can post a topic here and google will see it and often respond as well: Google Maps Local Listing Forums. I'd open something there with some of your examples and hope they get more accurate...that's all you can do in this case.
There are always other alternatives as well, yahoo and bing have mapping APIs, but I have no idea how much better or worse off you'd be going that route.
The problem is not the lat/lng data, in fact, they are correct. The problem is that the geo coords of the map tiles of the public Google maps api are inaccurate. The maps at maps.google.com are provided by a different map provider than the map tiles used with the public Google Maps API that you can embed in your website, use in your own applications, etc.
Check my recent posting at Google Maps & apps with mapview have different current positions
Is the result out on maps.google.com as well as through the maps api?
If on google maps live site the result is accurate then you can do an ajax search to return the correct lon/lat.
I have used this when geocoding UK postcodes
Geocoding UK Postcodes with Google Map API
I tried to reply to the upper answer, but I am not qualified enough yet. Just be aware that whatever you're using for geocoding, sometimes has restrictions on the use of that data. For example, google's geocoding API isn't allowed to be used to display information retrieved anywhere but google maps. The same might be for the others, I don't know what your project is, but it's something to be aware of.