INTEGRATING QUALITY MANAGEMENT INTO A 3 D GEOSPATIAL SERVER

In recent years the technology and workflow for producing and management of large 3D urban models has been established and widely been used. Standards such as CityGML enable the modelling and exchange of semantically enriched multi-purpose 3D urban models for applications like urban planning, public participation, environmental simulation and navigation. However, data quality management is essential to control and enhance the quality of these models in order to be able to meet the needs of the aforementioned applications. Quality management should be performed throughout the whole lifecycle of geospatial datasets—from data acquisition to processing, analysis and visualisation. In this paper, we therefore focus on the integration of a quality management software module into a 3D geospatial data server. First results of a prototype system developed at HFT Stuttgart together with Fraunhofer IGD will be presented in this paper as a starting point for further research into the field of quality management of 3D city models.


INTRODUCTION
As 3D city models are more and more used for different applications like urban planning, energy management or disaster and emergency management, the need for high-quality data becomes apparent.The various users of city models have different understandings of the term high-quality1 .For example, in a tourism application it is crucial that there is a high coverage of textured models, whereas this aspect is rather irrelevant for noise emission calculation and the like.Nevertheless, the different application areas also have common requirements: they need data that is up to date, complete and very accurate.In the past, geospatial data was kept in various data sources with very heterogeneous structures and formats.This made it hard to use them for more than one application.Apart from that, the different datasets were typically not stored in a common place.This led to a state where a lot of information is stored redundantly with diverging quality-in terms of up-to-dateness, completeness and accuracy.
3D geospatial data management systems mitigate this problem by managing city models and related information in a common database.They also provide means to keep the dataset up to date; mostly by providing a graphical user interface with the capabilities of adding objects as well as replacing existing models with higher detailed ones.
Most geospatial data management systems also support standardized OGC web services and data exchange formats.This enables a wide range of software products to access the data in the common database and to use it for specialized applications.In such cases, the geospatial data management system should make sure data fulfils the user's requirements.Hence, data quality management should be an integral part of the system, controlling quality throughout the whole lifecycle of the 3D city model: from data acquisition to actual usage.
Besides the quality aspects already mentioned-up-to-dateness, completeness and accuracy-data sets must also be free of geometrical problems, especially for applications where data is used for simulations and analyses based on mathematical algorithms.As a first step of combining quality assurance processes and geospatial data management, we present in this paper our results of integrating a quality assurance component into a 3D geospatial server.We focus on geometrical problems since we believe them to be of crucial importance for a wide range of applications.The quality management component has been developed by the HFT Stuttgart.We integrated them into the CityServer3D, a 3D geospatial data management system developed by the Fraunhofer IGD.In this paper we will first summarize the mathematical background.We will then present how the integration of the software components was performed.The paper concludes with the results of analysing a dataset from a real-world example.

RELATED WORK
The need for quality management for geospatial data has long been recognized.In 1995, Guptill and Morrison described the seven elements of spatial quality: Lineage, Positional Accuracy, Attribute Accuracy, Completeness, Logical Consistency, Semantic Consistency and Temporal Information (Guptill and Morrison, 1995).These elements are rather general-they do not depend on a special data model or dimension-and so they have been widely applied to other areas as well.For example, MacEachren et al. use the elements in the area of uncertainty visualisation.They also add qualitative attributes like credibility of the data supplier, subjectivity, and others (MacEachren et al., 2005).Van Oort uses the elements to perform fit-for-use assessment of datasets (Van Oort, 2005).He also extends the list by adding qualitative attributes like the usage and the purpose of the respective dataset.Apart from that, he states that the advantages of assessing and managing spatial data quality metadata has widely been recognized, but not yet brought to application-probably due to obstacles in implementations or workflows.
International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XXXVIII-4/C21 28th Urban Data Management Symposium (UDMS 2011), September 28-30, 2011, Delft, The Netherlands The works above deal with spatial data in general, but they do not focus on the specifics of 3D city models.The additional third dimension makes the problem of quality assessment in the geometrical sense a lot more complex.For example, sometimes face normal vectors do not point inside a solid geometry or faces are not properly connected.Apart from that, 3D city models are used in very specific applications with special quality requirements.For example, solar potential analyses highly depend on a model that is properly annotated with semantic information, but classification techniques can only succeed if the geometry does not contain contradictions.Apart from that, creating a physical model out of a virtual one using a 3D printer device does not work if the faces in the model are not connected correctly or-even worseif they are not connected at all.Due to this, work has been conducted to perform quality management on 3D geodata as well.For example, Kazar et al. describe methods for validating polygonal 3D geometries inside an Oracle database (Kazar et al., 2008).Nevertheless, this approach does not include healing capabilities.Krämer et al. concentrate on defining quality measurements for 3D city models (Krämer et al., 2007).Besides, this work includes simple algorithms for quality assessment and healing of geometries, although they are not very elaborated.More about automatic healing of 3D city models can be found in the paper by Bogdahn and Coors (Bogdahn and Coors, 2010).
In this paper we continue the work of Bogdahn and Coors and go one step further.We present the results of integrating validation and healing operations in a 3D geospatial server tailored to management and provisioning of urban models.

