Assignment 03
Creating a 3D city model from public datasets
Deadline is 6 April 2020 at 09:00am.
Late submission? 10% will be removed for each day that you are late.
You’re allowed for this assignment to work in a group of 2 or 3 (and thus submit only one solution for all of you). If you prefer to work alone it’s also fine, but we don’t recommend it.
- Overview of the assignment
- Description of datasets
- Requirements for the CityJSON output
- Methodology/workflow to use
- Marking
- Further reading (not mandatory, not at the exam, just as references)
- What to submit and how to submit it
Overview of the assignment
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 in 3D the trees in the given area. It is up to you to choose how to best 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, we do not expect you to provide a perfect solution; document what you’ve done and report how it could implement (see section below).
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 you 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, there are binaries for Windows and macOS.
- 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;
- you may assume the building footprints to have an elevation of 0;
- the LoD of the building is
"lod" = 1.2
; - 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
; - 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.
Methodology/workflow to use
You are free to use any tools you want to prepare the data, including QGIS, FME, and Python. 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 the GEO1004 forum). You have to write the building extrusion code yourself, preferably in Python, but any language is allowed You need to find and implement yourself the methodology.
We recommend using Python with a few packages, as described below. Notice that it’s perfectly fine to perform some tasks with QGIS, and then simply implement in Python some other parts.
- 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.
- Python can read/write natively JSON:
import json
- use this small Python helper script to help you understand the Python packages above (with this input).
-
how to view your datasets?
- a macOS viewer for CityJSON: azul
- a simple web-viewer for CityJSON
- QGIS3 has a CityJSON plugin
- Blender has a CityJSON plugin to read files
- FME2020 has builtin support for CityJSON (read and write). You can also install for older version (or get the latest version) by compiling this code
- NINJa new code still in beta, but will replace the official web-viewer if it survives this assignment… (Let us know in the report or Discord chat)
Marking
- 50% the quality of the report you submit
- 50% the created CityJSON file: how complete it is? errors? everything has been taken into account? etc
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. Improvements to CityJSON and its docs? (5%)
- CityJSON is new and developed by us (the 3D geoinformation group)
- we would like you to give your informed opinion about the specifications, the documentation (at cityjson.org), and the different software used to process it: was everything clear? how could it be improved concretely?
- (it’s mostly to help us make CityJSON better)
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:
- your CityJSON file (all in one file)
- a report in PDF format (not in Microsoft Word please)
- the (Python) code you wrote to extrude and create the trees (can be more than one .py).
Do not submit your assignment by email, but use that Dropbox link. Make sure that you put the full name of one of the member of the team (only one is sufficient).
[last updated: 02/05/21 (13:49:43)]