Second Test#

This is the second test. You work in teams of two persons. Find your partner in the table below. Make sure to hand-in your finished test as a .pdf file (or a zip folder containing the .ipynb file and the images) via e-mail.

Please provide sufficient screenshots and documentation for each of your steps.

These two files contain the geometries for your region:

Please hand in your results by 2024-01-10 18:00.

Group

People

Region

Points

01

Milena + Diego

Oxford

02

Sylvia + Marlene

Reading

03

Leon + Pui-Yi

Northampton

04

Julia + Finn

Milton Keynes

05

Guillaume + Suzanne

Corby

06

Antonia + Robin

Luton

07

Sarah + Julian

Bedford

08

Jakob + Levi

Peterborough

09

Paul + Marius

Stevenage

10

Arin + Veronika

Cambridge

11

Dominik

Colchester

Completeness (70P)#

Download and Prepare Data (10P)#

Download the reference dataset (Microsoft Global ML Building Footprints) containing buildings through GitHub and prepare the data for your area of interest.

Process Reference Data (10P)#

Count the number of buildings and the overall building area in square meters using the reference data set for each 1km x 1km grid cell.

  • Make sure to transform the Microsoft Buildings into an appropriate projection.

  • Select all 1km x 1km grid cells for your area of interest from the given file (urban_centers_grid_test_02_2024.geojson).

  • For the counts/area statistics per grid cell you can rely on the building centroid geometry.

Query ohsome API (20P)#

Query the ohsome API to derive the number of buildings and overall building area in OSM for each 1km x 1km grid cell.

  • You have to send two queries.

  • Consider in your queries buildings with the tags yes, house, residential and garage.

  • Save your results into a geojson file.

  • You can use and adjust the code snipped below.

import pandas as pd
import geopandas as gpd
from ohsome import OhsomeClient
client = OhsomeClient()

# load the geojson file with geopandas
bpolys = gpd.read_file("your_file.geojson")
display(bpolys)

... here comes the code to query the ohsome API ...

# export your results as a geojson file
results_df.reset_index(inplace=True)
results_df["idx"] = results_df["boundary"].astype(int)
results_df.set_index("idx", inplace=True)
join_df = bpolys.join(results_df)
join_df.to_file("your_output_file.geojson", driver='GeoJSON')

Describe and Visualize Results (25P)#

Report on the overall (sum) building count and building area for your entire area of interest. How complete are OSM buildings for your area of interest in regard to count based completeness and area based completeness measures? (10P)

Visualize your results for the 1km x 1km grid on two maps. The symbology should be based on (A) the ration between OSM / reference building area and (B) the ration between OSM / reference building count. (15P)

Discussion (5P)#

How are the measures different for your area of interest? What could be a reason for this difference?

Currentness (30P)#

Download Data (15P)#

Derive the currentness of OSM data for all buildings in your area of interest. Use a snapshot based approach for this analysis. Download all OSM elements according to the filter definition used in part one of this test. Make sure that this download includes the timestamp the OSM element has been edited the last time.

Process Data (10P)#

Categorize OSM elements into six groups based on their last edit timestamp. Use 2016-01-01, 2018-01-01, 2020-01-01, 2022-01-01 and 2024-01-01 as the thresholds. How many elements have been edited for each category?

Visualize Results (5P)#

Visualize the results on a map.