Assignment 3
Creating a 3D city model from public datasets
Deadline is April 15 at 11:59 pm
Late submission? 10% will be removed for each day that you are late.
The assignment is worth 20% of your final mark.
Overview
For this assignment you need to construct a 3D city model of the area of the TU Delft campus by combining two publicly available datasets in the Netherlands. The model must be delivered in the CityJSON format.
You will:
- take polygons from a topographic map (BAG), and extrude them to create LoD1.2 buildings. The height will be obtained from a point cloud (AHN3);
- reconstruct the terrain of the area. This will be a TIN formed of the AHN3 points (simplified!) and constrained to the buildings footprints; notice that the terrain is not shown in the image above;
- reconstruct, in 3D, the trees in the given area. It is up to you to choose how to best segment and reconstruct them (we give some tips below).
While the two required datasets are publicly available via PDOK, we have prepared and extracted the footprints for the area that is relevant for this assignment. You have to download yourself the AHN3 point cloud (sorry it’s just too large!).
Notice that this assignment is more exploratory, and less prescribed, than the 2 previous ones. There are therefore many different workflows/methodologies to produce the CityJSON files. We are interested in the solutions you come up with, those solutions are based on what you have learned so far in GEO1000, GEO1002, GEO1015, and this course. In the time given for this assignment (about 20% * 28h * 5ECTS = 28h per person), we do not expect you to provide a perfect solution; document what you’ve done and report how it could implement (see section below).
You’re allowed for this assignment to work in a group of 3 (and thus submit only one solution for all of you). If you prefer to work alone or in pairs, it’s also fine, but we really do not recommend it.
Discussing your solution with me (Hugo) and your classmates outside your group is very much encouraged (and gives you 1pt actually!). In other circumstances, this would be done in the (Geo)lab, but since this is not an option. In those meetings, each group should describe how they’re attempting to solve the problem, the results that they’re getting (so far) and provide feedback to the other group. Just take this into account: high-level discussions are a great way to improve your solution, but copying/pasting significant parts of the code from other groups will be considered as cheating.
Description of datasets
BAG
The Basisregistraties Adressen en Gebouwen (BAG) is a register of buildings and addresses in the Netherlands.
It includes building footprints and some valuable attributes such as the year of construction (bouwjaar
).
(a GeoJSON file is a simple JSON files for 2D GIS data, you can open it with QGIS, like a shapefile)
AHN3 point cloud
The Actueel Hoogtebestand Nederland (AHN) is a national elevation map (point cloud) of the Netherlands that is maintained by the Dutch water boards.
The AHN3 dataset is distributed in the ASPRS LAS format.
You can download the dataset from this PDOK page. Select the correct tile and download the right format (Puntenwolk/LAZ).
Note: Because of the large filesize (~3.5 GB!) it is strongly recommended that you clip it using the provided polygon that delineates the study area. You can do this in a preprocessing step.
Note: In addition, you may want to use thinning in order to make your code run faster during testing and development.
Requirements for the CityJSON output
- the output CRS is EPSG:7415
- use CityJSON version 1.0
- the file you produce must be valid: both according to the schema and the 3D geometries must be valid. This tutorial is helpful.
- validation of geometry: use val3dity.
- validation of the structure of a CityJSON file: this can be done with cjio and the function “validate”.
Building
- each of the footprints you extrude will become a Building;
- the geometry of the building must be a solid valid according to ISO 19107;
- the LoD of the building is
"lod" = 1.2
; - the building ground surface should be at the elevation of the terrain;
- the following semantics surfaces should be assigned to the surfaces of the solid:
"RoofSurface"
,"GroundSurface"
, or"WallSurface"
; - the ID of each Building (the key to be used to index it in the CityJSON file) is the attribute
identificatie
; - if you want, for fun (no points), you can replace your BK-City extruded buildings by the LoD2 you find there. I did this for the image above, not mandatory.
- the following three attributes must be stored:
BAG | CityJSON attributes |
---|---|
bouwjaar |
yearOfConstruction |
(calculated from AHN3) | measuredHeight |
(derived from height) | storeysAboveGround |
Trees
- each tree should be a SolitaryVegetationObject
- it should be represented by a solid (the top part of the tree) and a trunk
- for the solid part, we recommend using the convex hull of points, but an alpha-shape could also be possible;
- the LoD of the tree can be
"lod" = 2
- the ID of each tree should be a generated UUID (Python UUID)
- no attributes or semantic surfaces are required for the trees
- how you isolate each tree from the AHN3 dataset is up to you, and we are aware that this is a difficult task… Be creative.
Terrain
- there should be one City Object of type TINRelief
- it should be represented by a CompositeSurface formed of triangles
- do not keep all the points of the AHN3 dataset, this is too big. Simplify/thin the points so that there is about 1pt/5m^2 (rough estimate, it’s up to you)
- the LoD of the terrain can be
"lod" = 1
- the terrain should cover the whole area (i.e. have triangles “under” the buildings), and be topologically consistent with the buildings: the triangles should not intersect the triangles of the ground surfaces of the buildings’ footprints
- the trees do not need to be topologically connected to the terrain
Methodology/workflow to use
You are free to use any tools you want to prepare the data, including QGIS, FME, and Python. However, there are some exceptions: tools that perform the whole workfow automatically (eg 3dfier for the buildings, or others you could find online) are not allowed (in doubt, just ask on discord). You have to write the building extrusion code yourself. You need to find and implement yourself the methodology.
The language you use to process the data is up to you, but we recommend using C++ for the AHN3 processing. Last year, for a similar assignment, students (who used Python) had to wait around 24h for results, and some were late because of this! Notice that it’s perfectly fine to perform some tasks with QGIS, then simply implement some in Python, and do the heavy parts in C++.
Some tips for software and libraries:
- to clip and/or convert the AHN3 point cloud to other formats (eg LAS), use the utility
las2las.exe
from the LAStools (in the/bin/
folder, it’s a command-line interface). - to handle GIS geometries and their attributes with Python, we recommend Fiona.
- to manipulate GIS data (Boolean operations, point-in-polygon, etc), we recommend Shapely (intallation under Windows seems tricky for some, follow these instructions). The manual of Shapely is awesome, read it.
Marking
- 45% the quality of the report you submit
- 45% the created CityJSON file: how complete it is? errors? everything has been taken into account? etc (15% for each of the 3 parts (terrain/buildings/trees) necessary)
- 10% discussion with Hugo and the other team of your choice
The discussion with the other team can be whenever and with whoever you want.
The discussion with Hugo should be either on 2021-03-29 or 2021-03-31 during the contact hours, just book a timeslot there. We will meet in discord geo1004 voice channel.
The report should have the following four sections, and only these. We expect a report of ~12-15 pages (including figures). Focus on the parts where you had the most difficulties, and describe the solution you designed (and discuss potential alternatives that you considered).
1. Overview of the methodology used (25%)
- give the overview of your methodology with for instance a flowchart; draw.io allows to make simple and nice ones for free.
- explain each of the main steps you took
- explain how you extruded the buildings (average, median, others?), and give us details: median, average, buffered something?
- what classes of the AHN3 point cloud do you use and how? How well does it match with the BAG polygons? Are there any temporal mismatches?
- there is no need to describe in details the obvious parts (eg reading of the files, selecting features based on attributes, etc.).
- what methodology did you use to reconstruct in 3D the trees? In hindsight, and if you had had more time: which methods would you have used?
2. Pros and cons of the methodology implemented (15%)
- discuss the quality of the result you obtained
- if you had to redo it, would you do it differently?
- if your resulting file is not valid (syntax and/or geometry), explain us what caused this.
3. Contributions of the members (5%)
- explain clearly who did what
- it cannot be that one person only wrote the report, all have to work on crunching the data
- tip: the buildings and the trees can be constructed independently, so each member can focus on one.
4. Feedback from the meeting with the other group (5%)
- Use a small section of your report to describe how the other group you met was progressing (at the time you met).
- Focus on what they’re doing differently.
Further reading (not mandatory, not at the exam, just as references)
- Height references of CityGML LOD1 buildings and their influence on applications, 2014, Proceedings of the 9th 3DGeoInfo Conference. By Filip Biljecki, Hugo Ledoux and Jantien Stoter [PDF]
- have a look at the software 3dfier for some inspiration.
- Topological consistent 3D city models obtained by extrusion, 2011, published in International Journal of Geographical Information Science, Volume 15, nr 4, pages 557-574. By Hugo Ledoux and Martijn Meijers [PDF]
- LOD Generation for Urban Scenes, 2015, ACM Trans. on Graphics, 34(3). By Verdie Y, Lafarge F, Alliez P. [PDF]
What to submit and how to submit it
You must hand in one ZIP containing (`student_numbers.zip):
- your single CityJSON file
- a report in PDF format (not in Microsoft Word please)
- the code (several files possible) you wrote to do the assignment. I will not run it per se, but I want to make sure you wrote it yourself and didn’t just use someone else’s code.
Do not submit your assignment by email, but use that surfdrive link.
[last updated: 2021-03-22 09:35]