It's been too expensive for me to keep GSAK, MSST, and a GroundSpeak Premium account up-to-date so I'm not able to re-write the pushpins program to keep it compatible with all the latest versions. I don't think MSST 2007 will be an issue, but if you have GSAK version 7 or later it might be a problem. There are some options, however. Roland Schabram did some customization for his GSAK 7 setup, and you might find his version compatible (see Version RS below). Another option is that I've posted the source code under creative commons license in case you wanted to tweak the program to your particular situation. You could even rewrite it for a different compiler (e.g., AutoHotKey instead of WinBatch). If you haven't upgraded GSAK, then any issue you may experience may be a timing issue on your computer. If you simply need to tweak the timings for your computer, edit the PushPins.INI file using notepad. The INI file will have comments to guide you through the process.
EXPORT TYPE=SNT SETTINGS=PushPins FILE=C:\GPS\PushPins\Event.csv
MSST (Microsoft Streets & Trips 2005 or, in Europe, AutoRoute 2005) is inexpenisve and can be found for about $25 at Wal-Mart or Sam's Warehouse. It is an excellent geocaching tool since it can create turn-by-turn route plans, show latitude and longitude for locations, and create pushpins using custom graphics. These custom maps show not only the location of a cache, but its type, making caching trips easier to plan. This article shows how I use GSAK to export the necessary data files, and then import them into MSST. Below is an example map.
There is some one-time setup. Since my macros assume certain file locations, you'll need to modify any macros if you choose to store files in different subdirectories than what I use. The macros used by GSAK are simple text files that can be created or modified using the NOTEPAD program that comes with all MS Windows computers.
When creating staging directories, I find it useful to name them without any spaces. Some programs are confused by the spaces so I play it safe and keep the names short and simple. For the pushpin process we need several directories:
The GSAK macros can be placed anywhere, and I'm using C:\GPS\GSAKmacros\ for a special reason. I wanted a directory path that didn't contain any spaces since I have other programs I use for automation and the embedded spaces in file and directory names causes them grief. For automated pushpin creation, that's not an issue, but I wanted to explain why I didn't follow GSAK's recommendation. The GSAK help file states "It is recommended that you save all your macros in the 'Macro' folder of your install folder of GSAK. Saving them here ensures they are backed up and restored when using the GSAK backup and restore features." (e.g., C:\Program Files\GSAK\macros\)
Next, we need the graphics that we're going to use as pushpins. If you'd like to use the ones I'm using, then right-click the icon below and select "Save As." Then save the individual graphics (*.BMP files) in the icon directory (C:\GPS\Pushpins\icons\ in my scenario)
| |
The icons included in the ZIP file above are shown below, and are for TerraCaching.com caches, Archived caches, Benchmarks, CITO events, DNF (did not find), Earth caches, Event caches, Found caches, Home base, Letterbox hybrid caches, Locationless, Micro caches, Offset or Multi-caches, Mystery and Unknown type caches, Traditional cache of type "other," Large traditional cache, Regular traditional cache, Small traditional cache, Virtual cache, and Web Cam caches. The red circle with a cross is a generic pushpins that I use for "bases of operation" (work, parking lots, hotel during business travel, etc.) and the final icons are for crumbtrail tracks and generic waypoints (e.g., like actual/corrected coordinates for multi/offset caches, trailheads, trail intersections, etc.).
Icons 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. The size is important because PushPins expects 8 icons on each row in the icon selector dialog. But larger or smaller icons can be created if you do manual icon selections. 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 Micro Caches enlarged and showing how I used the bright cyan to indicate transparent areas since I wanted the cap to remain white.
04.11.2005 On the Microsoft MapPoint web site, one of the downloads is the "MapPoint PushPins" which also correspond to the MSST pushpin graphics. This file has each of the delivered icons in individual BMP files. So you can copy/rename them or edit/tweak them and then use them as custom graphics for caches. The link to the download is: http://www.msdn.microsoft.com/mappoint/mappointintro/mappointdownloads/default.aspx
Next, we need to create filters for each type of cache that we want to have a distinct pushpin graphic. These filters will be named "Benchmark", "CITO", "Earth", "Event", "LetterBox", "Multi", "Mystery", "Other", "TraditionalSmall", "TraditionalRegular", "TraditionalLarge", "TraditionalOther", "Virtual", "WebCam", "Micros", "TerraCaches" (via User Data), "Found", "All DNF", and "Archived" I will show you how to create the "TraditionalLarge" filter and the rest should be easy to figure out. You can adjust the filtering to meet your preferences. The main point is that you need a filter for every pushpin type you want on your MSST map. That way you can call the named filter and export the pushpin data automatically.
To create a filter, press Ctrl-F or select /Search /Filter. When you change a default setting you'll see that your criteria are highlighted in yellow. Also, each tab in the dialog is red if there's a filter in effect on that tab. In this screen shot you can see that I'm on the "Other" tab which contains filtering controls for type and size. Only the "Traditional" cache type is selected, and for container size only "Large" is selected.
Next, I only want active caches to be included. So I uncheck the boxes for archived or temporarily unavailable so they will be filtered out. These caches will be in the "Archived" data set instead. Normally, you do not want data sets to overlap, but sometimes you do. For example, the "Found" and "DNF" data sets overlap the other datasets and that's the way I want it. After making all the changes I click the SAVE button and give the filter the name "TraditionalLarge" (the "Select a saved filter" at the top of the dialog shows that name). I can click the GO button to apply the filter and verify that I'm getting the results I want. I can always go back and change the filter and re-save it if needed.
Extract the files in this ZIP file to your C:\GPS\PushPins\ directory. It contains two batch files that will be called by the GSAK export macro (see below for details of their contents). And it also contains the PUSHPINS.EXE file that performs the pushpins import, and PUSHPINS.INI which is a sample configuration file that can control the behavior of the PUSHPINS program.
| |
After the files are in place create a shortcut to the PUSHPIN.EXE program
For the adventerous, you can customize how PUSHPIN behaves. 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. PUSHPINS 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 several pieces are specified (you can specify as many or as few pieces as you want).
|
|
In this example, the PUSHPINS program will load the datafiles listed in the file indicated by LIST= and the ICONS=3 setting tells PUSHPINS that there are already three custom pushpin icons in the map that's being loaded.
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., LIST="C:\My Stuff\List of Pushpin Files.txt")
An INI file can be used to accomplish the same functions as the command line. An example PUSHPIN.INI file is included and you can edit to match your needs. 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., LIST="C:\My Stuff\List of Pushpin Files.txt") You'll notice that the entries have the same name and rules as the command line parameters. Below is an abbreviated configuration file that performs the same import as the command line example as above. See the sample INI file's comments for a list of all the customizeable features of the PUSHPINS program.
|
[MAIN] LIST=C:\GPS\PushPins\PushPinList.txt ICONS=3 |
If you use the INI file method, the INI file must be named PUSHPINS.INI and it must must be a plain text file (you can use NOTEPAD to create or edit it). Put the PUSHPINS.INI file in the same directory as the PUSHPINS.EXE program or in your Windows directory.
Now we're ready to create a GSAK macro that will call our filters, and create the pushpin data files. You can use my GSAK macro if you'd like by right-clicking the icon below and selecting "Save As" To duplicate my environment you'd save this text file as C:\GPS\GSAKmacros\PushPins.txt but it can really be anywhere. The GSAK help file states "It is recommended that you save all your macros in the 'Macro' folder of your install folder of GSAK. Saving them here ensures they are backed up and restored when using the GSAK backup and restore features." (e.g., C:\Program Files\GSAK\macros\)
| |
If you're mimicking my environment, you don't have to read the following paragraphs of this section! I'm going to give a little bit of the technical details in case you want to modify my macro or if you want to understand what it's doing.
GSAK macros are text files that can be edited using the Notepad program that is included with Windows. Below is an abridged version of the macro. It shows only one data set being exported (benchmarks) and I will walk you through an explanation of each command. The numbers on the left are NOT part of the macro, but allow me to reference each statement.
|
1. 2. 3. 4. 5. 6. 7. 8. |
RUNPGM pgm="C:\GPS\PushPins\PushPinListReset.bat" CANCELFILTER FILTER name="Benchmark" IF $_FILTERCOUNT > 0 EXPORT TYPE=SNT FILE=C:\GPS\PushPins\Benchmark.csv RUNPGM pgm="C:\GPS\PushPins\PushPinListBuild.bat" parms=Benchmar,YYYNYYYY WAIT=YES ENDIF CANCELFILTER |
LINE 1: For the automated import of MSST pushpins, the import program requires a control file. This control file tells the import program what data files are to be imported, where the data files are located, and what graphic to use as the pushpin icon. This control file is C:\GPS\PushPins\PushPinList.txt and it is dynamically created by the GSAK export macro. Why is it dynamically created? Some filters may return zero records, and we don't want to import an empty pushpin data set. Therefore, we only put an entry into our control file if there were records that met the criteria of our filter. Below is an example control file. Any blank lines or lines beginning with a # will be ignored. Each line in the control file has two parts. First, there is the fully qualified (drive, path, and file name) data file that is to be imported. A semicolon is used to separate the first and second parts. The second part is the fully qualified graphic file that is to be used for the pushpin icon. You will notice in the example that none of the files contain an embedded space. Embedded spaces can confuse some programs, so it's best to avoid them. Spaces on either side of the semicolon will be ignored.
|
# My Push Pins C:\GPS\PushPins\House.csv ; C:\GPS\PushPins\icons\House ; C:\GPS\PushPins\Work.csv ; C:\GPS\PushPins\icons\Work ; C:\GPS\PushPins\Benchmark.csv ; C:\GPS\PushPins\icons\Benchmark ; YYYNYYYY C:\GPS\PushPins\CITO.csv ; C:\GPS\PushPins\icons\CITO ; YYYNYYYY C:\GPS\PushPins\Earth.csv ; C:\GPS\PushPins\icons\Earth ; YYYNYYYY C:\GPS\PushPins\Event.csv ; C:\GPS\PushPins\icons\Event ; YYYNYYYY C:\GPS\PushPins\LetterBox.csv ; C:\GPS\PushPins\icons\LetterBox ; YYYNYYYY C:\GPS\PushPins\Multi.csv ; C:\GPS\PushPins\icons\Multi ; YYYNYYYY C:\GPS\PushPins\Mystery.csv ; C:\GPS\PushPins\icons\Mystery ; YYYNYYYY C:\GPS\PushPins\TraditionalSmall.csv ; C:\GPS\PushPins\icons\TraditionalSmall ; YYYNYYYY C:\GPS\PushPins\TraditionalRegular.csv ; C:\GPS\PushPins\icons\TraditionalRegular ; YYYNYYYY C:\GPS\PushPins\TraditionalLarge.csv ; C:\GPS\PushPins\icons\TraditionalLarge ; YYYNYYYY C:\GPS\PushPins\TraditionalOther.csv ; C:\GPS\PushPins\icons\TraditionalOther ; YYYNYYYY C:\GPS\PushPins\Virtual.csv ; C:\GPS\PushPins\icons\Virtual ; YYYNYYYY C:\GPS\PushPins\WebCam.csv ; C:\GPS\PushPins\icons\WebCam ; YYYNYYYY C:\GPS\PushPins\Micros.csv ; C:\GPS\PushPins\icons\Micros ; YYYNYYYY C:\GPS\PushPins\Found.csv ; C:\GPS\PushPins\icons\Found ; YYYNYYYY C:\GPS\PushPins\DNF.csv ; C:\GPS\PushPins\icons\DNF ; YYYNYYYY C:\GPS\PushPins\Archived.csv ; C:\GPS\PushPins\icons\Archived ; YYYNYYYY |
So, the GSAK macro begins by recreating the control file. It basically erases any old control file and starts a new one. Since GSAK doesn't have the capability to do this directly, we use the batch file PushPinListReset.bat to do the work. The batch file C:\GPS\PushPins\PushPinListReset.bat contains these commands:
|
ECHO # My Push Pins > C:\GPS\PushPins\PushPinList.txt CALL C:\GPS\PushPins\PushPinListBuild.bat House CALL C:\GPS\PushPins\PushPinListBuild.bat Work |
Notice the second and third lines. You may have some special pushpins that aren't caches in your GSAK database. In my setup, my house and place of employment are two such locations. I want them on my map so that I can plan a quick cache run after work or plot a route from my home. These data files are created by hand. I used Notepad to create the CSV files (an example is shown below for HOUSE.CSV). The first line should remain unchanged. It tells MSST what data fields are being imported. The second and following lines have the actual details with one pushpin location per line. Coordinates are WG84 datum in the DDD.dddd format (with negative numbers for western hemisphere longitudes or southern hemisphere latitudes)
|
Name,Latitude,Longitude HOME,34.123456,-85.123456 MOTHER-IN-LAW,35.123456,-85.234567 |
LINE 2: Lines 2 through 7, with slight modifications, are repeated for each pushpin type we want to export. Line 2 simply cancels any filters that may be in effect.
LINE 3: Apply the filter named "Benchmark" (that was created in the preparatory step above). If none of records in our GSAK database pass the filter, then processing skips to the nearest ENDFILTER command (line 6). This way, we don't create an empty pushpin data set or a control file entry, which would confuse the MSST import! A filter may contain embedded spaces, so I always enclose the filter name in double quotes.
SEQUENCE IS IMPORTANT: Lines 2 through 7 are repeated, with slight modifications, for each pushpin type we want to export. The order in which these types are listed in the GSAK macro determines in what order they will appears in the control file that is created. The order in which the data files are listed in the control file determines the order in which they will be imported into MSST. The order in which data files are imported into MSST determines how push pins overlap. If you have a dataset that overlaps, the last dataset will be on top. Below is a closeup of a pushpin map that shows what I mean:
There are three pushpins in this screen shot. Two "found it" icons, and one DNF (did not find) icon. I've clicked the smiley (found) on the far left and MSST shows me that there are actually two push pins stacked on top of each other. The names associated with these pushpins are identical, so I know that there is a data set overlap and not simply two different caches that are really close together. You can see from the "Select a Place" dialog that the cache type is a micro. It's below the "found" icons because my GSAK export macro created the MICROS.CSV file before it created the FOUND.CSV data set.
Also note the frowny in the upper left of the screen shot. If I were to click this pushpin, the "Select a Place" dialog would show that there are THREE pushpins stacked. The first is for the cache type (micro), the next is for the DNF status, and the last shows the "archived" status (the red circle with a slash). These overlaps are by design, and I have purposely placed the DNF export near the end of my GSAK macro, while the Archived export follows that in the macro. This in essence tells a story: Someone placed a micro cache, I searched for it, but I didn't find it. I didn't find it, because it'd just recently been archived.
LINES 4 and 7: If no caches meet our criteria, then we do not want to confuse the PushPin program by importing an empty file. This line causes processing to skip to the nearest ENDIF statement and continue processing if the filter returns an empty data set (line 7 in our example).
LINE 5: If the filter successfully identifies a subset of our GSAK database, we export that subset as a MSST type file (TYPE=SNT). MSST can import CSV files (comma or tab separated values). We will put all the CSV files in the G:\GPS\PushPins\ directory. The CSV file will have the SAME name as the pushpin graphic, and that name will not contain any embedded spaces. Therefore for the "Benchmark" filter we will create a file named Benchmark.CSV that will use a graphic called Benchmark.BMP
Optional Settings for Advanced Users
Not shown (and not used in the example file for download) is the optional SETTINGS parameter. When creating an export you can control aspects
(e.g., the Waypoint name or Description format) of the export and save these to a name. Personally, I created and saved an export setting named PushPins.
That setting uses the following special tags for waypoint names: %drop2_%typ1%con1_%dif1a/%ter1a %notGC %code
See the GSAK help file for the different "Special Tags" available. Here is what all those funky codes in my settings do: If the waypoint doesn't begin with "GC" [%notGC] then I want the waypoint code to remain unmodified [%code]. Otherwise, drop the first two characters [%drop2] of the the waypoint (all caches from Geocaching.com begin with "GC" which isn't informative). Next append an underscore character for readability ("_" is not a special tag) then a one-letter code for the cache type [%typ1] then a one-leter code for the type of container [%con1], then another underline for readability. Then a one-letter code for mental dfficulty [%dif1a] a slash and then a one-letter code for difficulty of terrain [%ter1a]. So a waypoint named 9999_BR_A/D is GC9999, Letterbox type, Regular size, 1.5 mental difficulty, and 4.5 terrain difficulty.
LINE 6: Note that the filter can be named anything: it is the data file and pushpin icon that need to have the same name. That name is passed in the "parms=" part of the macro. The name given in parms= is used by PushPinListBuild.bat to create a line in our control file. Below are the contents of C:\GPS\PushPinListBuild.bat and you can see why it is important that all the staging directories are consistent and that data files and icons have the same name.
| ECHO C:\GPS\PushPins\%1.csv;C:\GPS\PushPins\icons\%1.bmp;%2 >> C:\GPS\PushPins\PushPinList.txt |
Also note the "YYYNYYYY" in the PARMS= entry. This controls which balloon fields will be displayed (right-click a pushpin and select "Show Information". There is one Y or N for every possible balloon field. A "Y" means "yes, it will be displayed" while an "N" means "no, it will be hidden." Most people will use the settings I show below (which displays everything except the meaningless and space hogging URL). The data exported by GSAK includes these fields (in this order): Name (of cahe), Latitude, Longitude, Description, URL, Type, Container, Diff (difficulty), and Terr (terrain)
| RUNPGM pgm="C:\GPS\PushPins\PushPinListBuild.bat" parms=Benchmar,YYYNYYYY WAIT=YES |
The WAIT=YES tells GSAK that it must wait until each pushpin data set is built before starting the next.
LINE 7: See notes for line 4
LINE 8: Cancel any filters. The end.
|
IMPORTANT: You can always import the data manually. See Create a Pushpin Map Manually for instructions. DISCLAIMER: MSST does not natively support any macros or automation tools, so we have to trick MSST into cooperating. Therefore, I've used WinBatch to automate the keystrokes that would normally be pressed if this were being done manually. Consequently, every now and then, MSST will not "hear" the first few keystrokes. Then the sequence of key presses will not be synchronized and the wrong icons get assigned to the data sets. This is not harmful, just messy and not the results we want. Another scenarios, that's more unpleasant, is if you have a program pop-up to the top and become the active window. That window/program will now be receiving all the computer keystrokes! Once I had this happen and the keystrokes got interpreted as a request to shut down and turn off the computer! No damage was done, but make sure you're not running other programs or services that might cause havoc if they were to pop-up as the top active window! If you see the keystrokes get unsynchronized or going to the wrong window, you can abort the import process and start over. To terminate an import gone awry, right-click the "WBT PushPins.EXE" icon in your status bar and select "Terminate" and then click the OK button in the dialog that pops up. Once the WinBatch program has terminated go to MSST and select /File /New /New North American Map. When asked "Save changes to Map?" click the NO button. This will delete all the bad pushpin data and you're ready to try again with a fresh, empty map. Sometimes the brain dead MSST may take two tries to get started on the right foot. It only seems to happen at the beginning, and once it starts off correctly, it should finish okay. I've also noticed that pulling in a smaller data set at the beginning, rather than a huge one, also helps. This is controlled first by PushPinListReset.bat (for static data sets) and your GSAK export macro.
|
To begin the import, first start MSST with a fresh blank map (i.e., no custom push pins imported). My process isn't designed to update an existing map, but recreate a new one each time. You certainly could import into an existing map, as long as you're okay with any duplication that might result. Once MSST is running make sure the "Legend and Overview" pane is opened. If not, press Ctrl-G or select /View /Legend and Overview. In the "Legend and Overview" pane click the "Populated Places" entry so that it is highlighted.
Now run the batch file C:\GPS\PushPins\ImportPushPins.bat (or a shortcut to C:\GPS\PushPins\PushPins.exe) to start the import process. Do not touch the keyboard or mouse while the import is running, or it could mess up the import. See the "disclaimer" above if you accidentally interfere with the import and need to stop and restart it.
The import will probably take several minutes. The WinBatch program purposely has delays built into it so that it doesn't outrun MSST. You can tell that the import is finished when the screen "settles down" and windows stop popping up. You'll also note that the program "WBT - PushPins.exe" no longer exists in your status bar at the bottom of the screen.
After the import if finished, save the pushpin map as a "Streets & Trips" map file (*.EST file type). You can then open this map file every time you want to see your pushpin map. You only need to recreate it when your GSAK database has changed enough that you want the changes to be shown on the map.
There are several good reasons why you may want to manually create a pushpin map. First, they are the easiest way to create subsets. For example, you want to go benchmark hunting. So you want a map that shows only benchmarks. You could open a pushpin map you've previously created, and delete all the data sets except for the benchmark pushpins. But starting with a clean fresh map is a lot less work: simply import the benchmark data only. You can also use this technique to create other combinations. For example, you only want to hunt traditional caches today, so you create a special map that only has TraditionalLarge, TraditionalRegular, TraditionalSmall, and TraditionalOther pushpins. For simplicty, I will explain how to create a pushpin map showing just benchmarks.
To manually 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 and double-click on the data set. For our example, navigate to C:\GPS\PushPins\ and select the BENCHMARK.CSV file. This will be the benchmark data set from the last GSAK export.
SIDE NOTE: What if the GSAK export isn't up to date? You can manually recreate the data file in GSAK. In GSAK press Ctrl-F or select /Search /Filter. In the "Set Filter" dialog, on the "General" tab, in the "Select a saved filter" drop down, select the appropriate filter (the filter named "Benchmark" in our example). Now click the GO button. In the status bar, in the lower left corner you'll see "Subset: Filter" We can now export this subset by pressing Ctrl-J (or selecting /File /Export /Microsoft Streets and Trips CSV file). In the "Microsoft Streets and Trips Export" dialog, put the data file name in the first field (the "CSV file to create" field). For our example, we'd put C:\GPS\PushPins\Benchmark.csv and then click the GENERATE button. Now back to our regularly scheduled program …
Once we've selected Benchmark.csv in MSST we're asked to "Choose the separator character." Since "Tab" 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.
We now have our pushpins on the map. The problem is, the graphic is probably not what we wanted. We can choose a different icon as our pushpin graphic. To do that, look in the "Legend and Overview" pane on the left. There is a "Pushpins" section that should have an entry labeled "Benchmark." Right-click the Benchmark entry and select Properties. This will display the "Benchmark Properties" 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 our icon directory (C:\GPS\Pushpins|Icons\ in our example) and select the desired graphic (Benchmark.bmp in our example). After it is imported, click the icon so it is selected. You'll be returned to the "Benchmark Properties" 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 (e.g., as Benchmark.est)
A free, WinBatch-like alternative for those who want to do the porting:

AutoHotKey
A version by Roland Schabram for GSAK 7.
| |