-
January 21st, 2011, 02:25 PM
#1
Finding distance between two cities
I want to be able to get a rough distance estimate between two cities as well as finding out all the cities that are X miles within a certain city.
I have a rough idea of how to do it using zip codes using the data from the Census Bureau, however I'm not sure how I would do this with cities.
Is there a free database somewhere that has the city, state along with the zip code near the middle of the city?
-
January 21st, 2011, 03:44 PM
#2
Re: Finding distance between two cities
Bing, and Google have MAPS that will do what you want. Depends, on, a specific route, or just as-the-crow-flies.
-
February 6th, 2011, 01:51 AM
#3
Re: Finding distance between two cities
The data available from the US Geological Survey (USGS) may be of interest: http://geonames.usgs.gov/domestic/download_data.htm Cities seem to be generically refered to as "Populated Place" features.
For locales outside of the US, you might use the information from the National Geospatial Intelligence Agency available at: http://earth-info.nga.mil/gns/html/cntry_files.html
The datafiles for the USGS (I didn't look at the NGIA ones) contain a long/lat for each feature. Presumably you could implement distance measures based on those (which I sure are described elsewhere; distance along a sphere is a solved problem - though if memory serves, last time I looked into it, I decided it was a bit of a complicated pain in the ***...)
I hope that helps!
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|