Getting all addresses on a street - Google Maps Geocoding API - google-maps

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.

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. :)

google places and geocode not returning full results list

I am doing some mapping work and need to find latitude and longitude of villages in india many of which are small and rural. I am having trouble finding the full set of locations with the same name, for example a village named 'Kallanai' (see api links below, note they need appropriate keys for the places API to run on your computer). I can find the one I'm looking for in google maps by entering www.google.co.in/maps/place/Kallanai into the browser however it will not turn up in the geocoder or places api without specifying the associated pin code (analogous to zip-code). Can anyone explain why the basic searches for either the geocode or places API using the village name alone do not return the village with the pincode 625501 in the results?
e.g.
Google places:
https://maps.googleapis.com/maps/api/place/textsearch/json?query=kallanai&sensor=false&key=enter your key
https://maps.googleapis.com/maps/api/place/textsearch/json?query=kallanai+625501&sensor=false&key=enter your key
will post google geocode links in follow up as stackoverflow will not let me include more than 2 links in my post without more points.
In a world where autocomplete is common and almost taken for granted, Google Maps has (long) switched to showing just the one results your most likely looking for.
Places Autocomplete API might get you more of what you're looking for, but it would still be a sub-optimal fit for database-like queries like this. It works best when you have users typing, each of them knowing which Kallanai they want, so they can select the suggestion that matches, and they can add details (e.g. PIN code) to get it if the suggestion doesn't show up at first (max 5 suggestion show each time).
Google does Geocoding in a different way from classic GIS databases. To obtain all cities [with a given name] in a given country, you'd probably need a database like GeoNames or Natural Earth.

Google Maps Geocode - Wildcard searches beyond exact matches

Anyone know if the Google Maps Geocoding service can return results including locations that start with the search term when it finds an exact match for the search term?
Here's my example
In Australia if I search for the term "Bass", I get exactly one result because there is one town in Australia called Bass. But I also want to include any other town that may start with Bass - EG "Bass Hill" and "Bassendean".
I haven't found a reference or example - any help would be appreciated!
I doesn't see any way to do this.
Found this from google geocoding reference.
How should I format my geocoder queries to maximise the number of successful requests?
The geocoder is designed to map street addresses to geographical coordinates. We therefore recommend that you format geocoder requests in accordance with the following guidelines to maximise the likelihood of a successful query:
* 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.
Now, given above it(google geocoding webservice) isn't going to assume the inputs given by you for some other input. It tries to map the inputs given by you to the street address, city, country or something else like that.

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 geocode non-standard business addresses

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.......... :)