+ Reply to Thread
Results 1 to 5 of 5

Distance Between Two Locations

  1. #1
    Forum Contributor
    Join Date
    02-05-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    113

    Distance Between Two Locations

    I have 2000 building addresses throughout Toronto. I've created geographic areas and need to figure out how many buildings fit into each geographic area... I'm not exactly sure the best way to do this...

    One way is to figure out the equation for finding the distance between two points, given the latitude and longitude of both locations. For example: what
    is the formula one would use to find the distance between Building 1 (43.1556978 latitude, -79.2123856 longitude) and Building 2(43.6639513 latitude, 79.3836226 longitude.)?

    But i'm looking for a faster way to sort the buildings, but area...

    Any help/suggestions would be greatly appreciated!

    Thanks,
    Last edited by Zan03; 05-04-2010 at 02:41 PM.

  2. #2
    Registered User
    Join Date
    04-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Distance Between Two Locations

    Couldn't you just set up a grid of lat/long coordinates and determine which block the building is in? Simplified, but here is the thinking. You have a 4x4 grid, so 16 possible geographic blocks the buildings could be in. If a building's lat/long is "1,1", it is in the first block. Just determine the overall area you are trying to cover, and split up the 'map' into a grid that works for you.

  3. #3
    Forum Contributor
    Join Date
    02-25-2010
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Distance Between Two Locations

    The distance between two points formula is -

    = Sqrt ( (x2 - x1) ^ 2 + (y2 - y1) ^ 2)

    Edit: So the square root of (Lat 1 - Lat 2 sqaured plus Long 1 - Long 2 squared)
    Last edited by DP978; 05-04-2010 at 02:26 PM.

  4. #4
    Forum Contributor
    Join Date
    02-05-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: Distance Between Two Locations

    Perfect, thanks DP978!

  5. #5
    Forum Contributor
    Join Date
    02-05-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: Distance Between Two Locations

    Thank you hitchface for your feedback.. i've mapped them out in "blocks" but need to know the actual distance...

    Thanks again,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1