Strabon
changeset 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.
?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 | 43f6b2907df8 |
children | 8251379cab30 |
files | examples/teleios/deleteSeaHotspots.sparql examples/teleios/landUseInvalidForFires.sparql examples/teleios/refinePartialSeaHotspots.sparql examples/teleios/refineTimePersistence.sparql |
line diff
1.1 --- a/examples/teleios/deleteSeaHotspots.sparql Thu Sep 27 15:24:46 2012 +0300 1.2 +++ b/examples/teleios/deleteSeaHotspots.sparql Thu Sep 27 19:12:21 2012 +0300 1.3 @@ -4,7 +4,9 @@ 1.4 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 1.5 PREFIX gag: <http://geo.linkedopendata.gr/greekadministrativeregion/ontology#> 1.6 1.7 -INSERT {?h noa:isDiscarded "1"^^xsd:int} 1.8 +INSERT {?h noa:isDiscarded "1"^^xsd:int ; 1.9 + noa:refinedBy noa:seaInconsistency . 1.10 +} 1.11 WHERE { 1.12 ?h noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 1.13 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
2.1 --- a/examples/teleios/landUseInvalidForFires.sparql Thu Sep 27 15:24:46 2012 +0300 2.2 +++ b/examples/teleios/landUseInvalidForFires.sparql Thu Sep 27 19:12:21 2012 +0300 2.3 @@ -4,7 +4,9 @@ 2.4 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 2.5 PREFIX clc: <http://geo.linkedopendata.gr/corine/ontology#> 2.6 2.7 -INSERT {?h noa:isDiscarded "1"^^xsd:int} 2.8 +INSERT {?h noa:isDiscarded "1"^^xsd:int ; 2.9 + noa:refinedBy noa:clcInconsistency . 2.10 +} 2.11 WHERE { 2.12 SELECT ?h WHERE 2.13 {
3.1 --- a/examples/teleios/refinePartialSeaHotspots.sparql Thu Sep 27 15:24:46 2012 +0300 3.2 +++ b/examples/teleios/refinePartialSeaHotspots.sparql Thu Sep 27 19:12:21 2012 +0300 3.3 @@ -6,29 +6,32 @@ 3.4 3.5 3.6 INSERT { ?h noa:isDiscarded "1"^^xsd:int . 3.7 - ?valid rdf:type noa:Hotspot ; 3.8 - noa:hasConfidence ?conf ; 3.9 - noa:hasGeometry ?dif ; 3.10 - gag:hasMunicipality ?muni ; 3.11 - noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 3.12 - noa:isDerivedFromSensor "SENSOR"^^xsd:string ; 3.13 - noa:hasConfirmation noa:unknown ; 3.14 - noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 3.15 - noa:isProducedBy noa:noa ; 3.16 - noa:isDerivedFromSatellite "SAT"^^xsd:string . 3.17 + ?valid rdf:type noa:Hotspot ; 3.18 + noa:hasConfidence ?conf ; 3.19 + noa:hasGeometry ?dif ; 3.20 + gag:hasMunicipality ?muni ; 3.21 + noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 3.22 + noa:isDerivedFromSensor "SENSOR"^^xsd:string ; 3.23 + noa:hasConfirmation noa:unknown ; 3.24 + noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 3.25 + noa:isProducedBy noa:noa ; 3.26 + noa:isDerivedFromSatellite "SAT"^^xsd:string ; 3.27 + noa:refinedBy noa:coastlineRefinement ; 3.28 + noa:refinedBy ?refined . 3.29 } 3.30 WHERE { 3.31 SELECT ?h (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (URI(CONCAT(STR(?h),"/refined")) AS ?valid) ?conf ?muni 3.32 WHERE { 3.33 -?h noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 3.34 - noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 3.35 - noa:isDerivedFromSensor "SENSOR"^^xsd:string ; 3.36 - noa:hasGeometry ?hGeo ; 3.37 - gag:hasMunicipality ?muni ; 3.38 - noa:hasConfidence ?conf . 3.39 -?c rdf:type gag:GeometryPart ; 3.40 - gag:hasGeometry ?cGeo . 3.41 - FILTER(strdf:mbbIntersects(?hGeo, ?cGeo)) . 3.42 + ?h noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 3.43 + noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 3.44 + noa:isDerivedFromSensor "SENSOR"^^xsd:string ; 3.45 + noa:hasGeometry ?hGeo ; 3.46 + gag:hasMunicipality ?muni ; 3.47 + noa:hasConfidence ?conf . 3.48 + ?c rdf:type gag:GeometryPart ; 3.49 + gag:hasGeometry ?cGeo . 3.50 + FILTER(strdf:mbbIntersects(?hGeo, ?cGeo)) . 3.51 + OPTIONAL { ?h noa:refinedBy ?refined } . 3.52 } 3.53 GROUP BY ?h ?hGeo ?conf ?muni 3.54 HAVING strdf:overlap(?hGeo, strdf:union(?cGeo))
4.1 --- a/examples/teleios/refineTimePersistence.sparql Thu Sep 27 15:24:46 2012 +0300 4.2 +++ b/examples/teleios/refineTimePersistence.sparql Thu Sep 27 19:12:21 2012 +0300 4.3 @@ -4,17 +4,18 @@ 4.4 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 4.5 PREFIX gag: <http://geo.linkedopendata.gr/greekadministrativeregion/ontology#> 4.6 4.7 -INSERT { 4.8 - ?newHotspot rdf:type noa:Hotspot ; 4.9 - noa:hasConfidence ?hConfidence ; 4.10 - noa:hasGeometry ?hGeometry1 ; 4.11 - noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 4.12 - noa:isDerivedFromSensor "SENSOR"^^xsd:string ; 4.13 - noa:hasConfirmation noa:unknown ; 4.14 - noa:producedFromProcessingChain "PROCESSING_CHAIN-TimePersistence"^^xsd:string ; 4.15 - noa:isProducedBy noa:noa ; 4.16 - gag:hasMunicipality ?hMunicipality1 ; 4.17 - noa:isDerivedFromSatellite "SAT"^^xsd:string . 4.18 +INSERT {?newHotspot rdf:type noa:Hotspot ; 4.19 + noa:hasConfidence ?hConfidence ; 4.20 + noa:hasGeometry ?hGeometry1 ; 4.21 + noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 4.22 + noa:isDerivedFromSensor "SENSOR"^^xsd:string ; 4.23 + noa:hasConfirmation noa:unknown ; 4.24 + noa:producedFromProcessingChain "PROCESSING_CHAIN-TimePersistence"^^xsd:string ; 4.25 + noa:isProducedBy noa:noa ; 4.26 + gag:hasMunicipality ?hMunicipality1 ; 4.27 + noa:isDerivedFromSatellite "SAT"^^xsd:string ; 4.28 + noa:refinedBy noa:temporalPersistence ; 4.29 + noa:refinedBy ?refined . 4.30 } 4.31 WHERE { 4.32 SELECT (URI(CONCAT(STR(MAX(?h1)),"/virtual/NEW_HOTSPOT")) AS ?newHotspot) 4.33 @@ -29,6 +30,7 @@ 4.34 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string . 4.35 OPTIONAL { ?h1 noa:isDiscarded ?z } . 4.36 FILTER (!BOUND(?z)) . 4.37 + OPTIONAL { ?h1 noa:refinedBy ?refined } . 4.38 FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) . 4.39 OPTIONAL { 4.40 ?h2 noa:hasGeometry ?hGeometry2 ;