Elevation Correction Plugin for SportTracks
Author
pkan (Contact by private message in the SportTracks forum)
Download
Latest version, for details see the SportTracks Plugin Catalog.
Installation
To install, unzip the downloaded zip file in the SportTracks plugin directory (e.g., C:\Program Files\Zone Five Software\SportTracks 2.0\Plugins). If you wish to use custom elevation data, you will also need to install the GDAL plugin for SportTracks. Note: This version of the elevation correction plugin only works with version 1.1 or higher of the GDAL plugin.
Description
This plugin corrects the elevation of GPS tracks using SRTM elevation data, which is automatically downloaded from the official NASA FTP 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.
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 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 from the USGS Seamless Data Distribution System (SDDS). 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.
USGS has a tutorial on how to download data. Note that there is also a button in the SDDS viewer for defining a download area by coordinates, which may be more efficient if you already know the limits, e.g., from looking at the lat/long grid in SportTracks. All four available file formats (ArcGRID, BIL, GeoTIFF, GridFloat) will work with the plugin. 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 natural to put them all (or just the ones relevant to a particar 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.
Change log
Version 1.3.1 (May 25, 2008):
- Fixed incompatibility due to API change in ST 2.0.3062.
- Updated SharpZipLib to version 0.85.4.
Version 1.3 (March 25, 2008):
- New option to specify sources that should be excluded from automatic correction at import.
- Works with (and requires) GDAL plugin v1.1 and higher.
- Updated to use the latest updates of Viewfinder Panoramas.
- Fixed: Plugin did not work first time it was run.
- Fixed: Runtime error when inspecting properties of a GDAL DEM that could not be opened.
- Fixed: GDAL lack of thread safety was not properly handled.
Version 1.2 (November 14, 2007):
- DEM folders introduced.
- Multiselect enabled in file dialog for adding DEMs.
- Custom DEMs taken into account in selection of SRTM tiles to download when "Download elevation data for all activities" is checked.
- Fixed: Reference to osr_csharp.dll caused an exception for some users without GDAL installed.
Version 1.1 (October 15, 2007):
- Custom digital elevation models now supported using GDAL.
- Priority between available digital elevation models can now be changed.
- Routes can now be corrected.
- A progress bar is displayed when many routes/activities are processed.
- SportTracks is no longer unresponsive while the plugin is processing data.
- Fixed: Did not work for regions covered by Islands subdirectory at the NASA FTP site (New Zealand + other islands).
Version 1.0 (September 14, 2007)