Google Maps Geocode - Wildcard searches beyond exact matches - google-maps

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.

Related

How to get accuracy/confidence in places autocomplete service search for automated validation?

In a situation where a non-validated address string is provided, I need to programmatically make sure that an address exists and is plausible before continuing. In this process, no user- or manual interaction is allowed to take place.
The address string can range from very accurate e.g. "street housenumber, zipcode city country" to something very inaccurate like this "housenumber, country".
Assuming our search term is "main 1"
Using the places autocomplete service, I receive a long list of possible matches, but they are not very accurate thus no validation should take place.
Assuming our search term is "1 Main Street, Brooklyn, NY, USA"
I might get a list with multiple addresses:
* 1 Main Street, Brooklyn, NY, USA
* 10 Main Street, Brooklyn, NY, USA
* 11 Main Street, Brooklyn, NY, USA
* ...
The first match in the list is a high accuracy match compared to the first example and can be used as a solid match.
So is there any way to tell the result quality apart in a technical manner?
Since you are building a programmatic service that does not involve user interaction, your use case seems better suited to use Geocoding API instead of Place Autocomplete. Place Autocomplete is intended to provide typeahead predictions based on user input, whereas Geocoding API takes an "address" as input and returns its best match(es) for that input including full address information and lat/lng coordinates.
Geocoding API request documentation: https://developers.google.com/maps/documentation/geocoding/overview#GeocodingRequests
If you're using Maps JS API, Geocoding service documentation:
https://developers.google.com/maps/documentation/javascript/geocoding

What is the recommended format for search query in Google and Apple maps?

I want to show the direction from my React Native app to the specific address in Google or Apple maps application depending on the Platform. Are there any requirements for address query format so I can get better search results?
I've found following for Google https://developers.google.com/maps/faq#geocoder_queryformat. Any ideas for Apple Maps?
Here what I’ve found in official docs
Google
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 maximize 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. Doing so may result in responses with ZERO_RESULTS.
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.
https://developers.google.com/maps/faq#geocoder_queryformat
Apple
Use the CLGeocoder class with a dictionary of Address Book information or a simple string to initiate forward-geocoding requests. There is no designated format for string-based requests: Delimiter characters are welcome, but not required, and the geocoder server treats the string as case-insensitive. For example, any of the following strings would yield results:
“Apple Inc”
“1 Infinite Loop”
“1 Infinite Loop, Cupertino, CA USA”
The more information you can provide to the forward geocoder, the better the results returned to you. The geocoder object parses the information you give it and if it finds a match, returns some number of placemark objects. The number of returned placemark objects depends greatly on the specificity of the information you provide. For this reason, providing street, city, province, and country information is much more likely to return a single address than providing only street and city information. The completion handler block you pass to the geocoder should be prepared to handle multiple placemarks, as shown below.
[geocoder geocodeAddressString:#"1 Infinite Loop"
completionHandler:^(NSArray* placemarks, NSError* error){
for (CLPlacemark* aPlacemark in placemarks)
{
// Process the placemark.
}
}];
https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/UsingGeocoders/UsingGeocoders.html

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

Google reverse geocoding - how to snap to nearest full postcode

I am using Google's reverse geocoding functionality with the maps api v3 to retrieve postal addresses for latitude longitude (when dragging a marker around a map).
This is a UK application only, and part of the system requires a full, or near full, postcode to process correctly. However the reverse geocoder regularly returns just the part of the postcode - for example "GU3", even when the actual address returned appears to be complete - for example including street and house number.
Is there anyway, preferably google but otherwise if not, of 'snapping' the address to the nearest full postcode?
I'm aware similar functionality exists for snapping to the nearest panorama view, but there appears to be no equivalent for postcode.
The UK post code database is available for download from the Ordnance Survey open data
www.ordnancesurvey.co.uk/opendata
Alternatively you can use a service like uk-postcode.com to return the closest post codes to a location
See the example at https://google-developers.appspot.com/maps/documentation/javascript/examples/geocoding-reverse
Try a UK location like 51.436951, 0.058112.
The results include an address_component of postal_code, "SE9 3AG".
It may be necessary to geocode the address you're given and then reverse-geocode the results in order to get the postcode. But it is possible.