Exercise 05: Working with XML and GML
- The learning goals of this exercise are as summarised as follows:
getting hands on experience with with software for validating CityGML datasets
getting familiar with the XML-representation of CityGML
larning how to edit and repair corrupted CityGML data on the level of the XML document
learning how to represent a CityGML dataset as a graph
Task 1: Data Validation
In diverse application scenarios, CityGML data can be corrupted, damaged, or incomplete. The CityDoctor application addresses these issues by checking and validating large CityGML files, automatically generating comprehensive validation reports. These reports can be helpful in identifying and fixing issues that could render the models unsuitable for potential downstream tasks. As a first step, you need to go to the official website and download the CityDoctor application. As an alternative, you can use the files provided via the moodle course. Double-click on the start.bat file to start the CityDoctor application. After a command window has popped up, you will see the following user interface
To import a CityGML file, click on the folder icon in the Tools / Controls section of the UI. The dialog illustrated in Figure 2 will open up. Simply choose the CityGML file provided on Moodle and load the document. For this exercise, no further parameter settings are required.
To conduct the check, click on the corresponding icon in the Tools / Controls section. The following dialog will open up:
CityDoctor support various geometric and semantic checks. You can enable or disable them, and specify further parameters related to the checks, here. Familiarize yourself with the different ckecks that are selected. More information on the various selectable checks can be found on the official CityDoctor2 website: https://transfer.hft-stuttgart.de/pages/citydoctor/citydoctorhomepage/de/. Once you’ve conducted the check, you can analyze the results by browsing through the elements and element details sections of the user interface. You can export a Report via the Write Reports function in the Tools / Controls section of the UI. You will find the report in the folder containing the start.bat file that you’ve used to start the CityDoctor UI.
- You should now be able to answer the following questions:
Please verbally describe the flaws that render file invalid.
Which of the selected checks was suited to identify the problems?
List three possible downstream tasks in which the detected issues would be problematic. Please justify your claims briefly.
Task 2: Representing the CityGMl Instance Document as a Graph
Please open the CityGML instance document in Notepad++ and take a look at how the file is structured. This is going to give you a better understanding on how CityGML works in practice. CityGML instance files can be represented as graphs, which can be advantageous for diverse applications. You can find a diagram displaying the graph structure of the CityGML instance document used in this exercise in the moodle course. Please download it and open it in using the Drawio web application (https://app.diagrams.net/ ). Your task now is to fill in the missing content into the boxes marked in red. While doing so, please be aware of the results of the evaluation that you previously conducted using the CityDoctor application. Your findings from this part of the exercise are going to be helpful during its third part.
- You should now be able to answer the following questions:
What are the characteristics of the resulting graph that you observe?
What could such graph representations of CityGML instance documents be applied for?
Task 3: Repairing the CityGML File
The final step is to repair the previously identified problems in the CityGML instance document. Your task now will be to edit the document in such a way that the Validation with CityDoctor will not find any issues. The following hints might help you in this process:
Keep the CityDoctor UI open, you can identify the coordinates of individual points here more comfortably.
Use the visualization provided in CityDoctor to enhance your understanding of the scene.
Take XLinks into account
Take gml_id into account
After completing your repairs, validate your CityGML file again in CityDoctor. There should be no errors detected anymore.
Submission
Once you are done, please submit the following as a single zip file.
A .pdf document containing the answers to the questions asked in the respective tasks.
The repaired CityGML model and its CityDoctor validation report
The .png file containing the CityGML graph