Alpine Hiking 9D – Atlas

We are now able to visualize all mountain peaks (1958), passes (1393) and alpine lakes (1900) located in the Western Himalayas. In this module we will generate a district (47) wise Atlas of the Himalayas showing the peaks, passes and lakes for each district on a high resolution OSM base map.

Mountain passes, peaks and lakes across the Western Himalayas

Pint Layout

To generate high resolution maps we will create a new “Print Layout” in QGIS. (“Project”, “New Print Layout” menu). Name the new layout as “District Maps”. See Image 1 below.

Choose “Add Item”, “Add Map” menu to add a base map to the layout. See Image 2 below.

nt Layout in QGIS

Creating a new Print Layout in QGIS
Adding a map to your print layout in QGIS

Atlas

The standard print layout in QGIS will create a single high resolution output file. In this module we will create one output file for each of the 47 Himalayan districts. Select the “Atlas” tab in right panel, check “Generate an atlas” and chose the “Himalayan Districts” as coverage layer. This will create a separate output for each district. See Image 1 below.

Select the map in your print layout, select the “Item Properties” tab and check “Controlled by Atlas”. This will the display only the currently selected district (in Atlas) on the map. See Image 2 below.

Choose “Atlas”, “Preview Atlas” menu and use the drop down combo to select any of the 47 Himalayan districts in the Atlas. The map will zoom into that particular district. See Image 3 below.

Generating an Atlas in the QGIS print layout
Making the map in the print layout controlled by the Atlas
Previewing different Himalayan districts in the Atlas in the print layout

Visualization of Districts

We will now further tune the visualization of individual districts in the Atlas. Go back to the main QGIS window, right click on “Himalayan Districts” vector layer and change the “Symbology” to “Inverted Polygons” and “Sub renderer to “Rule-based”. See Image 1 below. Click on the one and only rule and set the Filter as:

attribute($currentfeature, ‘name’)=attribute(@atlas_feature,’name’)

This rule will only render the district which is currently selected in the Atlas (Print Layout). Choose “Simple Fill” and set the fill style as “Solid”, fill color as “White”. Combined with the “Inverted Polygon” style this will render the area outside (inverted polygon) the district as white thereby erasing the surrounding districts. See Image 2 below.

Rendering the Atlas current selected Himalayan district as “Inverted Polygons”
Rendering the region outside the Atlas current select district as solid white color (erasing).

Visualization of features

For each of the features (mountain passes, peaks, lakes) vector layers, change the “Symbology” to “Rule-based”:

intersects($geometry, @atlas_geometry)

This will only render the features which are intersecting with Atlas current selected district. All mountain passes, peaks and lakes will not be shown. See Images 1+2 below.

After updating the Symbology of all three feature layers go back to the QGIS print layout window which will now render only the current district (surrounding area is blanked out in white color) and features within the current district. See Image 3 below.

Render only Himalayan lakes which are intersecting with the Atlas current selected district
Render Himalayan lakes within the Atlas current selected district as below
Atlas renders only the current district (erasing surrounding area in white) and features within the current district

Legend

To finalize the Atlas let’s add two additional items. Choose “Add Item”, “Add Label” menu to add a Label in the top right corner of the Atlas. In the “Item Properties”, “Main Properties” click “Insert Expression”, select “Fields and Values” and select the OSM name. This will display the current selected District name. See Images 1+2 below.

Secondly “Add Scale” to the bottom left corner of the Atlas linked to “Map 1”. This will show a scale as per zoom level of the map item in the Altas.

Adding the district name and scale to the Atlas
Showing the OSM name of the current district in the label

Atlas

Voila! Our QGIS Atlas is ready now for printing! Choose “Atlas”, “Export Atlas as Images” menu to generate a district-wise Atlas. For each of the 47 Himalayan districts a high resolution (default resolution 300dpi) JPG output file will now be generated showing the mountain peaks, passes and alpine lakes for each district. See Images 1+2+3 below.

Exporting the QGIS Atlas as Images with 300dpi resolution
Exported district-wise high resolution images
Hires output map for the Chamoli district

Assignment

Acknowledge your understanding of the concepts learned by submitting the assignment below

Hires map of Kullu district

Submit Assignment