MPCluster typically calculates distances as 'straight lines', i.e. great circle distances. This is usually the only practical way of calculating distances due to the large number of calculations required. However MPCluster's Hierarchical Algorithm does have the option to use an external distance table when it is set to use Median centers. Median cluster centers are chosen from the input data points, therefore there is only a limited number of start/end points, and an external table that lists all of the distances, becomes practical. This allows more sophisticated 'distances' such as route distances, travel times, or costs to be used.
The table can be provided as a text file, or as an Excel worksheet. The table is arranged as a conventional table with the locations listed down the left side and along the top. Locations are identified with a unique name or identifier field from the Maptitude input dataset. This is typically the Maptitude ID, but it does not have to be. A fully populated rectangular table will list every location pair twice. MPCluster will use the first distance that it finds, and it will use this for both directions, i.e. A»B = B»A. A triangular-shaped table without duplicate distances can also be used.
Here is an example distance table in Excel:
Setting the External Table Options
In order to specify an external table, you must first set MPCluster to use the Hierarchical algorithm and set cluster centers to Median. This will enable the options in the Distances box. Set the Use an External Table dialog box. Select the Dataset Name Field. This is the field that will be used to identify the data points in the external table.
Next press the Set External Table button to display the External Table dialog box. This is what it looks like when it is set to use an Excel worksheet:
Select the Type of distance table. This can be an Excel Worksheet (see above) or a Text File. Next, select the input file by pressing the "..." button below the Selected distance table file. For an Excel worksheet, you will select an Excel workbook file. MPCluster will then attempt to open the workbook, and the Worksheet list will then be filled with a list of the available worksheets. Select the worksheet that has the table you want to use. Note that MileCharter can produce multiple worksheets in the same workbook, so you could select driving distance, driving time, or estimated costs.
If you select Text File, the dialog box will look like this:
You should still select the input text file. Next, select the Field Separator. This separator is used in the text file to separate the individual values. You can select Comma (i.e. a standard CSV file), Semicolon, or Tab. Note that text files must use numeric values. Formatted times (e.g. "3:45") and currency units (e.g. "$3.45") are not accepted.
After specifying the external table, note that the distance parameters on the main panel are now specified in "table units" and not Maptitude's current distance units. Therefore, you may need to re-specify the cluster radii, diameters, and separations.
MPCluster currently has a maximum limit of 60,000,000 distance values in an external distance table.
Notes regarding table formats
MPCluster is designed to work with tables created by MileCharter, and it will work with tables produced by both the MapPoint and Maptitude versions. MPCluster will ignore the Longitude and Latitude columns/rows, if they are present.
Note that Excel stores "hours:minutes" formatted travel times as days and not hours. Therefore the various MPCluster distance parameters (i.e. cluster radii, diameters, and separations) have to be specified in days and not hours.
For text files, only simple numeric values are usable - i.e. you cannot used a time or date formatted value, or a value that includes a currency symbol.