**4. The spatial layer of the WS stack**

This chapter presents the integration process of spatial technologies and the Semantic Web technologies at the backdrop of Industrial Archaeology, and its associated tool called the spatial facilitator which is a query and rule engine. The technologies discussed in previous chapters are used and adjusted for processing the spatial knowledge through knowledge technologies within the Semantic Web framework in the research works. This chapter attempts to outline the methods and the processes of these adjustments and how they return the results through knowledge tools as SWRL and SPARQL.

The discussions of the last two chapters aim at laying a background on the concepts of integration process. The discussions on Semantic Web and its underlying technologies and the spatial technology in GIS in the last two chapters have clearly pointed out that the technical advancements toward semantic technologies are integrating every data structures so it will integrate spatial data structure in future. However, for now it is still a topic of

178 Semantics – Advances in Theories and Mathematical Models

based on Semantic Web technology to identify the objects and define them in the ontology. These objects once defined, performs as common schemas between data sources to achieve a sense of data interoperability. The definitions of objects add semantics to the objects and thus adding knowledge about the objects. Knowledge techniques based on Description Logics (DLs) exploit these semantics to manipulate implicit knowledge within the knowledge base. Inference engines utilize the definition of DLs to infer the knowledge base through Horn based rules. The knowledge base stored in OWL syntactic structure is inferred through SWRL to infer the rules. This inference is complimented through querying

Carrying the discussion from last chapter, this research attempts to use the Semantic Web techniques to perform spatial analysis in form of spatial SPARQL and spatial SWRL. The spatial analysis through Semantic Web can only be possible through providing spatial signatures to the defined objects in the ontology. This will allow the knowledge techniques to process spatial solutions. The spatial integration is carried out through OWL/RDF again and the spatial management is carried out again through tools as SWRL and SPARQL. This simplistic yet but effective approach of spatial integration into Semantic Web technologies

The Semantic Web stack shown in figure 5 and 6 can adjust a layer of spatial information into it. The research proposes such an arrangement in the stack. A layer of spatial data mixing seamlessly with the semantic proposition in the layer Ontology through its OWL/RDF based syntax can be envisaged. This layer since uses the standard syntax of OWL/RDF can perform spatial queries through SPARQL or infer rules through standards as SWRL. The next chapter discusses this integration process of spatial technology and Semantic Web technology which is undertaken by defining spatial FILTERs for SPARQL queries and spatial Built-ins for SWRL rules. Ideally the layer should be the top most layer of knowledge level but spatial layer does not yet possess any standards that are standardized by W3C so could not be placed there. It is hence placed as the bottom layer in the certificate level. The next chapter discusses this adjustment in stack in detail and how to

This chapter presents the integration process of spatial technologies and the Semantic Web technologies at the backdrop of Industrial Archaeology, and its associated tool called the spatial facilitator which is a query and rule engine. The technologies discussed in previous chapters are used and adjusted for processing the spatial knowledge through knowledge technologies within the Semantic Web framework in the research works. This chapter attempts to outline the methods and the processes of these adjustments and how they return

The discussions of the last two chapters aim at laying a background on the concepts of integration process. The discussions on Semantic Web and its underlying technologies and the spatial technology in GIS in the last two chapters have clearly pointed out that the technical advancements toward semantic technologies are integrating every data structures so it will integrate spatial data structure in future. However, for now it is still a topic of

provides the possibility to include different modes of data into its framework.

apply spatial queries and rules on any existing ontology.

the results through knowledge tools as SWRL and SPARQL.

**4. The spatial layer of the WS stack** 

with SPARQL.

research. It could be conceived from earlier discussions that the integration process requires adjustments of the spatial components within the ontological framework. This chapter is dedicated to discuss the steps and process of this adjustment. The spatial signature of objects plays an important role in determining them. The identification of objects is the process of signing these spatial signatures on them. These signatures should be integrated within the semantics of the objects seamlessly in order to process the spatial knowledge through the knowledge technology. It should be noted however that the Semantic Web technologies are in the maturation process and hence there exists certain processing problems within especially for the non-conventional data type as that of spatial data. Thus, it needs to be sorted out through the existing tested techniques. The research in GIS systems uses the capabilities of existing RDBMS to process the spatial data through spatial operations and functions and use the results of these processes.

