Assignment 01-retake
Creating an LoD2 building by extrusion
Deadline is 26 June 2020.
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 (and thus submit only one solution for both of you). If you prefer to work alone it’s also fine.
- Overview
- What we give you
- Requirements for the CityJSON output
- Further requirements and tips
- Deliverables
- Marking
- Submission
Overview
For this assignment you are given a planar partition of the footprint of our faculty building. It is the so-called final roof partition of the building reconstruction method described in Handout 2.1 (Section 3.2.1). Each roof part has the corresponding roof plane parameters as attributes (ie. the a
, b
, c
, and d
parameters of the ax + by + cz + d = 0
equation).
The aim of this assignment is to write a script that creates a watertight and valid LoD2 mesh from this roof partition.
The resulting mesh should consist of
- the roof faces (elevation from the provided roof planes),
- one floor face (on a horizontal plane at 20cm elevation), and
- the wall faces that connect a) the floor face with a roof face (eg on the outer boundary of the building) or b) a roof face with a roof face (eg for a wall between two adjacent roof parts that have an elevation discontinuity at their shared edge in the roof partitions). Wall faces should be perfectly vertical.
The mesh should be written as a CityJSON file.
What we give you
This zip file contains 5 GPKG vector files; one for each BAG (Basisregistraties Adressen en Gebouwen) footprint in bk city.
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”.
Further requirements and tips
- Handout 2.1 Section 3.2.2 gives some ideas on how to do the extrusion.
- Your script should work for the general case (ie. any roof partition input). Do not hardcode your solution so that it only works well with the bk city inputs.
- Make sure to semantically label the roof, wall and floor parts of the building in the CityJSON file.
- You may want to use a topological data structure such as the doubly connected edge list (DCEL) to perform the extrusion. Not mandatory.
- You can use all the python standard libraries and Fiona to read the GPKG files. Other libraries are not allowed (in case of doubt ask me).
Deliverables
You have to submit 2 items:
- Your code. The main file (the one that I will run) needs to be named
geo1004_hw01r.py
and follow the specifications below. - Report in PDF format (please no Word file)
Code specifications
Your Python source file(s) need to have the following text at the very top:
#-- GEO1004.2020--hw01r
#-- [YOUR NAME]
#-- [YOUR STUDENT NUMBER]
The main file to run your code should be named geo1004_hw01r.py
and the first argument should be the input file and the second argument should be the output file. I should thus be able to execute the code by calling the main file like this:
python geo1004_hw01r.py <input GPKG> <output CityJSON>
For example:
python geo1004_hw01r.py bk-1.gpkg your-output.obj
Apart from that you are free to organise your code to your liking.
The report to submit
You need to submit a report explaining briefly how you implemented the key parts (data structures, how you perform the extrusion, etc.) and explain what works (and what not).
We expect maximum 1500 words for this.
Marking
Marks | |
---|---|
followed all specifications and runs without modifications | 1 |
report quality/clarity | 4 |
extrusion method | 3 |
sematic labels for floor/wall/roof surfaces | 1 |
output valid | 1 |
Submission
- Do not submit your assignment by email, but upload the requested files to this Dropbox file request page.
- Upload your files as one zip file.
- The name of the zip file should contain the family names of your group member separated by an underscore like this:
FamilyName1_FamilyName2.zip
. - You’ll get a confirmation email when everything has been successfully uploaded, keep it in case things go wrong.