Alpine Hiking 10E – Hiking Routes

In this module we will play around with various metrics for Hiking Routes downloaded from Open Street Maps. Distance, route elevation gain / drop, min / max altitude, elevation profile, etc. We will make use of downloaded DEM data for Himachal to compute elevation metrics.

Open up QGIS, zoom into the state of Himachal Pradesh and download “route” = “hiking” using the QuickOSM plug-in for the same 3×2 degree region as previous modules – “layer extent” = “HP_DEM”. A new vector layer (type line-string) is created with approx. 181 hiking routes. See Image 1 below.

Let’s visualize hiking routes as per “network” (continental / red, national / blue, regional / orange, local / purple) similar as Waymarked Hiking Trails. See Images 2+3 below.

Downloading Hiking Routes from Open Street Maps

Visualizing hiking routes as per network

Hiking routes for Himachal colored as per network similar as Waymarked Hiking Trails

Distance

Now let’s explore the various metrics we can generate for Hiking Routes (line-strings). Right click on the new vector layer and bring up “Open Attribute Table”. Click on “Toggle Edit” and “Add new Attribute” named “Length”. See Image 1 below.

Let’s update this newly added attribute to “$length/1000” representing the length (meters) of the current route divided by thousand (kilometers). Click on the “Length” column header to sort the routes from longest to shortest. Parang La at 101km is the longest route in HP. See Images 2+3 below.

Click on the “Select Features by expression” toolbar icon and enter the expression “sum(length)” to calculate the total distance of hiking routes in Himachal. This equals to 4 thousand kilometers of OSM mapped routes in a single state! See Image 4 below.

We can also graphically visualize the route distances by running the “Bar plot” processing function and generating a chart with all 181 hiking route lengths. See Image 5 below.Adding a new “Length” attribute for Hiking Routes

Extracting the length of each hiking route into the “Length” attribute

Sorting hiking routes on length – Parang La being the longest at 101 km

Total distance of OSM hiking routes in Himachal equals 4000+km

QGIS bar plot showing lengths of hiking routes

Elevation Metrics

Now, let’s play around with elevation metrics on hiking routes. First let’s drape the Hiking Route layer to add Z values (elevation data). Run the “Drape (Set Z Value From Raster)” processing function to extract elevation data from the downloaded DEM data for the hiking routes. See Image 1 below.

Next we can calculate various interesting elevation stats for the 181 OSM hiking routes. Run the “Climb Along Line” function on the hiking routes to add 4 new attributes – elevation gain / drop and min / max altitude. See Images 2+3 below.

Sort on any attribute to sort hiking routes accordingly. Below shows the routes sorted by maximum elevation – Mount Yunam touching the highest altitude at 6087 meters altitude. See Image 4 below.Extracting elevation data from downloaded DEM for OSM hiking routes

Generating elevation metrics for draped hiking routes

Elevation gain / drop and min / max elevation shown for each of the hiking routes. Routes are sorted on “max elevation” – Mount Yunam being the highest at 6087 meters altitude.

Profiles

An elevation profile gives a useful view on the steepness of a hiking route along its entire length. Module 3A illustrated how to plan day-wise journey / night halts using an elevation profile. Elevation profiles can be generated from the GPX files downloaded from Waymarked Hiking Trails. In this module let’s generate an elevation profile using QGIS.

Select “hiking_route” vector layer in the “Layers” panel and click the “Select Features by Area or Click” icon on the QGIS toolbar. Next, click on any hiking route to select the same (yellow highlighted). In below example we chose the “Indrahar pass” route. See Image 1 below.

Next, run the “Profiles from lines” processing function on the selected route. Profiles are generated using downloaded DEM data. Ensure to enable “Selected Features Only” to generate a profile for the selected route only. A new vector layer is created with (X,Y,Z) attributes along the hiking route. See Images 2+3 below.

Export this layer as a “Comma Separated Value” file. Open Google Drive (drive.google.com) in your web browser and drag and drop the exported CSV file onto the browser. This will upload the file onto Google Drive. Finally, click on the file and choose “Open with Google Sheets” to load the exported data in a sheet. See Images 4+5+6 below.

Finally, select columns “Dist” (distance along route) and “Z” (elevation) and choose “Insert” “Chart” menu to create a new chart. Choose “Scatter Chart” with Series “Dist” and “Z” to generate an elevation profile for the exported hiking route. See Images 7+8 below.Indrahar pass route selected (highlighted in yellow)

Generate “Profiles” for the selected hiking route using downloaded DEM for HP region

New “Profiles” vector layer with (X,Y,Z) values for the selected hiking route

Export a vector layer in “CSV” format

Upload (Drag-n-drop) the CSV file onto Google Drive

Open the CSV file using Google Sheets

Select “Dist” (distance along route) and “Z” (elevation) columns for Indrahar profile data

Create a scatter chart (elevation profile) for the Indrahar hiking route

Assignment

Acknowledge your understanding of the concepts learned in this module by submitting the assignment below.