The Semantic Web stack discussed in the previous chapter can be updated to address the inclusion of a spatial component. Every tangible object has its spatial signature and thus it becomes indispensable to address the spatial component within its semantic framework. The Semantic Web technologies and its architecture are mostly influenced by the nature of information available on the Internet. Hence, these levels deals mostly with managing the semantic based information through knowledge technologies. However, in recent years there has been huge surge of other forms of information on Web platform and they need to be managed as well. With the advancement in spatial technologies, the trend of disseminating spatial information through Web based environment is rapidly growing. This has raised the issue of the integration of spatial component into the Semantic Web framework.

A layer representing geospatial data in the Semantic Web stack can be placed just above the knowledge layers as could be seen in figure 7. As the technologies within knowledge level are standardized by W3C, the geospatial layer needs to be above the level. However, the technologies within knowledge level needs to blend spatial components seamlessly both syntactically and semantically to maintain the satisfiability required for the consistency of the ontology. This integration procedure should be adjusted within the knowledge tool within the knowledge level of the stack. This approach thus uses the knowledge techniques through adding the spatial structures within them and implementing the spatial knowledge processing along with semantic knowledge processing. The first Semantic Web tool that comes direct in contact with the integration procedure is the structural schema of the knowledge base which is termed as top level ontology in general sense. The top level ontology is the structural schema that represents the nature of knowledge the ontology possesses. It should include the components to adjust the behavior of the knowledge base. Hence the initial task that needs to be adjusted within any top level ontology to perform spatial knowledge processing is to include spatial components within it.

The top level ontology is the structural schema that represents the nature of knowledge the ontology possesses. It should be noted that the top level ontology is syntactically presented through OWL/RDF and contains the top level concepts of the domain. Among these top level concepts, the concepts presenting the spatial components for storage, retrieval and processing of the spatial knowledge should be present. Moving down to the enrichment process, the spatial signatures are mapped to the objects within the knowledge base is again

Spatialization of the Semantic Web 181

already standardized filters and built-ins of both the technologies thus forwarding the

The top level ontology or more popularly upper ontology describes the general concept behind the knowledge domain. This ontology varies with the domain it addresses. There are efforts to come out with a universal upper ontology which addresses the requirements of every knowledge domains but they still are in the phase of researches. Every domain uses its own standard upper ontology for its purpose. This research work attempts to propose an upper level ontology for the domain of industrial archaeology. This top level ontology is the main driving force behind the ArchaeoKM framework. It represents the knowledge possessed by archaeologists in form of descriptions, observations and rules represented through different axioms within the ontology. This ontology serves as a foundational ontology to which objects can be instantiated during identification process. The axioms are the building blocks of the ontology. The integration of spatial components within the framework holds major importance and is required to be adjusted within the top level ontology of ArchaeoKM. The spatial extension of the top level ontology is discussed in the

The realization of spatial signatures of the identified objects in the knowledge base has been discussed earlier. The attachments of these spatial signatures provide a framework that could exploit the developments in spatial technology to provide the objects their spatial identity in respect to their surrounding objects. However, it is important to adjust the components of the spatial technology in the top level ontology. This section covers the

Although the impact of spatial integration is realized in the semantic level when the spatial components are integrated in the ontology, the usage of spatial features begins earlier than that. The spatial functionalities provided by database system form foundations to how they should be adjusted. A parallel structure facilitating the spatial components in different levels of the system architecture has already been presented in chapter 2 through figure 3. At the syntactic level where most of knowledge generation activities are carried out, spatial components are handled through spatially annotating the identified objects. This spatial annotation process draws a Minimum Bounding Rectangles (MBRs) around the objects and stores them as spatial data type in PostgreSQL database system. These MBRs would be used to carry out spatial rules while managing knowledge. It should be noted that the MBRs are not the optimal way of representing the objects and would constitutes some degrees of error during the analysis process. The ideal approach would be to use the boundaries of the objects for representation and analysis purpose. The algorithm to extract point cloud from the boundary is still in the domain of research and not completely matured and hence this