VALIDATION OF 3D CITY MODELS
In CityGML a building geometry is usually modelled as a set of Solids or as a MultiSurface.While a Solid represents the boundary of a rigid body, a MultiSurface is just a set of Polygons with no further constraint.According to the CityGML standard document, the volumetric parts of an object's geometry should be modelled using Solid elements, while the non-volumetric parts should be represented by MultiSurface elements (Gröger et al., 2008, p. 61).
The Linear Ring is the fundamental element to describe 3D geometries in CityGML.Every single polygon of a building geometry is defined by its boundary-the Linear Ring.In the following we define the geometry of a Linear Ring element.
A sequence is an ordered list of elements.Unlike a set, order matters, and the exact same elements can appear multiple times at different positions in the sequence.A finite sequence a with n + 1 elements is denoted as a = (a0, a1, . . ., an).The empty sequence a = () has no elements.
A finite sequence of points R = (P0, P1, . . ., Pn), n ≥ 3, Pi = (xi, yi, zi) is a Linear Ring iff (i) the first and last point P0 and Pn represent the same point: P0 = Pn (closeness) (ii) all points of the sequence besides start and end point are different: No other intersection is allowed (no self intersection).
If all points of the sequence are co-planar, the Linear Ring is planar.
The area enclosed by a planar Linear Ring (including the Linear Ring geometry) is a Polygon.The orientation of the polygon is given by the order of points within the sequence that defines the Linear Ring.
A solid geometry represents a rigid body.The surface of the solid is defined by a set of polygons with the following properties: The set C = {S1, S2, . . ., Sn} of polygons bounds a solid iff: (i) The intersection of two polygons S k and S l of C is either empty or contains only points P and edges e that are part of both Linear Rings.The polygon S k is defined by the Linear Ring R k = (P k 0 , P k 1 , . . ., P k n ).The intersection of S k and S l equals: (ii) Every edge e k = P k i P k i+1 of a Linear Ring R k = (P k 0 , P k 1 , . . ., P k n ), defining a polygon S ∈ C, is used exactly once as an edge ei = P l j P l j+1 in a Linear Ring R l = (P l 0 , P l 1 , . . ., P l m ), defining another polygon S l ∈ C with P k i = P l j+1 and P k i+1 = P l j .
(iii) All polygons in C are oriented such that the normal vector of each polygon points to the outside of the Solid.
( It follows from (i) and (ii) that the surface defined by C has no holes.Together with conditions (iv) and (v) it follows that the inner of the solid defined by C is connected.

Validation and Healing
In order to validate the geometry and topology of 3D city models we have developed a modular software framework that enables the user to define own check classes or pick some of the existing checks.Currently, checks are available for Linear Rings and Solids based on the above given definitions: • C-LR-1: check that a Linear Ring consists of at least 4 points From practical point of view, Linear Rings that are not exactly planar should be accepted as well.Intuitively, a Linear Ring R would be defined as planar if there is a plane E with distance d(E, Pi) less than a given threshold for all points Pi of R (see figure 1).However, this is true for Linear Rings with small bends and folds as shown in figure 2 as well.In order to avoid such situations, a slightly different definition of planarity of Linear Rings is introduced: A Linear Ring R is planar iff it is a valid Linear Ring and the distance of all points to any plane E ijk , that is defined by three co-linear points Pi, Pj and P k is less than a given threshold: We have specified three different algorithms for C-LR-5 to allow almost planar Linear Rings.The first algorithm takes three nonlinear points from the Linear Ring and checks that the distance of the plane defined by these three points to all other points of the ring is less than a given threshold.It works well for most of the available models, but it allows bends and folds as well.
To avoid this, a second algorithm was specified that takes into account all possible planes defined by any combination of three non-linear points of the Linear Ring.An alternative check is to triangulate the polygon defined by the Linear Ring and check the largest angle between the face normal of all pairs of triangles.
Apart from the checks for Linear Rings, we also defined checks for Solids:  If one of the checks fails, we try to heal the model.This is currently not possible for all checks.For Linear Ring elements, healing is applied for C-LR-2 by inserting a closing point, for C-LR-3 by removing redundant points, and for C-LR-4 by inserting additional points in case of point intersection.After healing, the Linear Ring can still contain errors, so it is validated again.If C-LR-1 or C-LR-5 fail, the model cannot be healed so far.For Solid elements, healing is applied for C-Solid-3 (flip orientation) and for C-Solid-2 if there is a Linear Ring of edges that bounds only one polygon-this is a hole that can be closed.

INTEGRATION INTO THE CITYSERVER3D
The quality assurance framework is currently provided as a software library that can be used by different geospatial applications.As a first step, it has been integrated into the geospatial management application CityServer3D3 developed by the Fraunhofer IGD.This product consists of a server component that saves geospatial data in an object-relational database as well as several client applications that can be used to edit and visualize the data.Apart from that, the application supports several standardised data exchange formats like CityGML, KML, X3D as well as OGC service interfaces like W3DS.
To control the test parameters the CityServer3D's client UI has been extended.The user is able to select the different test algorithms, execute them and then review the results.The errors found and the proposed changes are displayed in a table view.
By clicking an entry in this table, a 3D visualisation will be presented, comparing the original object with the fixed one.The user can then decide if he likes to apply the proposed fix or not.After that, changes can be written to the database or exported as a file in the CityGML format, for example.The test results will be saved in an ISO 19115 conformant way.Therefore metadata will be attached to evaluated objects.
Internally, the CityServer3D uses a common data model to hold the spatial objects in memory and to manage them in the database.This allows processing the data in a unified way.In order to use the quality assurance library, the data has to be converted.The CityServer3D uses a surface-based approach to describe geometries, so conversion can be reduced to simple schema mapping.
When fixes are applied, the corrected objects have to be converted back to the CityServer3D's common data model.Special care has been taken to avoid information loss during the conversionespecially regarding semantic information like topology and metadata.
Figure 4 shows how the quality assurance library integrates into the architecture of the CityServer3D.The library can be installed as a plug-in into the CityServer3D main client product-the socalled AdminTool.It is controlled by a special UI component that integrates tightly into the existing interface.Apart from that, the quality assurance plug-in has direct access to the 3D city model currently loaded into the AdminTool. 4A thin converter maps objects from the CityServer3D's internal data model to ones that can be managed by the quality assurance library and vice versa.

RESULTS
The validation algorithms have been tested with a 3D city model consisting of 2 650 building objects with LoD2 geometries.Some buildings consisted of several unconnected building parts.In total, 47 426 polygons were used, 3 326 polygons for ground surfaces, 38 732 polygons for wall surfaces, and 5 368 polygons for roof surfaces.Figure 5 shows the distribution of numbers of polygons per building.Figure 6 shows the results of validation and the success of automatic healing of the models.
The images show that the quality assurance library is already able to find a lot of geometrical defects in a real-world 3D city model.Apart from that, healing defects is also already possible for most of the identified buildings.
The development of the library as a closed system which can be used stand-alone or as an integrated component in other applications appears to be a sensible approach.Many existing applications with focus on 3D data management or manipulation can benefit from quality test capabilities.Integrated quality test functionality can also optimize workflows based on existing applications and increase acceptance among users.
The modular architecture of the CityServer3D allows adding new features through plug-ins.Integrating the library into the City-Server3D went quite well as it had only to be wrapped into a simple plug-in.Apart from that, a converter had to be implemented mapping the 3D city model from the CityServer3D's internal data model to objects understood by the library and vice 4 The city model can be imported from either a file or from the database.
versa.Although a dedicated user interface for the test algorithms already existed, we decided to extend the existing UI of the City-Server3D's AdminTool in order to allow a seamless integration.

•Figure 1 :
Figure 1: Almost planar linear ring Figure 3 shows an example of the dual graph of a given Solid.Each polygon in the Solid is represented by a node in the dual graph.Incident polygons are connected by an edge in the dual graph.C-Solid-4 validates whether the dual graph is connected.

Figure 3 :
Figure 3: The dual graph of the boundary of a solid

Figure 4 :
Figure 4: Architectural diagram showing the integration of the quality assurance component into the CityServer3D that is only built by polygons and edges that touch P , is connected.Each node v of VP represents a polygon whose Linear Ring contains P .Two nodes are connected by an edge e of EP iff the two polygons represented by the nodes have a common edge that touches P . 2 iv) All polygons in C are connected, that is the dual graph of C has a path containing all nodes.The dual graph GC = (VC , EC ) of C consists of a set VC of nodes and a set EC of edges.Every node v of VC represents exactly one polygon of C .An edge shared by two polygons S k and S l of C is represented by an edge e = (vS k , vS l ) in EC .(v) For every point P of a Linear Ring of a polygon of C applies: The graph GP = (VP , EP ),