Why I got ZERO_RESULTS for valid addresses in Sweden? - geocoding

I send this request https://maps.googleapis.com/maps/api/geocode/json?components=country:SE|locality:Huddinge|postal_code:14158&address=Sm%C3%A5brukets+Backe+30%2C+14158+Huddinge but I got zero result.
If I removed "postal_code:14158" it will work but It won't return the right postal code.
I got the same result for many valid addresses.

The Google Geocoding API is designed to help people create maps. Google doesn't do address verification or validation.
Geocoding is the process of converting addresses (like a street address) into geographic coordinates (like latitude and longitude), which you can use to place markers on a map, or position the map. (Google Geocoding API Getting Started)
In your case, it is best to simplify your search terms (drop the postal code, since that seems to work). You will still get fairly accurate results for placing markers on maps.
Also, you could report the information problem to Google Maps. They are responsive: they might update the service so the search returns something valid for your address search term.
If you need exact addresses or you need the postal code in all cases, try an address validation service, such as SmartyStreets. Here is a demo.
Full disclosure: I worked for SmartyStreets.

Related

Bulk geocoding for associating addresses to shapefiles [here-api]

I was wondering if I can use the here-api to geocode addresses (bulk way) and store the results. I need to store them on a python data frame to afterwards merge them with a shape file. However, in the TOS HERE says that you cannot store the results from geocoding.
I've been in your situation. Let me list the options that we've considered.
You could fetch address information dynamically using their Geocoding API. Advantage is that you'll always have up-to-date information, and you don't need to query places that you'll never use anyway.
I'm assuming that your shape file is based on HERE data. You could still try to use OpenStreetMaps. You'll get some inaccuracies if the map data differs, but it's free, and not as restrictive as HERE.
You could opt to buy the HERE map data, to work around the TOS restrictions
By the way, we went for an option 4: switching to OpenStreetMaps entirely, but it sounds like you don't have that luxery, because you have to work with existing shapefiles that you want to "enrich".

Why does the Zomato API have issues searching by zipcode?

Inside of Zomato's API documentation, you can utilize the q parameter to input practically anything. With the url below, I have been testing this with zipcodes in my area and it works like a charm.
However, when I venture out and search zipcodes from different states, it finds no results. Now the weird thing is, if I go on Zomato.com and start trying to find restaurants in their website within those different states and return back to my api call, it starts to work with those zipcodes and no longer with zipcodes from my area! What's the deal? Is there like a cookies issue or something. Any advice would be greatly appreciated!
API CALL
https://developers.zomato.com/api/v2.1/search?q= + zipcode + &apikey=[API-KEY]
I found a workaround solution that should help anyone else who runs into this issue. I extracted the lat/lon coordinates from the Google Maps API based on the zip code typed in, and then I ran those lat/lon coordinates through the Zomato API. It's one extra step, but it definitely prevents the Zomato API from having geographic restrictions.

Google geocode address resolution

Why is it that certain common addresses won't resolve using the API but they show up fine in google maps?
1400 Welton Street, Denver, CO
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=1400+Welton+Street, Denver,+CO
Google places doesn't find it either. This is a common location seems strange..
Seems like an error in Google's map data. When you put in that address to Google maps it does zoom in to the general location, but you'll notice that it does not show an exact point on the map. If you play with the street numbers it looks like other addresses around that - 1399 and 1401 for example - do in fact return relevant results with the API call, and show a dot in Google Maps.
Bing maps says there's a "Pi Kitchen and Bar" at this location, so I assume it's a real location and this is just wrong map data.
I suggest reporting it to Google so they can fix: https://support.google.com/maps/answer/3094088

google maps ios sdk geocoding query returns only 1 result

I have integrated google maps sdk for ios in my application.
I am trying to implement the functionality where user can search for a location by address.
When the query is not specific enough , the returned result should contain more than 1 result (which is the case with google maps application on ios).
But i am getting a single result for all my searches.
Any pointers in this direction will be really helpful.
P.S I am using the google maps ios sdk geocoding example code.
What GMSGeocoder offers is actually reverse geocoding service , that is it takes a lat-lon coordinates of a point on the map and then returns the address for the same. So unlike any partial search for geocoding, this search is based on a specific point and so the response will mostly have an accurate answer as the firstResult. The response class gives option to retrieve just firstResult (as you will see in the google maps ios sdk demo app) and also a results array. But the further results in the array are will be mostly less specific versions of the location like city address, state address, country address, etc and are not likely to give very different addresses

Does Yahoo's PlaceFinder API always return 0 or 1 result for a reverse (lat/lng) lookup?

I'm familiar with the geonames API, whose findNearbyPlaceName resource takes an optional radius parameter and can return multiple places for a given lat/lng pair.
When doing a similar lookup in YDN PlaceFinder, using the R gflag to do a reverse lookup from a lat/lng, will there ever be more than 1 result returned? I have not found any instances yet, and from what I can tell, the PlaceFinder API doesn't allow for radius (though you can request offset from street).
Yes, the PlaceFinder service will only return a single location. (In the case of an error or location not found, you would get 0 results.) It's designed to go between a place description and location (e.g., street address to lat/long).
I'm not sure what your needs are, but you could also check out the Yahoo GeoPlanet API which provides more hierarchical data around the point of interest. PlaceFinder and GeoPlanet can be used together in this way.
Here are a couple of hack projects that help demonstrate each of these APIs:
Placefinder Explorer
GeoPlanet Explorer