It is the semantic level where the most of the integration work is carried out. The domain ontology is modified to represent the spatial functions and operations within it. The research work revolves around two categories of spatial operations and the integration process takes

arguments of the process in standardizing these built-ins too.

**4.1 The top level ontology**

next section.

**4.2 The spatial top level ontology**

spatial top level ontology of the ArchaeoKM framework.

research uses MBRs to put forward the ideas.

Fig. 7. The inclusion of a Geospatial layer in the Semantic Web Stack.

encoded with OWL/RDF syntax. The methodology of this integration is discussed in later sections within this chapter.

Similarly, the spatial filters and spatial built-ins defined in this layer facilitate the spatial querying and the spatial rule definition. The layers of Rules: SWRL/RIF and Querying: SPARQL provide a base to knowledge management through processing the spatial information semantically within the knowledge base. The only adjustment that is needed is to execute the built-ins and filters in conjunction to the processing capabilities of spatial extensions within current database systems.

Putting forward the arguments on the authenticity of the layer with respect to other layers, the geospatial layer exploits the capabilities of the layers below maintaining the trend of the stack. At the time of integration, the spatial components are included within the top level ontology which stores, retrieves and processes spatial knowledge and utilizes the capabilities of the other technologies in the stack. The spatial components on the top level ontology and the mapped spatial signatures are encoded through the OWL/RDF syntactical structure thus justifying the involvement of ontologies in the stack. Then after, the capability of the SWRL language is exploited through spatial built-ins for spatial SWRL rules. Similarly, the querying capability of the SPARQL language is exploited through spatial filters for the query language. These filters and built-ins can be used with conjunction to 180 Semantics – Advances in Theories and Mathematical Models

Fig. 7. The inclusion of a Geospatial layer in the Semantic Web Stack.

sections within this chapter.

extensions within current database systems.

encoded with OWL/RDF syntax. The methodology of this integration is discussed in later

Similarly, the spatial filters and spatial built-ins defined in this layer facilitate the spatial querying and the spatial rule definition. The layers of Rules: SWRL/RIF and Querying: SPARQL provide a base to knowledge management through processing the spatial information semantically within the knowledge base. The only adjustment that is needed is to execute the built-ins and filters in conjunction to the processing capabilities of spatial

Putting forward the arguments on the authenticity of the layer with respect to other layers, the geospatial layer exploits the capabilities of the layers below maintaining the trend of the stack. At the time of integration, the spatial components are included within the top level ontology which stores, retrieves and processes spatial knowledge and utilizes the capabilities of the other technologies in the stack. The spatial components on the top level ontology and the mapped spatial signatures are encoded through the OWL/RDF syntactical structure thus justifying the involvement of ontologies in the stack. Then after, the capability of the SWRL language is exploited through spatial built-ins for spatial SWRL rules. Similarly, the querying capability of the SPARQL language is exploited through spatial filters for the query language. These filters and built-ins can be used with conjunction to already standardized filters and built-ins of both the technologies thus forwarding the arguments of the process in standardizing these built-ins too.

### **4.1 The top level ontology**

The top level ontology or more popularly upper ontology describes the general concept behind the knowledge domain. This ontology varies with the domain it addresses. There are efforts to come out with a universal upper ontology which addresses the requirements of every knowledge domains but they still are in the phase of researches. Every domain uses its own standard upper ontology for its purpose. This research work attempts to propose an upper level ontology for the domain of industrial archaeology. This top level ontology is the main driving force behind the ArchaeoKM framework. It represents the knowledge possessed by archaeologists in form of descriptions, observations and rules represented through different axioms within the ontology. This ontology serves as a foundational ontology to which objects can be instantiated during identification process. The axioms are the building blocks of the ontology. The integration of spatial components within the framework holds major importance and is required to be adjusted within the top level ontology of ArchaeoKM. The spatial extension of the top level ontology is discussed in the next section.

#### **4.2 The spatial top level ontology**

