Advertisement
jbjares

OpenSPARQL

May 25th, 2016
2,388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARQL 1.16 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. SELECT DISTINCT  ?VALUE
  3.   FROM <http://lsm.deri.ie/OpenIoT/guest_demo/sensordata#>
  4.   WHERE
  5.   {
  6.     {
  7.       SELECT DISTINCT AVG(?DATA) AS ?VALUE
  8.       WHERE
  9.       {
  10.         ?record <http://openiot.eu/ontology/ns/value> ?DATA .
  11.         ?record <http://www.w3.org/2000/01/rdf-schema#label> 'temperature' .
  12.         ?record <http://openiot.eu/ontology/ns/isObservedValueOf> ?sensor .
  13.         ?sensor <http://purl.oclc.org/NET/ssnx/ssn#observedBy> ?sensorId .
  14.         {
  15.           SELECT ?sensorId
  16.           FROM <http://lsm.deri.ie/OpenIoT/guest_demo/sensormeta#>
  17.           WHERE
  18.           {
  19.             ?sensorId <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://openiot.eu/ontology/ns/Netatmo> .
  20.             ?sensorId <http://www.loa-cnr.it/ontologies/DUL.owl#hasLocation> ?loc .
  21.             ?loc geo:geometry ?geo .
  22.             FILTER (<bif:st_intersects>(?geo, <bif:st_point>( -9.054708480834961, 53.27325144835949), 15.0)) .
  23.           }
  24.         }
  25.       }
  26.     }
  27.   }
  28. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement