Discovering Sources for a Region ESWC 2011 Tutorial 29 May

37 Slides911.96 KB

Discovering Sources for a Region ESWC 2011 Tutorial 29 May 2011 Speaker: Kostis Kyzirakos

Outline Introduction The data model stRDF The query language stSPARQL The system Strabon and the Semantic Registry Hands-on session: Registering and discovering data sources

Objectives and motivation (1/2) The vision of the Semantic Sensor Web: annotate sensor data and services to enable discovery, integration, interoperability etc. We want to develop an open, dynamic and scalable registry containing these annotations. Sensor annotations involve thematic, spatial and temporal metadata. Examples: The sensor measures temperature. (thematic) The sensor is located in the location represented by point (A, B). (spatial) The sensor measured 3o Celsius on 26/01/2010 at 03:00pm. (temporal)

Objectives and motivation (2/2) How about using RDF? Good idea. But RDF can represent only thematic metadata properly. We want to take into account spatial and temporal information to aid publication and discovery of sensors, sensor services etc. What can we do about spatial and temporal metadata? Answer: Extend RDF to represent spatial and temporal metadata.

Outline Introduction The data model stRDF The query language stSPARQL The system Strabon and the Semantic Registry Hands-on session: Registering and discovering data sources

From RDF to stRDF - Example ex:sensor1 rdf:type ex:Sensor. ex:sensor1 ex:measures ex:Temperature. ex:sensor1 ex:hasLocation ex:location1. RDF Spatial Literals ex:location1 strdf:hasSpatialExtent "POINT(0.1 50)"ˆˆogc:WKT . New Kind of Typed Literals sRDF

Example POLYGON((6 1, 10 1, 10 10, 6 6, 6 1))

Outline Introduction The data model stRDF The query language stSPARQL The system Strabon and the Semantic Registry Hands-on session: Registering and discovering data sources

Example – Dataset Sensor metadata using the CSIRO/SSN ontology: ex:sensor1 rdf:type ssn:Sensor ; ssn:measures ex:temperature ; ssn:supports ex:grounding1 . ex:grounding1 rdf:type ssn:SensorGrounding ; ssn:hasLocation ex:location1 . ex:location1 rdf:type ssn:Location . ex:location1 strdf:hasSpatialExtent "POINT(40,15)"ˆˆogc:WKT.

Example – Dataset Metadata about geographical areas: ex:area1 rdf:type ex:UrbanArea ; ex:hasName "Hersonissos" ; strdf:hasSpatialExtent "POLYGON((25 10, 115 10, 125 -5, 125 10, 135 75, 115 75, 25 10))" ˆˆogc:WKT.

Example – Queries Spatial selection. Find the URIs of the sensors that are inside the rectangle R(0, 0, 100, 100). select ?S where { ?S rdf:type ssn:Sensor . ?G rdf:type ssn:SensorGrounding . ?L rdf:type ssn:Location . ?S ssn:supports ?G . ?G ssn:haslocation ?L . ?L strdf:hasSpatialExtent ?GEO . filter(?GEO inside "POLYGON((0 0, 0 100, 100 100, 100 0, 0 0))" ˆˆogc:WKT) }

Example – Queries Spatial selection. Find the URIs of the sensors that are inside the rectangle R(0, 0, 100, 100). select ?S where { ?S rdf:type ssn:Sensor . ?G rdf:type ssn:SensorGrounding . ?L rdf:type ssn:Location . ?S ssn:supports ?G . ?G ssn:haslocation ?L . ?L strdf:hasSpatialExtent ?GEO . filter(?GEO inside "POLYGON((0 0, 0 100, 100 100, 100 0, 0 0))" ˆˆogc:WKT) }

Answer ?S ex:sensor1

Example – Queries Spatial join. Find the URIs of the sensors that are located inside an urban Area. select ?S ?UANAME where { ?S rdf:type ssn:Sensor . ?G rdf:type ssn:SensorGrounding . ?L rdf:type ssn:Location . ?S ssn:supports ?G . ?G ssn:haslocation ?L . ?L strdf:hasSpatialExtent ?GEO . ?UA rdf:type ex:UrbanArea . ?UA ex:hasName ?UANAME . ?UA strdf:hasSpatialExtent ?UAGEO . filter(?GEO inside ?UAGEO) }

Example – Queries Spatial join. Find the URIs of the sensors that are located inside an urban Area. select ?S ?UANAME where { ?S rdf:type ssn:Sensor . ?G rdf:type ssn:SensorGrounding . ?L rdf:type ssn:Location . ?S ssn:supports ?G . ?G ssn:haslocation ?L . ?L strdf:hasSpatialExtent ?GEO . ?UA rdf:type ex:UrbanArea . ?UA ex:hasName ?UANAME . ?UA strdf:hasSpatialExtent ?UAGEO . filter(?GEO inside ?UAGEO) }

Answer ?S ?UANAME ex:sensor1 “Hersonissos”

What is new in stSPARQL syntax? k-ary spatial terms quantifier-free formulas (constants) spatial variables projections of k-ary spatial terms the result of set operations on k-ary spatial terms: intersection, union, difference the result of geometric operations on k-ary spatial terms: boundary, buffer, minimum bounding box Metric spatial terms VOL, AREA, LEN, MAX, MIN Select clause: construction of new spatial terms intersection, union, difference, projection of spatial terms Where clause: Quad patterns to refer to the valid time of a triple Filter clause: Spatial predicates (topological): disjoint, touch, equals, inside, covered by, contains, covers, overlap Temporal predicates: before, equal, meets, overlaps, during, starts, finishes

Outline Introduction The data model stRDF The query language stSPARQL The system Strabon and the Semantic Registry Hands-on session: Registering and discovering data sources

The System Strabon Strabon Sesame Query Engine Storage Manager Constraint Engine Parser Repository Representation Translator Optimizer SAIL Evaluator RDBMS Convex Partitioner Transaction Manager PostGIS

Storing stRDF Data Geometric objects represented with constraints Geometric objects represented with Well Known Text (WKT) Storage Manager Constraint Engine Representation Translator Repository Input processor SAIL cddlib Output processor Convex Partitioner Input processor RDBMS points, lines, polygons, TINs and polyhedrons PostGIS CGAL Output processor

Evaluating stSPARQL Queries stSPARQL query Query Engine Constraint Engine Parser Representation Translator Optimizer Convex Partitioner Evaluator Transaction Manager PostGIS Results (constraints) Results (WKT) Results (KML)

The Architecture of the Semantic Registry Applications Semantic Registration and Discovery Service Application Services Application Tier Middleware Tier Semantic Integrator Semantic Registry Data Tier Data Source Connectivity Bridge Concrete Resource Strabon Query Engine Service Constraint Engine Registration Storage Manager Query Enables consumers Allows a metadata to make to wellconsumer query Enables a metadata informed the contentsand of the producer to register well-formed registry in order to an RDF(S) document interactions with the discover about SSW service relevant resources resources using stSPARQL PostGIS

Example Orchestration Consumer: Discover a Stored Data Service that observes tide height or wave height in Southeast England Mash-up applications Consumer/Producer: Register the description of an integrated data source that associates wave height with the ship departure times query Application Services Semantic Registry Service Semantic Integrator Registration register Query Strabon Query Engine Constraint Engine Storage Manager Data Source Producer: Register the description of an SDS service that exports the scheduled ship departure times from England register Producer: Register the description of an SDS service that observes wind speed and wave height in Southampton PostGIS

Example Orchestration: stSPARQL query (Query 3) SELECT DISTINCT ?ENDPOINT WHERE { ?SERVICE rdf:type Services:WebService . ?SERVICE Services:hasEndpointReference ?ENDPOINT . ?SERVICE Services:hasDataset ?DATASET . ?DATASET Services:includesPropertyType ?PROPERTYTYPE . FILTER( (str(?PROPERTYTYPE) "http://www.semsorgrid4env.eu/ontologies/CoastalDefences.owl#TideHeight") (str(?PROPERTYTYPE) "http://www.semsorgrid4env.eu/ontologies/CoastalDefences.owl#WaveHeight") ). ?DATASET Services:coversRegion ?SERVICEREGION . ?SERVICEREGION Services:hasSpatialExtent ?SERVICEREGIONGEO . AdditionalRegions:SouthEastEngland Services:hasSpatialExtent ?SE ENGLAND GEO. FILTER(?SERVICEREGIONGEO covers ?SE ENGLAND GEO ) . }

Answer ?ENDPOINT http://www.channelcoast.org/services/spatial/wms? SERVICE WMS&VERSION 1.1.1&REQUEST GetMap& LAYERS wave height http://www.channelcoast.org/services/spatial/wms? SERVICE WMS&VERSION 1.1.1&REQUEST GetMap& LAYERS tide height

Outline Introduction The data model stRDF The query language stSPARQL The system Strabon and the Semantic Registry Hands-on session: Registering and discovering data sources

Example: Service ontology Web Service h e rfac e t n asI has En Se h dpo rv as intR ice efe Ty ren pe ce s ha set ta a D Dataset Interface Region SpatialExtent includes Feature Type s er v co ServiceType in Pr clud o e Ty per s t pe y FeatureType Constraint Representation or Well Known Text PropertyType EndPoint Reference

