We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Latitude Longitude Finder

lvollmer
lvollmer asked
on
Medium Priority
2,469 Views
Last Modified: 2013-12-12
Is there some type of pre existing PHP app that I can include on my site that will allow a user to enter a street address, city, state, zip etc and then get the lattiude and longitude of that address?

OR

My page records address, city, etc. and writes it to a database. Is there code I can add to the write process that will add lattitude and longitude points to the database by using the data that the user inputs?
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Hm... that's kind of a complex thing to add to a web site, or at least I would think so.  You could look into Google Maps, but I don't think they support the actual conversion to latitude/longitude:
http://www.google.com/apis/

There's is a site called Geocoder that has an available web service that you can subscribe to for getting regular coordinates from mailing addresses:
http://geocoder.us/

Other sites that give latitude/longitude, but may not have any kind of developer options:
http://www.hmssurprise.org/Resources/whereami.html

Hope that helps ;)

Author

Commented:
Tomee,
I am learning that this is a real pain, and something that a lot of developers are looking for.
CERTIFIED EXPERT
Commented:
If you want to do it yourself, without paying for a service, then see this tutorial, which shows you how to do geocoding with PHP and MySQL in a step-by-step process:
http://blog.tooleshed.com/?p=16

There's also a Perl module that is specifically for getting the latitude/longitude:
http://search.cpan.org/~sderle/Geo-Coder-US/
 
Both of these use TIGER/Line data provided for free by the US Census Bureau:
http://www.census.gov/geo/www/tiger/
http://www2.census.gov/geo/tiger/

All of this may be a major headache for anyone other than an experienced programmer, though.  However, I have not personally tried implementing a feature like this before, so perhaps it's easier than it looks ;)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I have really lucked out. Turns out the data I am using has a seperate table with a unique key that links lat's and long's.

Thanks for the help!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.