-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Tracks2Map is a plugin for the OpenStreetMap editor JOSM. It opens all GPX tracks in the current map view from a specified directory. Optionally, it can work recursively on subdirectories. Only those tracks, are opened that actually cross the map view. If available, associated markers are opened as well.
As the plugin may open a number of GPX track layers and GPX marker layers at a time, it also provides a menu option for deleting all GPX layers at a time.
Tracks2Map plugin is configured as Eclipse Java project. The project directory must be placed in josm/plugins of the original JOSM source tree for build.xml to work. The location of the JOSM project needs to be specified on the build path. The built plugin Tracks2Map.jar will be found in josm/dist.
- Copy the plugin JAR file
Tracks2Map.jarinto the JOSM plugins directory. Under Linux, the plugins directory should be located at$HOME/.local/share/JOSM/plugins. - Launch JOSM and select
Edit -> Preferencesfrom the menu bar. - In the opened preferences dialog, select the tab
Plugins. - In the sub-tab
Plugins, select radio button optionAvailable. - Search for
Tracks2Map: [...]in the list of available plugins and select the checkbox. - Click the
OKbutton at the bottom. - It might be necessary to restart JOSM for the changes to take effect.
- From the JOSM menu bar, select
Edit -> Preferences. - In the opened preferences dialog, select the tab
Tracks2Map. - Select the directory with your recorded or gathered GPX tracks via the file chooser dialog and check the
Recursiveoption as needed. - Click the
OKbutton at the bottom.

| Option | Default | Description |
|---|---|---|
| GPX Track Directory | null | Path of the directory where the recorded or gathered GPX tracks are located. |
| Recursive | true | If enabled, the plugin will work on subdirectories recursively. |
Tracks2Map adds two actions to the JOSM file menu:
-
Open all tracks in map view: Opens all GPX tracks which cross the current map view from the specified directory and optionally its subdirectories. -
Delete all GPX track and marker layers: Deletes all GPX layers at a time so they do not need to be closed one by one.

The two above mentioned menu actions can be added to the toolbar as icons:
- From the JOSM menu bar, select
Edit -> Preferences. - In the opened preferences dialog, select the tab
Toolbar. - In the tree
Availableon the right, expand theFilenode and select the Tracks2Map menu actions. - Click on the button with the blue arrow to the left which is located in the middle section.
- The actions are now part of the toolbar list.
- Use the light blue up and down arrows to adjust the position of the icons in the toolbar as desired.
- After clicking
OK, the icons will be available in the toolbar.
When executed in a JOSM session for a specified GPX tracks directory for the first time, the action may take some time to finish (depending on the number of GPX files) as all GPX files in the directory (tree) have to be opened and the track bounds have to be determined. The next time that the action is executed, it will run much faster as the track bounds are kept in memory and therefore only new GPX files or GPX files with track bounds intersecting the map bounds will be opened to check if the track actually crosses the map view.
To provide the user a feeling of the time required to finish, a progress dialog is shown each time that the tracks open action is executed.