<aside> 🚨
25.11.20025: Overture CLI not working
Issue reported here: https://github.com/OvertureMaps/overturemaps-py/issues/73
So don’t freak out if your code is suddenly not working!
</aside>
<aside> 💡
Deadline is 2025-11-27@18:00
Late submission? 10% will be removed for each day that you are late (3 days max).
It’s worth 20% of the final mark.
This is an individual assignment.
</aside>
In this assignment, you will create a RESTful API for serving building footprint data from the South Holland region in the Netherlands. You will download open geospatial data, store it efficiently in a spatial database, and create a web API to serve the data with various filtering options.
Region:
South Holland (Zuid-Holland), Netherlands
Bounding Box in EPSG:28992 (Amersfoort / RD New):
minx = 78600.0 miny = 445000.0 maxx = 85800.0 maxy = 450000.0

<aside> 💡
This assignment must be implemented in Python. For the API, use either Flask or FastAPI, and for the backend database, use DuckDB.
</aside>
First, you will need some data and a place to store it.
Write a script 01_backend_setup.py that does the following:
buildings_database.db and make sure it is stored in the same directory as your script.IMPORTANT: You will need to flip the geometry coordinates with ST_FLIPCOORDINATES() before the transformation. You transformation will look something like this: ST_Transform(ST_FLIPCOORDINATES(geometry), 'EPSG:4326', 'EPSG:28992') AS geometry
requests library to download the file through Python. PDOK is an OGC API - features service so it offers the data in CRS84 by default but also it makes it available in the Dutch system (EPSG:28992). Make sure you download the polygons in EPSG:28992. Also make sure you download only the municipalities for Zuid-Holland and not for the whole Netherlands.<aside> 💡
Ensure your final table contains data in the Dutch coordinate system (EPSG: 28992), as this is a requirement for the next step.
</aside>
Create a RESTful API using FastAPI (recommended) or Flask to serve your data. Your response format should be GeoJSON or JSON (as further explained below). Make sure you create the following endpoints:
1. Collections Endpoint
GET /collections - List all available municipalities
2. Municipality-based Endpoints
GET /collections/{municipality}/items - Get all buildings in a municipality in a GeoJSON object (a “FeatureCollection”).