Submission deadline is Friday, December 11 2020 through GitHub Classroom.
Documents to hand in:
- Markdown file answers.md for exercises 1 - 4
- Python file for exercise 5
In this assignment you will use the program GRASS GIS to conduct a geospatial analysis using raster and vector data.
This is a group assignment in which you are supposed to solve these exercises in pairs of two students. Material and submission will be handled through GitHub Classroom.
Write the answers to the questions in a new markdown file called answers.md. Please use Markdown syntax to format your document.
All data for the assignment is stored in the repository in the folder "data":
- Global Human Settlement Layer: Population (GHS_POP_E2015_GLOBE_R2019A_54009_250_V1_0_18_3.tif)
- GDAM Administrative districts of Germany (gadm28_adm2_germany.shp)
- Motorways extracted from OSM (motorways.shp)
Create a new location called "BadenWuerttemberg". The coordinate references system should be the same as the raster file GHS_POP_E2015_GLOBE_R2019A_54009_250_V1_0_18_3.tif.
Import the following data sets into the PERMANENT mapset. Use the commands v.import
, v.in.ogr
, r.import
or r.in.ogr
.
Import the motorways.shp into the PERMANENT mapset.
Import only the districts of Baden-Württemberg from the gadm28_adm2_germany.shp into the PERMANENT mapset.
Hint: You need to convert gadm28_adm2_germany.shp first to the correct coordinate reference system.
If you haven't done so during the creation of the new location, import the Global Human Settlement Layer.
The goal of this section is to calculate the total population of each district.
Set the region to the extent of the districts layer. Make sure that the resolution of the region is 250 by 250 meters. Use the g.region
tool.
In order to calculate zonal statistics in GRASS GIS, the districts need to be in raster format. Rasterize the districts. The cells of the raster should contain the OBJECTID of the district features.
Use the tool r.stats.zonal
to calculate the total population of each district. The Global Human Settlement Layer contains the number of people living in each cell. Choose the aggregation method accordingly.
Use the "Query raster/vector maps" tool in the top menu of the Map Display window and click on the districts in the map to get the calculated population numbers of each one. How good is the population estimate of the Global Human Settlement Layer compared to official data?
Use the same method as above to calculate the total population living within 1 kilometer distance to the motorways. Set the region to the extent of the motorways layer before you start processing. Print the population value using the r.stats
tool.
-
Convert the workflow described in section 4 to a Python script.
-
Use a for loop to calculate the population living close to motorways using different buffer distances: 250, 500, 1000, 2500 and 5000 meters.