Example: Property Document Service description Interfaces Endpoint reference Dataset pointers Dataset description Services:WebService rdf:about "#BRANCHService" rdfs:label BRANCH /rdfs:label Services:hasInterface rdf:resource "#BRANCHInterface"/ Services:hasEndpointReference http://www.semsorgrid4env.eu/ontologies/ServiceOntolo gy.owl#" http://www.channelcoast.org/services/ spatial/wms? SERVICE WFS&VERSION 1.1.1&REQUEST G etFeature&TYPENAME branch / Services:hasEndpointReference Services:hasDataset rdf:resource "#BRANCHDataset"/ Services:hasServiceType rdf:resource "&Services;WFS"/ /Services:WebService Services:Dataset rdf:about "# BRANCHDataset " rdfs:label Modelled flood ingress Dataset /rdfs:label time:hasTemporalExtent rdf:datatype "&RegistryOntology;TemporalInstant" NO W /time:hasTemporalExtent Services:coversRegion rdf:resource "&AdditionalRegions; SouthEastEnglandBRANCH "/ Temporal Extent Spatial Coverage Features Observed

Spatial Extent (Well Known Text) Services:Region rdf:about "&AdditionalRegions: SouthEastEnglandBRANCH " RegistryOntology:hasGeometry rdf:datatype "http://strdf.di.uoa.gr/ontology#WKT" POLYGON (( 590373.08467367 5628280.44984213, 590374.07417499 5628281.46963455, . 590508.3165201 5618280.6452733, 590373.0846736 5628280.4498421)) /RegistryOntology:hasGeometry /services:Region

Hands on: Register a property document Open the Wavenet.rdf document Copy the document to the clipboard Click Edit Select All Click Edit Copy Launch a browser Click Registry GUI Click Store Paste the contents of the clipboard to the textbox Click Store

Examples of Queries – Query 1 Find all services Select ?SERVICE ?TYPE ?ENDPOINT where { ?SERVICE rdf:type Services:WebService ; Services:hasEndpointReference ?ENDPOINT ; Services:hasServiceType ?TYPE . }

Examples of Queries – Query 4 Find all WFS services with FOI Flood defence infrastucture, cover the Solent and provide current information. select distinct ?ENDPOINT where { ?SERVICE rdf:type Services:WebService ; Services:hasEndpointReference ?ENDPOINT ; Services:hasServiceType Services:WFS ; Services:hasDataset ?DATASET . ?DATASET Services:includesFeatureType CoastalDefences:TypeDefence ; time:hasTemporalExtent ?TIME . filter(?TIME contains "NOW" regont:TemporalInstant) . ?DATASET Services:coversRegion ?SERVICEREGION . ?SERVICEREGION regont:hasGeometry ?SERVICEREGIONGEO . AdditionalRegions:SolentModelledArea regont:hasGeometry ?SOLENTGEO . filter(?SERVICEREGIONGEO overlap ?SOLENTGEO) . } Find a WFS service with a dataset that has flood defense infrastructure as FOI, provides current information, and covers an area that overlaps the Solent

Examples of Queries – Query 8 Find points of interest near a location SELECT * WHERE { { ?place a lgdo:Shops . } UNION { ?place a lgdo:Shop . } UNION { ?place a lgdo:Shopping . } UNION { ?place a lgdo:Supermarket . } UNION { ?place a lgdo:Bakery . } UNION { ?place a lgdo:Marketplace . } UNION { ?place a lgdo:PublicMarket . } UNION { ?place a lgdo:TakeAway . } UNION { ?place a lgdo:DrinkingWater . } UNION { ?place a lgdo:WaterFountain . } UNION { ?place a lgdo:WaterWell . } ?place a ?type ; geo:geometry ?placegeo ; rdfs:label ?placename . FILTER(DISTANCE(?placegeo, "POINT(-1.83901 50.71076)" http://strdf.di.uoa.gr/ontology#WKT ) 3) . }

Thank you for your attention! (http://strabon.di.uoa.gr)

Backup slides

Comparison with OGC-SWE Catalogues OGC-SWE uses the OpenGIS catalogue services specification. The common query language developed for interoperability in this specification is based on attribute-value pairs (data model) and attribute operator value (atomic expression in a Boolean query). This is a reasonable query language for a catalogue. But we are actually more permissive in our approach in the sense that we allow any query language to be used (the semantic registry service is a data store and we could use SQL, SPARQL etc.). This is more general in principle; also, the concrete realization of the semantic registry service by any RDF store offers a more expressive data model than an attribute-value pair data model. Some of the service interfaces of the OpenGIS catalogue service are similar to what we have (getCapabilities etc.); others we have not dealt with (harvestResource). 2nd Year Review Meeting - Brussels, 16-17 Nov. 2010

Comparison with SANY Sensor Catalogue Service Complementary approaches: – SANY starts with the ORCHESTRA geospatial catalogue and extends it to become a semantic geospatial catalogue (terminology: the semantic bounding box). Semantics are based on the SANY schema. – We go the other way around (we start from a platform that offers a general semantics-based data model and work on extending it with space and time). Our approach is more expressive: – Instead of a specific schema (SANY schema), we can support any relevant sensor ontology and pose very general queries toward the combination of the ontology and the data. 2nd Year Review Meeting - Brussels, 16-17 Nov. 2010

Back to top button