Comments on: How do I calculate distance from one location to many?
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many/
Comments on Ask MetaFilter post How do I calculate distance from one location to many?Thu, 29 Jan 2009 21:04:26 -0800Thu, 29 Jan 2009 21:04:26 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: How do I calculate distance from one location to many?
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many
How can I figure out the distance from multiple locations to one location? <br /><br /> I have a list of 200 locations and 1 starting point. I would like to know how far it is from each of the locations to the starting point with out entering each separately. The 200 points are in an excel sheet. I have google earth pro if that helps.post:ask.metafilter.com,2009:site.112943Thu, 29 Jan 2009 20:52:44 -0800jestonbGoogleEarthexcelmapBy: orthogonality
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many#1623027
If the Earth were flat (or if our distances are close enough that curvature makes negligible difference), the distance between two points is the square root of ( the square of (the points' difference in X) + the square of (the points' difference in Y ) ).<br>
<br>
Of course, this is the length of the straight line connecting the two points; it's "as the crow flies", not "as the crow drives".<br>
<br>
If you need to take curvature into account, there's are several formula using trigonometry. I've used one (in a database view, naturally), but I don't recall it. Ah: googling tells me you want the Haversine or Vincenty formulas.comment:ask.metafilter.com,2009:site.112943-1623027Thu, 29 Jan 2009 21:04:26 -0800orthogonalityBy: orthogonality
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many#1623028
Oh: in Excel, plug the formula in for the first of your 200 points, referring to the origin point using the Excel dollar-sign absolute reference syntax (and the first point using normal cell column-row syntax), then copy it down to the other 199.comment:ask.metafilter.com,2009:site.112943-1623028Thu, 29 Jan 2009 21:07:07 -0800orthogonalityBy: jestonb
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many#1623052
Sorry the locations are places (cities to be extact) and my starting points is an address.comment:ask.metafilter.com,2009:site.112943-1623052Thu, 29 Jan 2009 21:37:46 -0800jestonbBy: niles
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many#1623058
Use this <a href="http://www.batchgeocode.com/">web site</a>.<br>
<br>
1) Paste in excel file<br>
2) Check "Calculate (straight line) distance from first address in Mi/Km" option in step 4<br>
3) Enjoy the fruits of your labor*<br>
<br>
<small>*You may have to click an additional button or two.</small>comment:ask.metafilter.com,2009:site.112943-1623058Thu, 29 Jan 2009 21:50:28 -0800nilesBy: ChrisHartley
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many#1623103
I just found <a href="http://www.batchgeocode.com/">batchgeocode.com</a> yesterday and can attest to its awesomeness. That said, I've been finding that the yahoo maps geocoding api (which batchgeocode uses) is frequently up to a hundred feet off. Not a big deal when calculating distances between cities, but annoying when you're trying to see if 702 E. Main is a house or the parking lot next to it.comment:ask.metafilter.com,2009:site.112943-1623103Thu, 29 Jan 2009 22:38:32 -0800ChrisHartleyBy: niles
http://ask.metafilter.com/112943/How-do-I-calculate-distance-from-one-location-to-many#1623107
Yeah, that's true. I recently used it to get about 100 addresses placed on a KML file, and they were all off by about a house (so, 100-200 feet maybe?). However, if jestonb is just calculating from given cities to one address, she/he should be able to just punch in the coordinates for that address, and then just trust the location for the city. Google's API just grabs about the middle of the city, so I wouldn't care if it was off by a bit. But that's just me.comment:ask.metafilter.com,2009:site.112943-1623107Thu, 29 Jan 2009 22:48:05 -0800niles