# Ontology-Based Spatial Data Quality Assessment Framework
## 2 Materials and Methods
### Framework
#### 2.3.4 Sfo and Graphical User Interface
values provide temporal context and facilitate tracking changes or updates related to the regulation. After the optimization process, the CSV rows will be sorted and potentially recombined for improving the organization and efficiency of the SfO ontology. The order of entities within a CSV row is selected with consideration for this optimization step. By analyzing the relationships and dependencies between entities, the optimization process can identify patterns and group related constraints together, leading to a more streamlined and coherent ontology structure. The sorting and recombination of CSV rows help ensure that the SfO ontology is organized logically and efficiently, facilitating easier management and maintenance by domain experts. The following notations are used in the CSV rows to indicate the types of entities involved in the constraints or relationships specified in the ontology. In the first two entities, the entities represented by \"c1\", \"c2\", \"c0\", and \"cc\" correspond to different types of classes:  
* \"c0\" refers to a geometric class of dimension 0 (point). * \"c1\" refers to a geometric class of dimension 1 (line). * \"c2\" refers to a geometric class of dimension 2 (polygon). * \"cc\" refers to a general class, possibly non-geometric. * \"d\", \"o\", and \"i\" represent different types of entities:
* \"d\" represents a datatype property. * \"o\" represents an object property. * \"i\" represents an individual. When specifying restrictions of the type \"distinct features in the same class\" (e.g., \"Buildings cannot overlap\"), the second entity has to be left blank. The third and fourth entries in the CSV line represent the constraint type and the name of the constraint such as the OGC spatial relations. In other cases, relations such as \"Same\", \"LessThan\", \"LessThanEQ\", and \"OneOf\" can be used. The fifth and sixth entries in the CSV line contain the actual names of the classes, properties, or entities indicated by the first and second entities. In the optimized version, the sixth entry can contain multiple classes separated by the pipe sign (\"!\"), indicating an \"OR\" situation. The last entry in the CSV line represents the timestamp. The ontology can be annotated with schema:startTime using that timestamp to indicate when the constraint or rule was reflected or updated. The class hierarchy above for sfo:PermanentLake to be tested with the \"mustNotCross\" rule is shown in Figure 7. This hierarchy represents the organization of classes within the SfO ontology and provides a visual representation of the relationships between the classes involved in testing the \"mustNotCross\" rule. Figure 7: A path of subclass relations in a SfO. Two points are essential in the reorganization process of CSV. 1. Establish an order among SfO classes There is an ordering only if there is a re(gu)lation involving the classes Smaller dimension smaller class, otherwise lexical order
2. Smaller class needs to be a single subclass, larger classes can have siblings. Example sfo01:ClassCrf07 Crf07 Crosses first 07 (Crosses relation, smaller side, there were 6 more before) sfo01:ClassCrs07 Crs07 Crosses second 07 sf01:Road the sole subclass of sfo1:ClassCrf07 sfo1:Building and sfo01:Parcel subclasses of sfo01:ClassCrs07 Reorganize (Split Reorder Combine) CSV rows Algorithm Sample triple of CSV rows: c2, c2, Forbidden, Overlaps, b1, b2, 8599.99 c1, c2, Forbidden, Crosses, class1 class5, class4 l class3 l class2, 8600 c1, c2, Forbidden, Crosses, class11, class13, 8600.01 Meaning: b1 and b2 are of dimension 2 and they (features in these classes) cannot overlap class1 and class5 are of dimension 1 and they cannot cross class4, class3, class2, which are of dimension 2 class11 of dimension 1 cannot cross class13 of dimension 2.