# Ontology-Based Spatial Data Quality Assessment Framework
## 2 Materials and Methods
### Framework
#### 2.3.4 Sfo and Graphical User Interface  
Sfo is designed to be user-friendly and manageable by domain experts who may not have expertise in Semantic Web Technologies. A set of GUIs has been developed to facilitate ontology creation and modification, as shown in Figure 6.  
The GUIs allow domain experts to create and modify SfO based on the rules specific to their domain. Institutional specifications are often translated into hierarchical operations, such as adding or removing classes and subclass relations, which can be easily performed through the GUI. When using the GUI, the domain expert begins by selecting the appropriate category for the name entered into the text field. The categories available for selection include Class, Datatype Property, Object Property, and Individuals. When dealing with geometric classes, the domain experts specify the geometry type and select the appropriate spatial relations, such as \"Overlaps\", for the geometric classes. They can also define the restriction types, such as \"Forbidden\", \"Necessary\", or \"Equivalent\". \begin{table}
\begin{tabular}{l l l l} \hline
**Object Property** & **Domain** & **Range** & **Explanation** \\ \hline sdqo:iandb & Spatial Object & Spatial Object & The interior of the first feature intersects the boundary of the second feature. \\ \hline sdqo:iande & Spatial Object & Spatial Object & The interior of the first feature intersects the exterior of the second feature. \\ \hline sdqo:bande & Spatial Object & Spatial Object & The boundary of the first feature intersects the exterior of the second feature. \\ \hline sdqo:boundaryIntersects & Spatial Object & Spatial Object & The boundaries of the two features intersect. \\ \hline \end{tabular}
\end{table} 
Table 5: Sub-properties of the object property sdqo:interiorIntersects. For attribute-type rules relations such as \"Same\", \"LessThan\", \"LessThanEQ\", and \"OneOf\" are used to express the constraints. For example, in a specification that states a feature in the \"Contour\" class, representing line geometry (c1), must not cross over features in the \"Building\", \"Lake\", and \"Permanent Lake\", which is a subclass of class \"Lake\" classes, representing polygon geometry (c2). This specification rule can be represented in a CSV row format, as follows:  
\"c1, c2, Forbidden, Crosses, Contour, Building I Lake PermanentLake, timestamp_value\". During the optimization stage, the collected CSV rows are processed and translated into basic operations of the SfO ontology. Several rules govern the translation of CSV rows, which are produced after selection through the GUI, into SfO ontologies. Assuming that the given CSV data row is not modified during optimization, it would be transformed as follows:  
1. Create two top-level classes as direct subclasses of the appropriate SDQO classes, representing the crossing restriction. These classes can be automatically named based on their purpose and context. The first class is for features of lower dimensions. A sample description of the first class, named sfo:ClassCrf01, is shown in Table 6.
2. Create a class named \"Contour\" as a subclass of the first class in step 1. 3. Create classes named \"Building\", \"Lake\", and \"Permanent Lake\" as subclasses of the second class. 4. Incorporate timestamp values to indicate when regulatory changes take effect. By implementing these operations in the SfO ontology, one effectively captures the crossing restriction, and its associated classes as represented in Table 6, allowing for proper representation and management of the spatial data quality constraints. The timestamp \begin{table}
\begin{tabular}{l} \hline... \\ sfo:ClassCrf01 rdf:type owl:Class; \\ owlequivalentClass [ ow:intersectionOf (sdqxClassCross1 \\ [rdf:type owl:Restriction; owl:hasValue 1; owl:onProperty sdqx:subnrCross;] ); rdf:type owl:Class]. \\ \hline \end{tabular}
\end{table} 
Table 6: A top SfO class description in Turtle format. Figure 6: GUI to generate SfO ontology.