This article explains how to load a track (a sequence of GPS location readings made while travelling) onto a map in MSST (Microsoft Streets & Trips 2005). These instructions are specifically for a Magellan GPS.
MSST cannot understand the Magellan data (which is in PMGNTRK format). So I've written a program to convert it to something that it can understand. To download the file, right-click the icon and select "Save As"
| |
| 03/25/2005 Version 1.1 Released |
When you run the MAG2CSV program, it will ask you for three pieces of information. First, it needs to know the file name of the Magellan track that needs to be converted. Second, it needs to know the file name of the file you want to create. The file you'll create is the one imported into MSST as a "crumbtrail" of push pins. And, third, MAG2CSV needs to know the offset for your time zone in relation to the UTC time zone (aka GMT).
If you don't care, you can ignore the setting in the third piece. The offset is used to name each "crumb" in the crumbtrail of your track (see 172605 in the example map above). Each crumb is named for the time you were at that location. So the dot named "172604" means I was at that spot at 17:26:04. The time is in military format (in other word it was 5:26 PM). Actually, the GPS said I was there at 10:26PM because the GPS uses UTC time (aka GMT). So that's why you specify an offset: to convert UTC to your particular time zone. Since I live in the Eastern Time Zone (five hours after GMT), I must specify an offset of -5. Those in the Central time zone would use -6, Pacific -8, etc.
For the adventerous, you can automate these three pieces of information. There are two methods that can be used: command line parameters or via an INI file. You can actually use both methods simultaneously. Command line parameters take precedence over values from the INI file. MAG2CSV will prompt you for any missing items if they cannot be found in the INI file or on the command line. Below is an example of the command line method where all three pieces are specified (you can specify as many or as few pieces as you want).
|
|
In this example, the track file from the Magellan GPS is C:\MyTrack.txt and the MAG2CSV will create the file named C:\MyHike.csv. It's good practice to always use .CSV as the extension of any file you create with MAG2CSV. The TZ= parameter tells MAG2CSV to convert the UTC to the EST time zone by subtracting five hours. If you use the command line method, be sure that no spaces exist on either side of the equal signs. Also, if a file names contains spaces, enclose the entire path in double quotes (e.g., OUT="C:\My Hike on Saturday.csv")
An INI file can be used to accomplish the same functions as the command line. Below is an example MAG2CSV.INI file that performs the same conversion as our previous example. If you use the INI file method, be sure that no spaces exist on either side of the equal signs. Also, if a file names contains spaces, enclose the entire path in double quotes (e.g., OUT="C:\My Hike on Saturday.csv") You'll notice that the entries have the same name and rules as the command line parameters. Below is an example of the INI file method where all three pieces are specified (you can specify as many or as few pieces as you want).
|
[MAIN] IN=C:\MyTrack.txt OUT=C:\MyHike.csv TZ=-5 |
If you use the INI file method, the INI file must be named MAG2CSV.INI and it must must be a plain text file (you can use NOTEPAD to create it). Put the MAG2CSV.INI file in the same directory as the MAG2CSV.EXE program or in your Windows directory.
Once you've created your CSV file, you're ready to import it into MSST. To import pushpins, in MSST, press Ctrl-I or select /Data /Import Data Wizard. The "Import Data Wizard" file open dialog will appear. Navigate to the pushpin data file that you just created, and double-click its file name.
Once we've selected the CSV file in MSST we're asked to "Choose the separator character." Since "Comma" is already selected as the default, we can simply click the NEXT button. Then, the Import Data Wizard shows how it will interpret the CSV file. Since the "first row contains column headings" in our data files, we don't have to change anything. Simply click the FINISH button to import the data.
Once you've imported the data you may want to change the graphic that is used to represent the push pins. To choose a different icon as our pushpin graphic, look in the "Legend and Overview" pane on the left. There is a "Pushpins" section that should have an entry labeled the same as your CSV file. Right-click that entry and select Properties. This will display a dialog. On the "General" tab you'll see a drop down for "Symbol." Click the drop down arrow. You can select a built-in pushpin graphic or you can import a custom graphic.
For our example we want to use a custom graphic, so we'll click on the big button "Import Custom Symbol" that is at the top. An "Open" dialog will appear. Navigate to the directory containing the BMP file and select the desired graphic. After it is imported, click the icon so it is selected. You'll be returned to the dialog. Click the OK button and all the pushpins will be changed to the selected icon. You may wish to save your map for future reference.
There are several custom pushpin graphics in the ZIP file above. You can also create your own "crumbtrail" graphic. Graphic files used for MSST pushpins must be in the BMP file format. You can create them (or modify mine) using Microsoft Paint that is included with Windows. They are 24-bit color depth and 16x16 pixels in size, which is the standard pushpin dimensions, but larger icons can be created if desired. I find it easiest to work with these icons in MSPaint when zoomed to 800% (/View /Zoom /Custom /800%).
A neat trick that I stumbled upon accidentally is transparency. Normally, the BMP file type does not support transparency, but MSST will do the work for us. Whatever color pixel it finds in the upper left corner will be considered the transparency color. Normally that's white, but sometimes I want white to be part of my icon and not to turn transparent. So, I pick a wild color that's not part of the image and use it for background fill. Here's the icon for TINYCROSS.BMP enlarged and showing how I used yellow to indicate transparent areas.