Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert an address to a latitude/longitude?

How would I go about converting an address or city to a latitude/longitude? Are there commercial outfits I can "rent" this service from? This would be used in a commercial desktop application on a Windows PC with fulltime internet access.

like image 800
swilc0x Avatar asked Sep 19 '08 00:09

swilc0x


People also ask

How can I get the latitude and longitude of an address?

Get the coordinates of a placeOn your computer, open Google Maps. Right-click the place or area on the map. This will open a pop-up window. You can find your latitude and longitude in decimal format at the top.

How do I get lat long from an address in Excel?

To get the latitude of the address in cell B2, use the formula = GetLatitude(B2) To get the longitude of the address in cell B2, use the formula = GetLongitude(B2) To get both the latitude and longitude of the address in cell B2, use the formula = GetCoordinates(B2)

How do you convert Lat and longitude to address?

Lat Long Converter The lat long converter can be used to locate an address, latitude and longitude on a map for navigation purposely or if your gps navigation system is giving you a lat long and you need to convert it to address. Type an address or latitude and longitude to start using our gps coordinate converter.

How to convert GPS coordinates to address?

Coordinates Converter GPS Coordinates Converter is a tool to convert gps coordinates to address and convert address to lat long. You can use the lat long converter to locate an address, latitude and longitude on a map for navigation purposely or if your gps navigation system is giving you a lat long and you need to convert it to address.

How do I find my current location using the coordinates converter?

You can use the coordinates finder or where am I now to find your current location in latitude and longitude or the coordinates converter to convert address to latlong and convert lat and long to address. Please make sure you choose the enable location on your browser in order for our gps coordinates system to locate your location.

How does the coordinate converter work?

The coordinate converter supports different formats of gps coordinates such as decimal degrees (DD) and degrees, minutes and seconds (DMS). When you enter an address, the lat long converter will quickly convert your address to the corresponding gps coordinates.


2 Answers

Google has a geocoding API which seems to work pretty well for most of the locations that they have Google Maps data for.

http://googlemapsapi.blogspot.com/2006/06/geocoding-at-last.html

They provide online geocoding (via JavaScript):

http://code.google.com/apis/maps/documentation/services.html#Geocoding

Or backend geocoding (via an HTTP request):

http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct

The data is usually the same used by Google Maps itself. (note that there are some exceptions to this, such as the UK or Israel, where the data is from a different source and of slightly reduced quality)

like image 179
mopoke Avatar answered Oct 18 '22 01:10

mopoke


Nothing much new to add, but I have had a lot of real-world experience in GIS and geocoding from a previous job. Here is what I remember:

If it is a "every once in a while" need in your application, I would definitely recommend the Google or Yahoo Geocoding APIs, but be careful to read their licensing terms.

I know that the Google Maps API in general is easy to license for even commercial web pages, but can't be used in a pay-to-access situation. In other words you can use it to advertise or provide a service that drives ad revenue, but you can't charge people to acess your site or even put it behind a password system.

Despite these restrictions, they are both excellent choices because they frequently update their street databases. Most of the free backend tools and libraries use Census and TIGER road data that is updated infrequently, so you are less likely to successfully geocode addresses in rapidly growing areas or new subdivisions.

Most of the services also restrict the number of geocoding queries you can make per day, so it's OK to look up addresses of, say, new customers who get added to your database, but if you run a batch job that feeds thousands of addresses from your database into the geocoder, you're going to get shutoff.

I don't think this one has been mentioned yet, but ESRI has ArcWeb web services that include geocoding, although they aren't very cheap. Last time I used them it cost around 1.5cents per lookup, but you had to prepay a certain amount to get started. Again the major advantage is that the road data they use is kept up to date in a timely manner and you can use the data in commercial situations that Google doesn't allow. The ArcWeb service will also serve up high-resolution satellite and aerial photos a la Google Maps, again priced per request.

If you want to roll your own or have access to much more accurate data, you can purchase subscriptions to GIS data from companies like TeleAtlas, but that ain't cheap. You can buy only a state or county worth of data if your needs are extremely local. There are several tiers of data - GIS features only, GIS plus detailed streets, all that plus geocode data, all of that plus traffic flow/direction/speed limits for routing. Of course, the price goes up as you go up the tiers.

Finally, the Wikipedia article on Geocoding has some good information on the algorithms and techniques. Even if you aren't doing it in your own code, it's useful to know what kind of errors and accuracy you can expect from various kinds of data sources.

like image 29
CMPalmer Avatar answered Oct 18 '22 00:10

CMPalmer