CDXZipStream supports a variety of distance formulas including CDXDistance, CDXRouteMP and CDXDistance2WP.  Each is optimized for different situations and involves varying times to calculate.

CDXDistance is used to calculate straight-line distance between zip codes.  You simply reference two zip codes and the CDXDistance formula returns the distance in either miles or kilometers.  The custom formula calls our custom database to return latitude and longitude for the zip code, and the distance calculation is performed based on this data.  It is relatively fast and should be used where the central location of a zip code can be used to approximate distance between locations.

If you need driving distance or time you will need to use either CDXRouteBing, which uses Bing Maps as the source of mapping data, or CDXRouteMP, which works in conjunction with the desktop version of Microsoft MapPoint.  The calculation times for this are relatively slower at about 1 second per route, with more complex routes taking more time.  If you are going to make thousands of calculations you should dedicate your PC to this during off hours or run this on a separate machine.  For long lists of data we recommend using our free driving distance template that can be downloaded from our website here.  Please view the video below to see how it works:

or watch the YouTube version here: Driving Distance and Time Calculations in an Excel Template

The fastest calculation is CDXDistance2WP, which uses latitude/longitude pairs to perform straight line distance calculation. You can geocode a list of addresses and then use this function to calculate exact distances.  We recommend this when trying to analyze long address lists.

A typical task may require calculating driving time or distance for a large matrix of addresses or zip codes.  For instance, it may be necessary to determine which customers in a list of thousands are within a one hour driving time of multiple store locations.  The best way to handle this is a two-step process.  First, we can get the latitude and longitude of each customer address and use CDXDistance2WP to calculate the straight-line distance from each store.  Then we can filter this list for customers that are within 100 miles of each store, and use CDXRouteBing or CDXRouteMP to get the exact driving time for this smaller list.  Using a combination of distance calculations in this case allows for fairly fast analysis of very large data sets, without sacrificing accuracy.