Skip to content

Commit

Permalink
Merge pull request #171 from GIScience/dev
Browse files Browse the repository at this point in the history
formatting update for exercises
  • Loading branch information
enauj authored Jan 31, 2025
2 parents f2053b9 + f384aa4 commit 5e3d7f1
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 73 deletions.
58 changes: 29 additions & 29 deletions content/Module_2/en_qgis_attribute_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __attributes__ of that feature. You can use the attribute table to search, sort,
filter, edit and select data.


```{figure} /fig/en_vector_data_overview.drawio.png
```{figure} /fig/en_vector_data_overview.png
---
width: 600px
align: center
Expand All @@ -33,69 +33,69 @@ data.
Having a look into the attribute table is essential to understand and get an overview of the
data you are working with. After downloading and import a dataset into QGIS, you will most likely open the attribute table to understand the data and see what information is available. Understanding what kind of information is available is indispensable when working with GIS software.

You can open the attribute table in two ways.
You can open the attribute table in two ways:

1. Right click on a layer in the Layers panel and select `Open Attribute Table`
2. Select a layer in the Layers panel and click on the attribute table symbol in
the toolbar.
::::{margin}
```{tip}
You can also use the shortcut <kbd>F6</kbd> (in some cases <kbd>Fn</kbd> + <kbd>F6</kbd>) to open the attribute.
```
::::
1. Right click on a layer in the Layers panel and select `Open Attribute Table`.

```{figure} /fig/en_attributetable_right_click.png
---
height: 500px
name:
align: center
name: Open Attribute Table with right click
---
Screenshot of Opening the Attribute Table with right click
Opening the attribute table via right-click in QGIS 3.36
```


2. Select a layer in the Layers panel and click on the attribute table symbol in the toolbar.

```{note}
If you have multiple layers, only the attribute table of the layer currently
selected in the layer panel will open.
```

```{figure} /fig/en_attributetable_top_right.png
---
height: 500px
name:
height: 500px
align: center
name: Open Attribute Table top right
---
Screenshot of Opening the Attribute Table
Opening the attribute table in QGIS 3.36
```

::::{margin}
```{tip}
You can also use the shortcut `F6` (in some cases `Fn` + `F6`) to open the attribute.
```
::::

