Skip to content

Use Case to Demonstrate the Usefulness of the Shared Ontology

Below is a use cases that demonstrate the use of the shared ontology to interoperate between the CCO and OGC EDR.

Use Case : Flood Monitoring

Below is an example RDF data snippet capturing various details related to a flood monitoring.

Sample RDF Data


@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ccoedr: <http://www.example.org/ccoedr#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# Flood Event
<http://example.org/flood#FloodEvent_2023>
    a ccoedr:Process ;
    rdfs:label "Flood Event 2023" ;
    ccoedr:hasLocation <http://example.org/location#RiverXYZ> ;
    ccoedr:hasTemporalExtent <http://example.org/time#Interval_2023> ;
    ccoedr:hasOutput <http://example.org/data#WaterLevelDataset> .

# Location
<http://example.org/location#RiverXYZ>
    a ccoedr:Location ;
    rdfs:label "River XYZ" ;
    ccoedr:SpatialRegion <http://example.org/spatial#Region_RiverXYZ> .

# Spatial Region
<http://example.org/spatial#Region_RiverXYZ>
    a ccoedr:SpatialRegion ;
    rdfs:label "Spatial Region of River XYZ" .

# Temporal Region
<http://example.org/time#Interval_2023>
    a ccoedr:TemporalRegion ;
    rdfs:label "October 1-5, 2023" ;
    ccoedr:hasStartTime "2023-10-01T00:00:00Z"^^xsd:dateTime ;
    ccoedr:hasEndTime "2023-10-05T23:59:59Z"^^xsd:dateTime .

# Sensor
<http://example.org/sensor#Sensor_001>
    a ccoedr:PhysicalObject ;
    rdfs:label "Water Level Sensor 001" ;
    ccoedr:locatedIn <http://example.org/location#RiverXYZ> ;
    ccoedr:measures <http://example.org/parameter#WaterLevel> .

# Parameter (Water Level)
<http://example.org/parameter#WaterLevel>
    a ccoedr:Parameter ;
    rdfs:label "Water Level" ;
    ccoedr:hasUnit "meters" .

# Dataset
<http://example.org/data#WaterLevelDataset>
    a ccoedr:Dataset ;
    rdfs:label "Water Level Dataset" ;
    ccoedr:hasParameter <http://example.org/parameter#WaterLevel> ;
    ccoedr:hasTemporalExtent <http://example.org/time#Interval_2023> ;
    ccoedr:hasLocation <http://example.org/location#RiverXYZ> .

# Data Query
<http://example.org/query#WaterLevelQuery>
    a ccoedr:DataQuery ;
    rdfs:label "Water Level Data Query" ;
    ccoedr:hasParameter <http://example.org/parameter#WaterLevel> ;
    ccoedr:hasLocation <http://example.org/location#RiverXYZ> ;
    ccoedr:hasTemporalExtent <http://example.org/time#Interval_2023> ;
    ccoedr:retrieves <http://example.org/data#WaterLevelDataset> .

SPARQL Queries

Query 1: Retrieve All Flood Events with Their Locations

PREFIX ccoedr: <http://www.example.org/ccoedr#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?event ?eventLabel ?location ?locationLabel
WHERE {
  ?event a ccoedr:Process ;
         rdfs:label ?eventLabel ;
         ccoedr:hasLocation ?location .
  ?location rdfs:label ?locationLabel .
}

Query 2: Retrieve All Sensors and Their Measured Parameters

PREFIX ccoedr: <http://www.example.org/ccoedr#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?sensor ?sensorLabel ?parameter ?parameterLabel
WHERE {
  ?sensor a ccoedr:PhysicalObject ;
          rdfs:label ?sensorLabel ;
          ccoedr:measures ?parameter .
  ?parameter rdfs:label ?parameterLabel .
}

Query 3: Retrieve all flood events with their temporal extents

PREFIX ccoedr: <http://www.example.org/ccoedr\#\>  
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema\#\>  
PREFIX xsd: <http://www.w3.org/2001/XMLSchema\#\>

SELECT ?event ?eventLabel ?startTime ?endTime  
WHERE {  
  ?event a ccoedr:Process ;  
         rdfs:label ?eventLabel ;  
         ccoedr:hasTemporalExtent ?temporalExtent .  
  ?temporalExtent ccoedr:hasStartTime ?startTime ;  
                  ccoedr:hasEndTime ?endTime .  
}

Query 4: Retrieve all sensors located in a specific region

PREFIX ccoedr: <http://www.example.org/ccoedr\#\>  
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema\#\>

SELECT ?sensor ?sensorLabel  
WHERE {  
  ?sensor a ccoedr:PhysicalObject ;  
          rdfs:label ?sensorLabel ;  
          ccoedr:locatedIn <http://example.org/location\#RiverXYZ\> .  
}
Figure below showing Illustration showing the integration of the CCO and OGC EDR using shared ontology Illustration showing the integration of the CCO and OGC EDR using shared ontology