The realization of spatial signatures of the identified objects in the knowledge base has been discussed earlier. The attachments of these spatial signatures provide a framework that could exploit the developments in spatial technology to provide the objects their spatial identity in respect to their surrounding objects. However, it is important to adjust the components of the spatial technology in the top level ontology. This section covers the spatial top level ontology of the ArchaeoKM framework.

Although the impact of spatial integration is realized in the semantic level when the spatial components are integrated in the ontology, the usage of spatial features begins earlier than that. The spatial functionalities provided by database system form foundations to how they should be adjusted. A parallel structure facilitating the spatial components in different levels of the system architecture has already been presented in chapter 2 through figure 3. At the syntactic level where most of knowledge generation activities are carried out, spatial components are handled through spatially annotating the identified objects. This spatial annotation process draws a Minimum Bounding Rectangles (MBRs) around the objects and stores them as spatial data type in PostgreSQL database system. These MBRs would be used to carry out spatial rules while managing knowledge. It should be noted that the MBRs are not the optimal way of representing the objects and would constitutes some degrees of error during the analysis process. The ideal approach would be to use the boundaries of the objects for representation and analysis purpose. The algorithm to extract point cloud from the boundary is still in the domain of research and not completely matured and hence this research uses MBRs to put forward the ideas.

It is the semantic level where the most of the integration work is carried out. The domain ontology is modified to represent the spatial functions and operations within it. The research work revolves around two categories of spatial operations and the integration process takes

Spatialization of the Semantic Web 183

FILTERs can be used to compare strings and derive results. The functions like regular expression which matches plain literal with no language tag can be used to match the lexical forms of other literals by using string comparison function. In addition, SPARQL FILTER uses the relational operators as = or > or < for the comparison and restrict to the results that they return. The FILTER principle can hence be extended in order to process the geospatial

Geoprocessing functions need to be addressed through enriching the knowledge base with the spatial operations which is related to them during the execution of the query. The enrichment process should be rolled back after the results are returned into its original form iff the SELECT statement is used under the filter. The optimization of the SPATIAL\_FILTER is discussed later which highlights the management of the knowledge base during the

The following example demonstrates the syntax of geoprocessing filters in SPARQL. It could be seen that a new spatial filter through the keyword SPATIAL\_FILTER is introduced which helps the translation engine during the parsing process. The SPARQL statement with spatial filters in the example returns names of all the buildings in class feat:Building which are intersecting with the buffer of 2000 meters of the rivers in class feat:River with their

> ?feat1 feat:name ?name1 ?feat2 feat:name ?name2

> > ?feat1 rdfs:type feat:River

?feat2 rdfs:type feat:Building

SPATIAL\_FILTER [buffer (?x, 2000,?feat1)] SPATIAL\_FILTER [intersection (?y,?x,?feat2)]

In case of georelationship filter, it is straightforward as the enrichment process requires enriching the object properties imitating spatial relationship between objects through the results of the spatial operations at the database level. As with the previous case, the georelationship filter uses the keyword SPATIAL\_FILTER. This keyword parses the spatial components from the SPARQL statements. The following example illustrates the execution of SPARQL with these filters. The first feature is a feat:River which is of kind of feat:Feature, and the second feature is a feat:Building which is also of kind of feat:Feature. The

SPATIAL\_FILTER selects the rivers and buildings which are touching spatially.

**4.3.1 Spatial SPARQL queries**

functions.

**Geoprocessing FILTER** 

respective rivers names.

execution of the SPARQL queries.

WHERE

{

}

**Georelationship FILTER** 

SELECT ?name1 ?name2

the functions and operations within these two categories which are the georelationship functions and the geoprocessing functions. These functions are defined by the OGC consortium. The Open Geospatial Consortium, Inc. (OGC) is an international industry consortium of 404 companies, government agencies and universities participating in a consensus process to develop publicly available interface standards. OpenGIS® Standards support interoperable solutions that "geo-enable" the Web, wireless and location-based services, and mainstream IT. The standards empower technology developers to make complex spatial information and services accessible and useful with all kinds of applications.

The top level ontology should model spatial technology in terms of its spatial functions and operations. This modeling process should accommodate the spatial functions and operations and maintain their true identity.
