Is there an existing service that would could turn a street address into a "friendly name" like "Corner of 46th & 7th" or "14th street between 1st & 2nd"?
I remember looking at one a few years ago but for the life of me cannot find it now.
If not, how might you go about doing this with popular geolocation services (like Google's)?
Have a look at Google Places. You'll need an API key (which is free) - https://developers.google.com/maps/documentation/places/
Related
Sorry, this may come across as a bit vague but how would go about and displaying a different logo of an organisation based on where the site is opened from. For example, the organisation would want their official South African logo to be displayed when the site is opened in South Africa, and another official logo when it is opened in Kenya or Ghana for example.
Would the site simply have to be hosted in more than one server...can't think of any other possible way?
To find country first you find Ipaddress
string Ipaddress= HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
Using Ip address you can find location as follows
using (var wc = new WebClient())
{
string output = wc.DownloadString(String.Format("http://api.hostip.info/?ip={0}&position=true", ipaddress));
}
Output is in XML format and it will contain a countryName tag
I would have this as a comment .Since, I don't have enough reputations, I am posting as an answer.
This link would be useful to detect the country and change the logo based on the country in your logic.
Detect/estimate country of a http-request in ASP.NET
Adding the contents of the link, since the link may expire.
You can use one of available web services to match an incoming request to a country.
Otherwise you may decide to grab the MaxMind database file (GeoLite Country), read from this file in your application and perform a match. Thus you will be independent from a third-party service, only pulling regularly updates for the database file.
Also check out similar questions:
Geolocation web service recommendations
Know a good IP address Geolocation Service?
In a very short, in market so many vendors are there, who are tracking geolocation, One of them is google API.
https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY
You can generate your own API_KEY.
Hope this post will helps you. :)
Is there a library or service that returns the US federal congressional district given a US address?
You can do this on govtrack.us. I am not sure if there is a code framework for this, but you could probably write one from this information.
Full disclosure - I work for a company that also provides congressional district data - smartystreets.com
Keep in mind that this information changes often and I have been looking for the last 4.5 years and haven't yet pinpointed an actual, absolutely reliable source for this data. All of the companies I have looked at, including mine, say that their source is the US Postal Service but no one in the US Postal Service has been willing to tell me how frequently the data is updated within their system and what their source might be. So, just be aware.
I'm one of the creators of Geocodio and we had this problem ourselves. So we made it part of our geolocation tools!
You can use the Geocodio API or spreadsheet upload to look up Congressional districts, Representative/Senator contact information, etc. Docs: https://www.geocod.io/docs/#congressional-districts
You can use the Sunlight Foundation Congress API, which is free to use. Go to: http://tryit.sunlightfoundation.com/congress You can determine congressional district by zipcode (not completely reliable since zipcodes can traverse multiple districts) or by latitude/longitude. Just use Google geocoding to retrieve lat/lng from your address, and then you can look up the congressional district.
The whoismyrepresentative.com/api site can translate a zipcode into a congressional district. You can do a call with the url below, replacing 10038 with your zipcode.
http://whoismyrepresentative.com/getall_mems.php?zip=10038&output=json
Hope that helps!
**Also note that the sunlightfoundation site returns a 404 error and govtrack.us does not have an api for searching for congressional districts.
Looking at the latest release of geokit-rails (2.1.0), it looks like they have removed the method geo_scope (https://github.com/geokit/geokit-rails/commit/781c4dc62d3b044196efbfad269d4780e6afbe6b).
However, the README on the github account still says to use it.
If the example they provide in the README -- "Location.geo_scope(:origin => '100 Spear st, San Francisco, CA')" -- no longer works whats the new method?
Problem I am trying to solve:
When users register for my site, I collect their mailing address, I need to convert that to lat/long and store it in my database.
As an alternative you could use an address verification service. Some of these include, SmartyStreets (where I work), Melissa Data, and Lob. I'm not a huge expert with the other providers, but I know with SmartyStreets you can use the street API to get latitude and longitude from an address and have the comfort of knowing that the address exists. SmartyStreets has both a US Street API and an International Street API
If you use a non address verification service like Google Maps, you run the risk of approximate latitude and longitude coordinates being returned to you.
There are a lot of geocode services out there (like http://geo-autocomplete.googlecode.com/svn/trunk/demo/ui.demo.html for example) where user can write a location (or part of it) and it will be resolved to real existing location.
There is also a lot of info provided with the search result (like country ISO code, coordinates, etc..), but none of the services seem to provide country and city code.
What I mean is a code used to phone to certain are. For example Country code for Germany will be 49 and for city of Dusseldorf will be 211.
Is there any service, where I can get this info from the user input. Or is there any way to combine the two. For example I get city name from google geocode service and the try it on some city codes database. If yes, can anyone please provide me with links.
You can use for instance Yahoo's GeoPlanet. For more elaboration on services to solve your problem you might want to check out this answer on gis.stackexchange.com, which seems to cover the kind of service you need.
I read a few other posts on SO that came close to what I was looking for, but I'm basically looking for a service to provide accurate GeoLocation services that will get you close to a location.
We used one IP based service that plotted us 4 hours away. That's no good. What is the most accurate service outside of the HTML5 GeoLocation API?
You will find both free & paid services for this: http://blog.programmableweb.com/2009/03/31/3-free-ways-to-geolocate-by-ip/
MaxMind is the better known series that works well at the City level.
Funny you should ask. There was a /. article on this subject just a few days ago. Here is an article by Bruce Schneier on it. Very interesting (and disturbing) stuff.
HTML 5, it gives you coordinates Latitude and longitude that you can send to a google map an get the map location.
http://html5demos.com/geo
but works only in newest browsers..