Elevation Correction Plugin for SportTracks
Author
pkan (Contact by private message to pkan in the SportTracks forum. The best place to ask questions about the plugin is the SportTracks Elevation Correction plugin forum.)
Download
Latest version, for more information see the SportTracks Plugin Catalog.
The downloaded file should have a .st3plugin extension. Some users have reported the downloaded file for this and other plugins being incorrectly renamed to .zip. If this happens to you, just rename the .zip file to .st3plugin (or .st2plugin).
Installation
To install or upgrade from an earlier version, open the install package ElevationCorrectionPlugin_<version>.st3plugin, either by selecting to open it from the download dialog in your web browser or by double-clicking the downloaded file.
If you wish to use custom elevation data, you will also need to install the GDAL plugin for SportTracks.
Description
This plugin corrects the elevation of GPS tracks using SRTM elevation data, which is automatically downloaded from the official SRTM download server. The plugin can also download enhanced SRTM data from Viewfinder Panoramas where available. In addition, custom elevation data provided by the user can be used for elevation correction. All available digital elevation models are listed on the Settings page, and the priority between them can be changed. There is an option to automatically correct data at import, plus an option to exclude selected sources from automatic correction, and an option to download elevation data covering all activities in the logbook, so that no further downloads will be needed to correct the activities.
The latest version of the plugin also adds a pointer mode where you can click on the map to view the corresponding elevation (click on Edit and change to Elevation to enable), and an optional activity detail page for comparing elevations (enable from the plugin settings page).
To correct an activity, select "Apply elevation correction" from the Edit activity menu. To undo the correction, select "Undo elevation correction" from the Edit activity menu. If multiple activities are selected, the correction will be applied to all of them. A progress bar will be displayed, with an option to cancel, if many activitites are processed.
To correct all the activities in the logbook, the easiest way is probably to go to the Activity Reports view, group by category, select the top level (My Activities), and select "Apply elevation correction" from the Edit activity menu. Depending on the size of the logbook, the correction can take some time. (The delay is mostly due to unnecessary work done by the SportTracks core when activity data is updated, and is expected to be significantly reduced by optimizations in later SportTracks releases.)
Caveats
The quality of the correction will depend on the quality of the elevation data used. SRTM is freely available, covers most of the Earth between 56° S to 60° N, and is usually fairly good, but it is not perfect:
- Outside the United States, the resolution is 3 arc seconds (about 90 m in the North-South direction, less in the East-West direction), which means that terrain features on a smaller scale than this are not captured. For the United States, 1 arc second (30 m) data is available.
- The elevation data may contain some measurement noise. The 3 arc second data is more averaged and hence less susceptible to noise than the 1 arc second data.
- The elevation data is with respect to the reflective surface, which may be vegetation, man-made features or bare earth. This may be a problem in some areas.
- The data contains voids (no-data areas), particularly in mountainous regions. If voids are encountered, the plugin will notify the user, who may cancel or accept the correction anyway, letting SportTracks interpolate to fill in the blanks.
Viewfinder Panoramas offers SRTM elevation data with the voids filled, mostly using topographic maps, for many montainous regions. There is also data for some areas north of 60° N, which are not covered by SRTM. In addition, 1 arc second data is available for some regions, mainly the Alps, where SRTM only offers 3 arc second data.
Some other things to keep in mind:
- Bridges and tunnels cannot be correctly handled by grid-based digital elevation models such as SRTM.
- If the terrain height changes more rapidly than the resolution of the elevation model then the resulting interpolated elevation will mostly depend on where the grid points happen to fall with respect to the terrain features. This means that a track that mostly goes around the hills will pick up unwanted elevation changes, while a track going up and down the hills may not get full credit for the elevation changes.
- The plugin is mainly intended for correction of data from units that measure elevation using GPS. For units with a barometric altimeter (e.g., Garmin Edge), the original data will probably be better.
Custom elevation data
The plugin can use custom elevation data in any file format supported by GDAL, which is a general library for handling raster geospatial data. A list of formats supported by GDAL can be found here. Note that most of these formats are not used for elevation data.
To use a custom digital elevation model (DEM), click the "Add DEM" button on the Elevation correction settings page and select the relevant DEM file in the file dialog that appears. If the selected file can be opened, the selected DEM will be added to the list of available DEMs. It is also possible to select multiple DEM files in the file dialog, which will then all be added to the list.
For users in the United States it is possible to use elevation data from the USGS National Elevation Dataset (NED), which can be downloaded using the USGS National Map Viewer. NED has been formed by merging the best available elevation data across the United States, and is typically better than SRTM. For parts of the United States it is also available in 1/3 arc second (10 m) resolution. Another advantage is that, unlike SRTM, the elevation from NED is a bare earth reading.
For more information on how to download data using the National Map Viewer, click on Help in the upper right corner of the viewer, or refer to the help page. All four available file formats (GeoTIFF, ArcGRID, GridFloat, BIL_16INT) will work with the Elevation Correction plugin. However, GridFloat requires adding two lines "nbits 32", "pixeltype float" to the .hdr file, and ArcGrid requires some care in selecting the .adf file that contains the actual data, so BIL and GeoTIFF are more convenient. BIL gives the smallest download since it is an integer format, but will give elevations rounded to whole meters. GeoTIFF might be the most convenient format since all the data needed is contained in a single .tif file, whereas the other formats require several files.
Elevation data is also available from government sites for Canada and Mexico.
DEM folders
In addition to working with individual DEMs, it is possible to specify DEM folders that will be automatically scanned for DEMs each time SportTracks is started. The folders are scanned recursively, i.e., subfolders are also scanned. To add a DEM folder, click the "Add folder" button on the Elevation correction settings page and select the relevant folder in the dialog that appears.
DEM folders can be useful for dealing with groups of DEMs as a single DEM. For instance, the Canadian elevation data mentioned above consists of many small DEMs and it is convenient to put them all (or just the ones relevant to a particular user) in a DEM folder in order to have a single entry in the list of available rather than a large number of individual files.
Route control pointer mode
The plugin adds an Elevation pointer mode to the Route control in the Daily Activity and Activity Reports views. The pointer mode is selected in the upper left part of the Route control. When the Elevation mode is selected, the user can inspect elevation data for any point by simply clicking on the map.
Activity detail page
For users interested in comparing the original elevation data and the corrected data for all available DEMs, the plugin offers adds an Elevation Correction activity detail page. Since this is not a core feature, it is disabled by default, but may be enabled using a checkbox on the plugin settings page.