:::{dropdown} Buttons of the attribute table
:open:
|Icon|Description|Purpose|Shortcut|
|---|---|-----|---|
| ![](/fig/mActionToggleEditing.png)|__Toggle editing mode__ | Enable editing functionalities|`Ctrl+E`|
| ![](/fig/mActionToggleEditing.png)|__Toggle editing mode__ | Enable editing functionalities|<kbd>Ctrl</kbd> + <kbd>E</kbd> |
| ![](/fig/mActionMultiEdit.png)| Toggle multi-edit mode| Update multiple fields of many features | |
|![](/fig/mActionSaveEdits.png)| __Save edits__| Save current modifications | |
|![](/fig/mActionRefresh.png)| Reload the table | | |
|![](/fig/mActionNewTableRow.png)| Add feature | Add new geometry-less feature | |
|![](/fig/mActionDeleteSelectedFeatures.png)| Delete selected features| Remove selected features from the layer| |
|![](/fig/mActionEditCut.png)| Cut selected features to clipboard | | `Ctrl+X` |
|![](/fig/mActionCopySelected.png)| Copy selected features to clipboard | | `Ctrl+C` |
|![](/fig/mActionEditPaste.png)| Paste features from clipboard| Insert new features from copied ones |`Ctrl+V`|
|![](/fig/mActionEditCut.png)| Cut selected features to clipboard | | <kbd>Ctrl</kbd> + <kbd>X</kbd> |
|![](/fig/mActionCopySelected.png)| Copy selected features to clipboard | | <kbd>Ctrl</kbd> + <kbd>C</kbd> |
|![](/fig/mActionEditPaste.png)| Paste features from clipboard| Insert new features from copied ones | <kbd>Ctrl</kbd> + <kbd>V</kbd> |
|![](/fig/mIconExpressionSelect.png)| Select features using an Expression|| |
|![](/fig/mActionSelectAll.png)| Select All| Select all features in the layer|`Ctrl+A` |
|![](/fig/mActionInvertSelection.png)| Invert selection| Invert the current selection in the layer |`Ctrl+R`|
|![](/fig/mActionDeselectActiveLayer.png)| Deselect all| Deselect all features in the current layer|`Ctrl+Shift+A`|
|![](/fig/mActionFilterMap.png)|Filter/Select features using form | |`Ctrl+F`|
|![](/fig/mActionSelectAll.png)| Select All| Select all features in the layer| <kbd>Ctrl</kbd> + <kbd>A</kbd> |
|![](/fig/mActionInvertSelection.png)| Invert selection| Invert the current selection in the layer | <kbd>Ctrl</kbd> + <kbd>R</kbd> |
|![](/fig/mActionDeselectActiveLayer.png)| Deselect all| Deselect all features in the current layer| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>A</kbd> |
|![](/fig/mActionFilterMap.png)|Filter/Select features using form | | <kbd>Ctrl</kbd> + <kbd>F</kbd> |
|![](/fig/mActionSelectedToTop.png)| Move selected to top| Move selected rows to the top of the table| |
|![](/fig/mActionPanToSelected.png)| Pan map to the selected rows| | `Ctrl+P`|
|![](/fig/mActionZoomToSelected.png)| Zoom map to the selected rows | |`Ctrl+J` |
|![](/fig/mActionNewAttribute.png)| New field | Add a new field to the data source | `Ctrl+W`|
|![](/fig/mActionPanToSelected.png)| Pan map to the selected rows| | <kbd>Ctrl</kbd> + <kbd>P</kbd> |
|![](/fig/mActionZoomToSelected.png)| Zoom map to the selected rows | | <kbd>Ctrl</kbd> + <kbd>J</kbd> |
|![](/fig/mActionNewAttribute.png)| New field | Add a new field to the data source | <Kbd>Ctrl</kbd> + <kbd>W</kbd> |
|![](/fig/mActionDeleteAttribute.png)| Delete field | Remove a field from the data source | |
|![](/fig/mActionEditTable.png)| Organize columns | Show/hide fields from the attribute table||
|![](/fig/mActionCalculateField.png)| __Open field calculator__| Update field for many features in a row |`Ctrl+I` |
|![](/fig/mActionCalculateField.png)| __Open field calculator__| Update field for many features in a row | <kbd>Ctrl</kbd> + <kbd>I</kbd> |
|![](/fig/mActionConditionalFormatting.png)| Conditional formatting | Enable table formatting| |
|![](/fig/dock.png)| Dock attribute table | Allows to dock or undock the attribute table||
|![](/fig/mAction.png)| Actions | Lists the actions related to the layer | |
Expand Down
40 changes: 34 additions & 6 deletions content/Module_2/en_qgis_basic_data_processing_ex2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Exercise 2: Basic geodata processing

__🔙[Back to Homepage](/content/intro.md)__
__[🔙🏠 Back to Homepage](/content/intro.md)__

:::{card}
:link: https://giscience.github.io/gis-training-resource-center/content/Module_2/en_qgis_module_2_exercises.html
__Click here to return to the exercise overview page for module 2__
:::

## Characteristics of the exercise

Expand Down Expand Up @@ -95,12 +100,34 @@ __Wrap up:__

## Exercise
### Available Data
Download all datasets [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_2/Module_2_Exercise_2_Basic_geodata_processing.zip), save the folder on your computer and unzip the file. The zip folder includes:
:::{card}
:link: https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_2/Module_2_Exercise_2_Basic_geodata_processing.zip

__Download all datasets [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_2/Module_2_Exercise_2_Basic_geodata_processing.zip), save the folder on your computer and unzip the file.__

:::

The zip folder includes:

