MSc Geomatics GEO1008 February-April 2019

Assignment 3: Creating a 3D city model from public datasets

Deadline is Monday 11 March 2019 at 8:30.

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 maximum 4 (or less if you want, but we don’t recommend it)



Overview of the assignment

For this assignment you need to combine 3 public Dutch datasets (BGT, BAG, AHN3) to create a 3D city model for a neighbourhood of the city of Leiden, this model must be delivered both in CityGML and CityJSON. You will take polygons from a topographic map (BGT) and enrich them with elevation information from a point cloud (AHN3). In addition you will need to

  • perform a semantic mapping of the BGT features to the standard CityGML classes,
  • translate attribute values from Dutch to English,
  • perform a temporal filter on the BGT features so that only current features are selected, and
  • transfer attributes from another building dataset (BAG) to the BGT building features.

Our region of interest is the following neighbourhood of the city center of Leiden:

While all datasets are publicly available via PDOK, we have prepared a zip archive for you that includes most things you will need for this assignment.

The zip file contains

  • BGT dataset for the study area (only polygonal features)
  • BAG dataset for the study area
  • translation tables
  • polygon with the extend of the study area (see map above)

Note that the AHN3 point cloud is not included (it’s too large!). You must download it yourself from PDOK.

Description of datasets

BGT

The Basisregistratie Grootschalige Topografie (BGT), which is currently still under production (the municipality of Leiden has been one of the first to complete it), is the most detailed topographic map of the Netherlands. Its information model (IMGeo) is in fact modelled as an Application Domain Extension (ADE) of CityGML. However, for this assignment we will only use features from the standard CityGML modules.

Note that in the BGT each feature has an ‘end-of-life’ timestamp associated to it (the eindregistratie attribute). If this property has no value, it means the feature currently exists physically in Leiden. If it has a value it means that it has existed in the past, but is now gone. You should use only features that exist now, otherwise you will have many overlapping features.

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).

You will need to spatially link the building footprints from the BAG with those of the BGT in order to transfer the attributes between matching features.

Note that the building footprints of the BAG do not match exactly with those of the BGT.

AHN3

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. Highly relevant for this assignment are the classification codes. AHN3 uses the codes 1, 2, 6, 9 and 26 as illustrated in the following image (each class has its own color).

In contrast to the other datasets, you will have to download AHN3 directly from its PDOK public download 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.

Semantic and geometric mapping requirements

Use the following table to map the BGT features to CityGML.

BGT class CityGML class
BegroeidTerreindeel PlantCover
OnbegroeidTerreindeel LandUse
OndersteunendWaterdeel PlantCover
OndersteunendWegdeel AuxiliaryTrafficArea
Overbruggingsdeel BridgeConstructionElement
OverigBouwwerk GenericCityObject
Pand Building
Scheiding GenericCityObject
Waterdeel WaterBody
Wegdeel TrafficArea

A full specification of how to populate which CityGML attributes as well as minimal geometric requirements are given below per CityGML class.

The geometries that you are creating must be valid according to ISO 19107.

Note: CityGML attributes that are directly mapped from BGT/BAG attributes must be translated from Dutch to English. Translation tables are provided as .csv files in the translation directory of the zip archive.

AuxiliaryTrafficArea

CityGML attribute Origin
creationDate BGT:tijdstipregistratie
class BGT:bgt_functie
surfaceMaterial BGT:bgt_fysiekvoorkomen

Geometry: 2.5D surface

BridgeConstructionElement

CityGML attribute Origin
creationDate BGT:tijdstipregistratie

Geometry: 2.5D surface or solid

Building

For these you will have to spatially match the BAG features to the BGT features to join the attributes. Use the BGT footprints to obtain your LOD1 building models. In order to populate the storeysAboveGround attribute you can make an educated guess of the average storey height.

CityGML attribute Origin
creationDate BGT:tijdstipregistratie
yearOfConstruction BAG:bouwjaar
class BAG:gebruiksdoel
storeysAboveGround Derive from elevation

Geometry: solid

You may assume the building footprints to have an elevation of 0.

LandUse

CityGML attribute Origin
creationDate BGT:tijdstipregistratie

Geometry: 2.5D surface

PlantCover

