Week 5: Raster and Vector–Raster Integration
How can we join raster tiles, compare matching cells, and relate raster values to points and polygons?
Week Content
This week connects raster and vector data through small synthetic examples, then applies the same methods to real Vienna land cover.
- Mosaics: check tile boundaries and alignment before joining arrays
- Differences: compare matching cells that are valid in both rasters
- Point sampling: look up raster values at specified locations
- Zonal statistics: select valid cells and summarize them for each polygon
- CRS, cell size, grid placement and NoData checks; statistics for continuous values and categories
Materials
Lecture slides · PDF Lab notebook · IPYNB Vienna WorldCover 2021 · GeoTIFF All 23 district boundaries · GeoJSONLab
Keep the notebook and both data files in the same folder when working in JupyterHub. Follow the cells in order and inspect each result before continuing.
Guided A: use small synthetic grids to check adjacency, create a mosaic, calculate a difference, sample points and summarize zones. Compare how the default cell-inclusion rule and all_touched affect a polygon summary.
Guided B: calculate the Built-up share for Leopoldstadt using ESA WorldCover 2021. Inspect the inputs, match their CRS, select the district and calculate the share using only its valid raster cells.
Independent checkpoint (Part C): adapt the guided workflow to calculate Tree Cover shares for all 23 districts, check your results and explain the geographic differences.
Lab Checkpoint
- Run Guided A and B and save the notebook with your computed outputs visible.
- Complete C1–C3: produce one Tree Cover result per district, inspect the table, and re-extract one district from the original raster to verify its counts and percentage.
- Answer C5a–C5c using your results: identify the highest and lowest shares and their difference in percentage points, compare two other districts, and suggest a possible geographic explanation plus additional data that could help check it.
All supplied maps and charts, including C4, are optional. Plotting is not assessed. You can answer C5 using the C3 results table.