| Dataset name | Original title | Publisher | Downloaded from |
| :-------------- | :----------------- |:----------------- |:----------------- |
| `nigeria_populated_places.shp` | Nigeria Populated Places (OpenStreetMap Export) | Humanitarian OpenStreetMap Team (HOT) | [HDX](https://data.humdata.org/dataset/hotosm_nga_populated_places) |
| `nigeria_boundaries.geojson` | | | |


The zip folder includes:

- `nigeria_populated_places.shp` (Points) Shapefile
- `nigeria_boundaries.geojson` GeoJSON

The shapefile for populated places contains data on human settlements in Nigeria, including cities, villages and others. The GeoJSON file for the boundaries of Nigeria contains information on the administrative boundaries at levels 2 and 4 with level 2 representing the whole country and level 4 being the states.
The shapefile for populated places contains __point data__ on human settlements in Nigeria, including cities, villages and others. The GeoJSON file for the boundaries of Nigeria contains information on the administrative boundaries at levels 2 and 4 with level 2 representing the whole country and level 4 being the states.

:::{note}

GeoJSON does not support multiple layers, so the polygons for the country boundaries and the states are merged into one layer __where the different polygons overlap__.

:::
<!--ADD: Explanation about how GeoJSON apparently merges different layers?-->

### Tasks

Expand All @@ -126,10 +153,12 @@ descending order.
As no calculations are involved, e.g. area, WGS84 (EPSG:4326) is a good choice.
```

:::{dropdown} How do I know which CRS to choose?
<!----:::{dropdown} How do I know which CRS to choose?
[EPSG.io](http://epsg.io) has a database that you can search to find the appropriate CRS
to use for a country. More information on [projections](https://giscience.github.io/gis-training-resource-center/content/Wiki/en_qgis_projections_wiki.html) can be found in the Wiki or in the corresponding section in [module 2 on projections](https://giscience.github.io/gis-training-resource-center/content/Module_2/en_qgis_projections.html).
:::
-->

<!-- CLARIFY: is it important to choose an appropriate CRS or should people use
the default? Part of this section can be removed. -->

Expand All @@ -138,8 +167,7 @@ the district in which **Zuyel** is located. Name it accordingly. To find the dis
<!-- FIXME: Exercises should be used to test what has been shown in a section,
rather than introduce new functionality -->

7. Remove all the initial layers and then open the attribute table for each of your new layers and check that each layer
only contains one feature.
7. Remove all the initial layers and then open the attribute table for each of your new layers and check that each layer only contains one feature.

8. Save your project.

Expand Down
9 changes: 6 additions & 3 deletions content/Module_2/en_qgis_data_sources_ex3.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Exercise 3: Data sources


<!--This exercise is quite minimal with the explanation of steps (most should be looked up) so it is not suited for a follow along session -->

__🔙[Back to Homepage](/content/intro.md)__

:::{card}
:link:
:link: https://giscience.github.io/gis-training-resource-center/content/Module_2/en_qgis_module_2_exercises.html

__Click here to return to the exercise overview page for module 2__

Expand All @@ -13,6 +14,7 @@ __Click here to return to the exercise overview page for module 2__
## Characteristics of the exercise

:::{card}
:class-card: sd-text-justify
__Aim of the exercise:__
^^^

Expand Down Expand Up @@ -101,9 +103,10 @@ __Wrap up:__
### Available Data

:::{card}
:link: https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_3/Module_2_Exercise_3_Data_sources.zip

Since the exercise is about finding data, there won't be any data to download.
Instead download the usual folder structure [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_3/Module_2_Exercise_3_Data_sources.zip) and insert your data as you download it.
Instead download the __standard folder structure__ [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_3/Module_2_Exercise_3_Data_sources.zip) and insert your data as you download it.

:::

Expand Down
25 changes: 17 additions & 8 deletions content/Module_2/en_qgis_data_sources_ex4.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Exercise: OpenStreetMap data export
__🔙[Back to Homepage](/content/intro.md)__

__🔙[Back to Exercise overview](/content/Modul_2/en_qgis_modul_2_exercises.md)__
:::{card}
:link: https://giscience.github.io/gis-training-resource-center/content/Module_2/en_qgis_module_2_exercises.html

__Click here to return to the exercise overview page for module 2__

:::

:::{card}
__Aim of the exercise:__
^^^

This exercise aims to show multiple ways how to get OpenStreetMap(OSM) as a vector
file into QGIS.
This exercise aims to show two ways how to get OpenStreetMap(OSM) as a vector
file into QGIS. We will go through the workflow using Geofabrik, the HOT (Humanitarian OpenStreetMap Team) export tool and the QuickOSM QGIS-plugin.

:::

Expand Down Expand Up @@ -89,18 +93,23 @@ __Wrap up:__

## Available Data

:::{card}
:link: https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_3/Module_2_Exercise_3_Data_sources.zip

Since the exercise is about finding data, there won't be any data to download.
Instead download the usual folder structure [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_3/Module_2_Exercise_3_Data_sources.zip) and insert your data as you download it.
Instead download the __standard folder structure__ [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_3/Module_2_Exercise_3_Data_sources.zip) and insert your data as you download it.

:::

## Task
## Tasks

There are multiple ways how to get data from OpenStreetMap (OSM). In this exercise, we will go over a few methods to extract data from OSM. Depending on your use-case, you might only want very specific data from OSM, whereas in others, you might want to download almost all the regional OSM data.
<!-- FIXME: This task needs more information. what is the user trying to achieve
and why?
ADD: Maybe a discussion step for each extraction method? in which scenarios would you choose which extraction method? -->

### Task: Geofabrik
### Task 1: Geofabrik

The Geofabrik website offers downloads of OSM data by region.

Expand Down Expand Up @@ -148,7 +157,7 @@ whole countries or regions.
|+ Clear documentation of which OSM features are contained in each shapefile|- Only available as shapefile|


### Task: HOT Export Tool
### Task 2: HOT Export Tool

The [HOT Export Tool](https://export.hotosm.org/v3/)
is a tool for accessing OSM data offered by Humanitarian OpenStreetMap Team (HOT).
Expand Down Expand Up @@ -216,7 +225,7 @@ is in QGIS.
|+ Easy to use||
|+ Query can easily be repeated | |

### Task: QuickOSM
### Task 3: QuickOSM

The QuickOSM plugin allows you to load OSM data directly into QGIS.
However, the plugin requires the deepest knowledge of the OSM data model,
Expand Down
39 changes: 23 additions & 16 deletions content/Module_2/en_qgis_geodata_concept_ex1.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Exercise 1: Understanding Geodata

__🔙[Back to Homepage](/content/intro.md)__

:::{card}
:link: https://giscience.github.io/gis-training-resource-center/content/Module_2/en_qgis_module_2_exercises.html
__Click here to return to the exercise overview page for module 2__
:::

## Characteristics of the exercise

:::{card}
__Aim of this exercise:__
^^^

The objective of this exercise is to make your first steps in QGIS. Understand the user interface and get to know the layer concept.

* Display vector data in QGIS and view the attributes of the data
* Reproject/Change the projection of the vector data

The objective of this exercise is to make your first steps in QGIS. Understand the user interface and get to know the layer concept. You will learn to import and display vector data into QGIS and open the attribute table. Furthermore, we will learn to reproject or change the projection of the vector datasets.
:::


Expand All @@ -25,7 +28,7 @@ __Type of trainings exercise:__
:::

:::{grid-item-card}
___These skills are relevant for:__
__These skills are relevant for:__
^^^

- QGIS-Essentials
Expand All @@ -43,7 +46,7 @@ ___These skills are relevant for:__
__Estimated time demand for the exercise:__
^^^

- The exercise takes around 2 hours to complete, depending on the number of participants and their familiarity with computer systems.
- The exercise takes around 30 to 60 minutes to complete, depending on the number of participants and their familiarity with computer systems.

:::

Expand Down Expand Up @@ -98,6 +101,7 @@ __Wrap up:__
### Available Data

:::{card}
:class-card: sd-text-center
:link: https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_1/Module_2_Exercise_1_understanding_geodata.zip

__Download all datasets [here](https://nexus.heigit.org/repository/gis-training-resource-center/Module_2/Exercise_1/Module_2_Exercise_1_understanding_geodata.zip) and save the folder on your computer and unzip the file.__
Expand All @@ -106,11 +110,12 @@ __Download all datasets [here](https://nexus.heigit.org/repository/gis-training-

The zip folder includes:

- `Sierra_leone_borders.gpkg` (MultiLineString) GeoPackage
- Sierra Leone national borders (Lines)
- Sierra Leone provinces (Lines)
- `sierra_leone_health_HOT.shp` (Points) Shapefile
- `sl-airports.csv` (CSV)
| Dataset name | Original title | Publisher | Downloaded from |
| :-------------- | :----------------- |:----------------- |:----------------- |
| `Sierra_leone_border.gpkg` (MultiLineString) | | | |
| `sierra_leone_health_HOT.shp` (Points) | Sierra Leone Health Facilities (OpenStreetMap Export) | Humanitarian OpenStreetMap Team (HOT) | [HDX](https://data.humdata.org/dataset/hotosm_sle_health_facilities) |
| `sl-airports.csv` (CSV) | Airports in Sierra Leone | Our Airports | [HDX](https://data.humdata.org/dataset/ourairports-sle) |


The borders GeoPackage contains administrative information for Sierra Leone at both national and provincial level. Additionally, the shapefile `sierra_leone_health_HOT.shp` provides information on various health facilities within the country, while the `sl-airports.csv` CSV-file offers information on airports.

Expand All @@ -122,7 +127,7 @@ The exercise data should be saved in a location where you can easily find them a
### Tasks
1. Open the files you have downloaded in QGIS.
- Unzip the folder with the exercise data.
- The geopackage (.gpkg) and shapefile (.shp) can be dragged and dropped onto the map canvas in QGIS.
- The geopackage (`.gpkg`) and shapefile (`.shp`) can be dragged and dropped onto the map canvas in QGIS.
- The .csv file needs to be imported via the layer menu.
- Navigate to `Layer`> `Add Layer` > `Add delimited text layer`. A new window will open. Here you can select the file you want to import by clicking on `...` to the right of the __File name__ field at the top.
- Navigate to the folder with the exercise files and select `sl-airports.csv`.
Expand All @@ -139,7 +144,8 @@ name: navigation to add csv layer
Opening the CSV-import window
:::

<!-- FIXME: We haven't shown people how to open files yet. EDIT: Move this Exercise after geodata management -->
<!-- FIXME: We haven't shown people how to open files yet.
EDIT: Moved this Exercise after geodata management -->

```{figure} /fig/en_delimited_text_screenshot.PNG
---
Expand Down Expand Up @@ -193,10 +199,11 @@ Screenshot of the Export window

```{Note}
Combining layers in different projections with online basemaps (typically have their own projections) can lead to display issues due to CRS conflicts. When layers have a distinct CRS, they may not align correctly or appear distorted when overlaid with an online basemap. To mitigate these problems, it's advisable to either reproject the layers to match the CRS of the basemap (which is often not applicable) or temporarily remove the basemap before saving the project. This ensures that the map is displayed accurately and avoids potential visual discrepancies caused by CRS inconsistencies.
Combining layers in different projections with online basemaps (typically have their own projections) can lead to display issues due to [CRS conflicts](https://giscience.github.io/gis-training-resource-center/content/Module_2/en_qgis_projections.html#how-to-choose-an-appropriate-projected-coordinate-system). When layers have a distinct CRS, they may not align correctly or appear distorted when overlaid with an online basemap. To mitigate these problems, it's advisable to either reproject the layers to match the CRS of the basemap (which is often not applicable) or temporarily remove the basemap before saving the project. This ensures that the map is displayed accurately and avoids potential visual discrepancies caused by CRS inconsistencies.
```
<!-- CLARIFY: What issues? Is there another workaround? EDIT: -->
<!-- CLARIFY: What issues? Is there another workaround?
UPDATE: FIXED -->

```{figure} /fig/en_result_geodata_concept_exercise.png
---
Expand Down
Loading

0 comments on commit 5e3d7f1

Please sign in to comment.