Show/Hide Toolbars

Ultra Mileage

Navigation: Examples: MileCharter

Example: Finding Distances Between Cities

Scroll Prev Top Next More

This tutorial shows you how to download road data, and how to use it with Ultra MileCharter to create the following table between a group of cities in Texas and a group of cities in Louisiana:

 

ex_txla_result_d

 

The example uses the Contiguous USA road pack which requires 16GB of RAM to run.

 

The source data file used in this demonstration is called TXLA.xlsx and consists of two worksheets: Texas Cities and Louisiana Cities. It can be found in the MileCharter examples file:

 

https://www.ultra-mileage.com/downloads/examples_ultra.zip

 

This is what the Texas worksheet looks like:

 

ex_txla_tx

 

And here is the Louisiana worksheet:

 

ex_txla_la

 

These worksheets are based on an earlier MapPoint example, hence they have additional 'pushpin' columns. These will be ignored. We only need the longitude, latitude, and name columns.

 

If you have not yet downloaded any road data, start the Ultra Download Manager. If this is the first time you have run it, you will be presented with the Folders for Ultra Road Data dialog box. See Setting the Default Directories for instructions on setting these directories for the road data.

 

The main list will also be empty if this is the first time you have run it. Press Update Catalog to update (download) the road pack catalog. Ultra Download Manager will now look something like this:

 

ex_download

 

The check-box on each 'folder' represents that country's OpenStreetMap (PBF) road file. Open it up and you will see the available road packs (pre-processed road networks) for that country. Open up USA-Contig and you will see USA- Contiguous - Fastest, and USA; Contiguous - Shortest. For this example, check USA; contiguous - Fastest and press Start to start the download. These files are a few GB in size and will take some time to download. A download progress dialog box will display the current download status:

 

ex_download_progress

 

After the files have been downloaded, start Ultra MileCharter. You will need to set it to look like this:

 

ex_txla_mainpanel

 

Set the road network to use the usa-fastest.umg file that you downloaded by pressing the "..." button in the Road Data box. Set the Route Calculation Options to create Distances and Times. Set the Output Options to output to Excel. Clear the Only report the shortest/quickest routes checkbox. We will use the QC box is used later, after processing.

 

Next set the input locations. Ultra MileCharter can read data from a text file (e.g. CSV), an Excel workbook, or a Maptitude MAP. Select Excel and press the Change button to display the Input Locations dialog box:

 

ex_txla_inputlocs

 

Select the input workbook, and then select the Source Worksheet and the Destination Worksheet. Here we produce routes that start with the Texas cities and finish with the Louisiana cities. These worksheets use the first row for column headers, so make sure the First Row Contains Column Headers check-boxes are set. Also make sure the longitude, latitude, and name columns are set correctly for both groups of locations. For this example, the PushpinName column could have been used instead of Name. The name column is used as an identifier and is written to the output chart, so it should  be unique. Coordinates must be decimal longitude,latitude coordinates using the WGS84 geoid. Press OK to return back to Ultra MileCharter's main panel.

 

Once everything has been set, press Start to start processing. Normally it takes a second or two for Ultra MileCharter to load the road data for the first time, but the Contiguous USA data is so large that this might take closer to a minute.

 

Here is the resulting Distance worksheet:

 

ex_txla_result_d

 

The start locations are down the left-hand side, and the end locations are along the top.  Note top left corner cell. This indicates the route type (fastest or shortest) and distance units used. This is a new feature in the Ultra version of MileCharter.

 

How do we know if these routes can be trusted?  This is where the QC box is used. The QC (or Quality Control) feature lets you visually example a route on a map. Three QC methods are available: KML, OSM MapControl, and Maptitude. KML lets you copy multiple routes to one KML file. These files are good for map annotation and can be displayed in a map visualization tool such as Google Earth. The Maptitude option requires Caliper Maptitude to be installed, and uses Maptitude to create a map image that is displayed in the Route QC dialog box. Finally, OSM MapControl displays an interactive map with a route, using OpenStreetMap imagery. This requires an active Internet connection.

 

We will use the OSM MapControl.  Select this and press the QC button to display the Route QC dialog box. Next select the desired source and destination locations, and press Show>>>. Here we have selected Abilene and Shreveport:

 

ex_txla_qc

 

For simple variations on these charts, you can change the distance and time units. You could also choose the same group for the source and destination locations. This would result in a 'square' chart, but you can change the Duplicates setting to create a triangular table as used in road atlases.

 

The next example demonstrates the use of the Find Closest functionality to limit the results to only the closest destinations within specific constraints.