Strabon

view examples/teleios/refinePartialSeaHotspots.sparql @ 564:41246f8ce66e

Changed NOA refinement queries. For operations that "delete" hotspots (delete in sea and delete due to corine land cover), a triple is also inserted to mark the refinement operation that caused the deletion. For delete in sea, this is
?h noa:refinedBy noa:seaInconsistency.
For CLC, this is
?h noa:refinedBy noa:clcInconsistency.
For the other operations (hotspots with a geometry that is partially included in sea and for temporal persistence) apart from inserting the triples
?h noa:refinedBy noa:coastlineRefinement .
and
?h noa:refinedBy noa:temporalPersistence .
respectively, we also insert the triple
?h noa:refinedBy ?refined .
to maintain the fact that a hotspot has already been processed by a previous refinement operation.
author Babis Nikolaou <charnik@di.uoa.gr>
date Thu Sep 27 19:12:21 2012 +0300 (2012-09-27)
parents b76d08b43131
children
line source
1 PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
2 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3 PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
4 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
5 PREFIX gag: <http://geo.linkedopendata.gr/greekadministrativeregion/ontology#>
8 INSERT { ?h noa:isDiscarded "1"^^xsd:int .
9 ?valid rdf:type noa:Hotspot ;
10 noa:hasConfidence ?conf ;
11 noa:hasGeometry ?dif ;
12 gag:hasMunicipality ?muni ;
13 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
14 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
15 noa:hasConfirmation noa:unknown ;
16 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
17 noa:isProducedBy noa:noa ;
18 noa:isDerivedFromSatellite "SAT"^^xsd:string ;
19 noa:refinedBy noa:coastlineRefinement ;
20 noa:refinedBy ?refined .
21 }
22 WHERE {
23 SELECT ?h (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (URI(CONCAT(STR(?h),"/refined")) AS ?valid) ?conf ?muni
24 WHERE {
25 ?h noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime;
26 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
27 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
28 noa:hasGeometry ?hGeo ;
29 gag:hasMunicipality ?muni ;
30 noa:hasConfidence ?conf .
31 ?c rdf:type gag:GeometryPart ;
32 gag:hasGeometry ?cGeo .
33 FILTER(strdf:mbbIntersects(?hGeo, ?cGeo)) .
34 OPTIONAL { ?h noa:refinedBy ?refined } .
35 }
36 GROUP BY ?h ?hGeo ?conf ?muni
37 HAVING strdf:overlap(?hGeo, strdf:union(?cGeo))
38 }