How do I find a place of business from geolocation information? - geolocation

Let's say I'm just wondering around with my cellphone and I want to know exactly which place of business I'm in. This would seem to be easy, but I don't see away to do it. It's possible to reverse geocode but this gives an address range. Google doesn't seem to have http base local search using local information, because you could kind of guess from the local search or points of interest. It needs to be through an http API, not an ajax driven map. Is there a way to do this?

You might look at GeoAPI, which lets you search for businesses near a particular lat/lon coordinate and returns detailed information about the business (name, type, hours, etc.). It's a simple JSON API with good documentation and examples.
There's likely more APIs out there for local business data -- which I personally would love to hear about if people want to add them as answers to this question or comments on my answer. What's your favorite? What are the advantages and disadvantages?

Related

how to display routing data online (with the lines between points)

I have a set of routing data, in both CSV or KML format. It is basically a list of Lat / Lon and some supporting information.
I am looking for a way to display this as a route (e.g. with lines between the points in the order they appear in the list) online. Ideally a free option, as I'm not likely to need it again in the near future.
I have found hundreds (maybe an exageration) of ways of plotting the points, but not one that will include the lines. I'm trying to avoid the long and tedious process of converting one of these to an image and drawing the lines by hand.
Can anyone suggest such a site?
This question was asked on a google group for google maps. The user received an answer that pointed him towards the google map API. Given how other apps / web pages do this using google maps (never seen it done any other way) I would imagine this would be the best route to go down as its probably something they have built into the service.
https://groups.google.com/forum/?fromgroups=#!topic/google-maps-js-api-v3/F_iroBiBeww

how to find location with business name?

I am trying to build an iphone app that finds the location with business name.
For example, I want to annotate a restaurant and I want to find it with the name of restaurant. I was trying to use CLGeocoder, but it seems like geocoder does not help in this case. I am not sure what to do.. can anyone give me a hint about this?
Thank you
Google maps will take a business name and return location(s). It sounds like a webservice is what you're needing, you'll just have to think through the inputs, the outputs, and figure out how it all logically fits into your app.
"Business name" is info independent of the address and not available to CLGeocoder. For this you have to use an external service where business names are actually registered. I would suggest the Google Places API, but the search results will still be limited to those businesses registered to Google.
And yes, you will have to dirty your hands with "NSURL stuff", and process the results with "NSJSONSerialization stuff".
If you're happy to consider an SDK-based solution, Huq Industries offer exactly this as part of their Real-world Analytics platform. They've done a lot to address the problem of reliably relating device location to physical businesses accurately by combining location with other data including WiFi. You can get business events by business name, category and address.
Coverage is pretty global and it's mostly free. Check out the SDK repo on GitHub.
Disclaimer: I contributed to this.

Get nearest business name/type by address or GPS coordinate

I'm writing an iOS application and it would be very handy to know the way to find a nearest business name (and especially business type, such as restaurant/hotel/store etc.) by a GPS coordinate, or at least by an address.
So just curious, is there such API/Web service out there?
Yes
Bing
Google Places
Yahoo Geo Technologies
I'm sure there are loads more to be found with a quick google
OK, it seems like I have to answer my own question. I didn't try it out in code, but the answer is here:
http://code.google.com/apis/maps/documentation/places/
Unfortunately there seems to be a cap on how many times Google places API can be called (for free), i.e. 1000 times per day (for the same API_key.)

Geolocation, Is it possible to get latitude and longitude from address and store locally in my database

I want to be able to run queries locally comparing latitude and longitude of locations so I can run queries for certain addresses I've captured based on distance.
I found a free database that has this information for zip codes but I want this information for more specific addresses. I've looked at google's geolocation service and it appears it's against the TOS to store these values in my database or to use them for anything other than doing stuff with google maps. (If somebody's looked deeper into this and I'm incorrect let me know)
Am I likely to find any (free or pay) service that will let me store these lat/lon values locally? The number of addresses I need is currently pretty small but if my site becomes popular it could expand quite a bit over time to a large number. I just need to get the coordinates of each address entered once though.
This question hasn't received enough attention...
You're correct -- it can't be done with Google's service and still conform to the TOS. Cheers to you for honestly seeking to comply with the TOS.
I work at a company called SmartyStreets where we process addresses and verify addresses -- and geocode them, too. Google's terms don't allow you to store the data returned from the API, and there's pretty strict usage limits before they throttle or cut off your access.
Screen scraping presents many challenges and problems which are both technical and ethical, and I don't suppose I'll get into them here. The Microsoft library linked to by Giorgio is for .NET only.
If you're still serious about doing this, we have a service called LiveAddress which is accessible from any platform or language. It's a RESTful API which can be called using GET or POST for example, and the output is JSON which is easy to parse in pretty much every common language/platform.
Our terms allow you to store the data you collect as long as you don't re-manufacture our product or build your own database in an attempt to duplicate ours (or something of the like). For what you've described, though, it shouldn't be a problem.
Let me know if you have further questions about address geocoding; I'll be happy to help.
By the way, there's some sample code at our GitHub repo: https://github.com/smartystreets/LiveAddressSamples
http://www.zip-info.com/cgi-local/zipsrch.exe?ll=ll&zip=13206&Go=Go could use a screen scraper if you just need to get them once.
Also Microsoft provides this service. Check if this can help you http://msdn.microsoft.com/en-us/library/cc966913.aspx

Bing API for finding nearby cities

Is there a Bing API for finding nearby cities given a city name or lat/long combination?
I don't know if Bing provides this, but you build your own from the data available from geonames.org
They provide an API to get places near a given lat/lng: http://api.geonames.org/findNearby?lat=47.3&lng=9&username=demo
Or you can also go all out and implement a solution for your own needs using their data, as per this answer: Given the lat/long coordinates, how can we find out the city/country?
I think this is what you're looking for: Bing Maps API Sample
The short answer is no, there is no Bing API for finding nearby cities.
That said, it would be possible to 'cook your own' using the existing APIs. However, one thing that would need clarification is what 'nearby' means. I presume you mean within a specific radius of a given point (determined by a city name or lat/long combination).
Using the Bing Api it would be fairly trivial to implement an algorithm to reverse geocode a location and then test for places within x distance.
Failing that, you could use something like geoPlugin, it is free and you can put it on your sever - thus avoiding 3rd party up-time issues.
http://www.geoplugin.com/webservices/php#php_class
Take a look at the nearby places features, this does exactly what you want.
http://www.geoplugin.com/webservices/extras
No, there isn't. However, it's relatively simple to get the bounding box for a given coordinate and then use the Bing Maps API with that. I'm doing this and used this solution to get what I needed...
https://stackoverflow.com/a/14314146/73680

Resources