CityGML attribute Origin
creationDate BGT:tijdstipregistratie
class BGT:bgt_fysiekvoorkomen
class BGT:bgt_type

Geometry: 2.5D surface

GenericCityObject

CityGML attribute Origin
creationDate BGT:tijdstipregistratie
class BGT:bgt_type

Geometry: 2.5D surface

TrafficArea

CityGML attribute Origin
creationDate BGT:tijdstipregistratie
class BGT:bgt_functie
surfaceMaterial BGT:bgt_fysiekvoorkomen

Geometry: 2.5D surface

WaterBody

CityGML attribute Origin
creationDate BGT:tijdstipregistratie
class BGT:plus_type

Geometry: flat/horizontal surface surface at fixed elevation

Validation

Use these validators to ensure you have a valid CityGML file:

Methodology/workflow to use

You are free to use any tools you want, including QGIS and Python. There are some exceptions: tools that perform the whole automatically (eg 3dfier, or others you could find online) are not allowed (in doubt, just ask on the GEO1008 forum). You need to find and implement yourself the methodology.

Notice that you can either create a CityGML file and convert it to CityJSON, or the other way around. We think it is simpler and easier to work with JSON, and we thus recommend working with CityJSON and converting at the end to CityGML. There is a software to automatically convert CityJSON <-> CityGML.

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. We will not mark nor see your code, only the final CityGML/CityJSON files.

  • 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, we recommend Fiona.
  • to manipulate GIS data (Boolean operations, point-in-polygon, etc), we recommend Shapely. The manual of Shapely is awesome, read it.
  • Python can read/write natively JSON: import json
  • to triangulate polygons there is triangle.
  • use this small Python helper script to help you understand the Python packages above (with this input).
  • this “extruder” code shows you how to extrude footprints to solids, you are allowed to reuse that code.
  • citygml-tools allows you to automatically convert CityGML files to CityJSON, and vice-versa. Download its latest release and use /bin/citygml-tools (no need to compile anything).
  • the official CityGML website (www.citygml.org) has currently no information. We’ve put the old website there, since there are useful things (we were in charge of it until December 2018).
  • how to view your datasets?

Important to know

  1. the output CRS is EPSG:7415
  2. use CityGML version 2.0.0
  3. use CityJSON version 0.9
  4. follow exactly the provided attribute and class mappings!
  5. no need to fill the ‘vertical gaps’ after lifting to 3D the surfaces (as shown in the slides presenting the assignment)

Marking

  • 50% the quality of the report you submit
  • 50% the created CityGML file: how complete it is? errors? everything has been taken into account? etc

The report should have the following four sections, and only these.

1. Overview of the methodology used (20%)

  • 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 “lifted” to 3D the buildings/water (average, median, others?), how you lifted the roads and other classes needed (give details, since these will influence the end results). 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 BGT 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.).
  • how do you join the BAG building footprints with those of the BGT? Are all buildings matched? Are there any mismatches?

2. Pros and cons of the methodology implemented (20%)

  • 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 different classes of CityGML (buildings, terrain, roads) can be constructed (almost) independently, so each member can focus on a few.

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 and the documentation (at cityjson.org) to help you: was everything clear? how could it be improved concretely?
  • (it’s mostly to help us make CityJSON better)

We expect a report of around 15 pages (including figures).

Further reading (not mandatory, not at the exam, just as references)

  1. OGC City Geography Markup Language (CityGML) Encoding Standard Version 2.0.0, 2012 [PDF]
  2. val3dity documentation
  3. CityGML goes to Broadway, 2015, published in Photogrammetric Week ‘15, pages 343-356. By Thomas H. Kolbe, Barbara Burger and Berit Cantzler [PDF]
  4. 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]
  5. 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]
  6. LOD Generation for Urban Scenes, 2015, ACM Trans. on Graphics, 34(3). By Verdie Y, Lafarge F, Alliez P. [PDF]

Deliverables and submission

You must hand in ZIP containing

  1. your CityGML file
  2. your CityJSON file
  3. a report in PDF format (not in Microsoft Word please)

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).

You’ll get a confirmation email when everything has been successfully uploaded, keep it in case things go wrong.


last updated: 02/28/19 (08:14:04)