Distance Table Computer

Welcome! This document describes how to install and use Distance Table Computer.

What does this software do?

Here's the basic idea: suppose that you are a vice president at General Motors (GM). You have 1000 auto dealers around the United States, and 50 auto parts distributors for those dealers. You need to know:

The idea of Distance Table Computer is to create distance tables, which are pivot table-like displays of which addresses in File A are closest to which addresses in File B. It allows you to see a table of driving times and distances between all addresses. The end result looks something like this:

The result is an Excel spreadsheet. Addresses that could not be located by Google Maps are marked in red. These addresses are fictional. You can download the two input Excel files, and the final result, from here. The inputs to Distance Table Computer MUST be correctly-formatted Excel (.xls) files, not CSV files and not tab-delimited files, although later versions of DTC may support those, too.

Installation

The installation is quite simple, but before you upload the files to your server, you'll need to generate a Google Maps API key. Here's how:

First, go to: http://www.google.com/apis/maps/ and get a new API key. You should see this:

On this page, you will input the full URL to the location where you plan to install Distance Table Computer. I installed the software at http://www.absolutelyhonest.com/demo/distance/ so that is what I inputted. When you click "Generate API Key" you will see something like this:

Now, open the config.php file, which comes with Distance Table Computer. I recommend using a good text editor, like Textpad. Change the $googleKey value to match the API key that you generated in the previous step.

Please be careful not to introduce any PHP syntax errors! Also, be sure that your key is enclosed in double quotes, as shown below.

Now, upload the software to a directory on your server. Of course, the URL must match the URL that you inputted to get the Google API key. Using your FTP software, chmod the "temp" folder to a writable setting, like 777.

The software is now installed. When you access the directory URL with your web browser, you should see the main Distance Table Computer interface, like the TUFaT.com demo interface.

Using the software

First, you have to keep in mind that this software requires that your input files be Excel (.xls) files. Only Excel 97 and Excel 2000 files have been tested with DTC, although all versions of Excel should (in theory) work just as well. The top-most panel is the Output panel. In this panel you specify how you want the output Excel file to look. For most users, you should leave the default options.

After uploading your starting address file, and destination address file, you will need to map the fields in the Excel file to letters. This is how the system knows which fields to use for which address parts. This step is vital; the system will generate incorrect results if the field mapping is not correct.

These fields, like "Limit drive time to" and "Columnar" vs. "Tabular" refer to the final Excel file. These options do NOT speed the computation process. Why? Well, for the system to know whether route A exceeds X hours, for example, it actually has to compute it first. If I limit the drive time to 10 hours with my sample Excel files, the resulting Excel spreadsheet looks like this:

The result is that routes exceeding 10 hours are simply not displayed in the Excel output.

During computation, you can visually see which routes are being computed, where they lie on the map of the United States, and the time elapsed / time remaining. These time estimates are very rough, however.

When the computation process is completed, a new link will appear with a direct download to the Excel file result, as shown below.

Special thanks to Vladimir Lebedko for his coding assistance, and to Andy Cheung for his design and testing assistance of this software.

Are you looking for the old MapPoint MatchMaker? If yes, please e-mail Darren directly for a copy. The MapPoint version of this software works only with MapPoint 2004, so it's a bit out of date. I recommend sticking with this new Google Maps version, since it will always stay current.

Good luck!
Darren