Assignment 2

Generalisation of a 3D city model

Deadline is 22 March 2023 at 01:45 pm

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 3 (and thus submit only one solution for all of you). If you prefer to work alone or in pairs, it’s also fine.

The assignment is worth 20% of your final mark.

cover



Overview

The aim of this assignment is to generalise a 3D city model, from buildings in LoD2 you need to generate two extra LoDs: LoD1.2 and LoD0.2.

You will have to write a software that reads a CityJSON file that contains buildings in LoD2.x, and you will need to add the two LoDs and output a file containing 3 LoDs for each building.

Definitions of the LoDs

An improved LOD specification for 3D building models. Filip Biljecki, Hugo Ledoux, and Jantien Stoter. Computers, Environment and Urban Systems, 59: 25–37, 2016.
PDF DOI BibTeX
@inproceedings{Biljecki16c,
  author = {Biljecki, Filip and Ledoux, Hugo and Stoter, Jantien},
  booktitle = {Computers, Environment and Urban Systems},
  pages = {25--37},
  title = {An improved {LOD} specification for {3D} building models},
  year = {2016},
  vol = {59},
  doi = {10.1016/j.compenvurbsys.2016.04.005}
}

Methodology/workflow to use

You have to use C++ and eventually the CGAL library to do this assignment. You are not allowed to use other external libraries (or ask on discord for specific ones).

Your code needs to be a single binary/executable that reads one CityJSON file, and outputs a new one containing the added LoDs.

You can use any packages of CGAL.

You can use that starting code, which contains a few examples to help you.

LoD1.2 specifications

The LoD1.2 should be reconstructed as follows:

That is, the ground should be at the height of the ground of the LoD2.2, and the height of the roof should be set at 70% of the difference between the eave and the ridge. Calculating the heights of the eave and the ridge is not an exact science, we ask you to describe in your report how to computed it and why you think it’s robust against different inputs.

The LoD1.2 should be a Solid and be geometrically valid (verify this with val3dity).

LoD0.2 specifications

The LoD0.2 should contain only the ground surface and be a MultiSurface embedded in 3D space and having the correct elevation.

It should also be geometrically valid.

Input data to test your program?

In the GitLab folder /data/ there are a few files that you can use to test.

You should test your implementation with more data, here are some sources:

  1. https://www.cityjson.org/datasets/
  2. https://3d.bk.tudelft.nl/opendata/opencities/
  3. https://github.com/OloOcki/awesome-citygml

Requirements for the program

It should take one argument (the input CityJSON file), and output in the same folder as the program a new file called out.city.json.

The demo code for hw02 shows how this can be done.

Requirements for the CityJSON output

  1. CityJSON version 2.0 (both for input and output)
  2. the file should follow the same structure and have all the original content of the input file. The only difference allowed is that the order of the properties doesn’t need to be the same since your library might not allow you to have control over this.
  3. only Building and BuildingPart are to be generalised, other CityGML classes are to be ignored (but kept in the output files if they are in the input file)
  4. you should add the extra LoDs where the LoD2.x is already present, ie it could be directly for a Building or a BuildingPart.
  5. the file you produce must be schematically valid according to the CityJSON schemas (use cjval to verify this).

Some tips

Report

The short report (about 3-4 pages max!) should discuss:

  1. how you calculated the eave/ridge and other decisions you needed to take,
  2. the engineering decisions you took (why did you do it this way or not another way?), and
  3. the difficulties/issues you faced and how you solved them.

Also, a who-did-what? section should be in the report: explain how the tasks were divided among the members of the team. It needs to be relatively equal, and one member cannot only write the report, all have to work on at least one of the 5 attributes.

Marking

Criterion Points
report (quality/readability/etc) 3
code runs without modifications 1
code outputs schema-valid files 1
LoD0.2 quality 2
LoD1.2 quality 3

What to submit and how to submit it

You must hand in one ZIP containing:

  1. the code (several files possible) you wrote to do the assignment (CMakeLists.txt + *.h + *.cpp)
  2. a report in PDF format (not in Microsoft Word please)
  3. the file out.city.json that your program outputs for the input tudcampus.city.json

The name of the file consists of the studentIDs of the members separated by a “_”, for example 5015199_4018169.zip.

The structure of the ZIP should be:

5015199_4018169_4123169.zip/
  |-- data/
      |-- out.city.json
  |-- report/
      |-- report.pdf
  |-- src/
      |-- main.cpp
      |-- definitions.h
      |-- geomtools.h
      |-- geomtools.cpp
      |-- ... (you can add more here)
  |-- CMakeList.txt

Do not submit your assignment by email, but use this DropBox link.

[last updated: 2024-02-29 14:51]