Strabon

changeset 417:5c927b88eadf

changed refine.sparql query to insert a Municipality for a refined hotspot
author Babis Nikolaou <charnik@di.uoa.gr>
date Tue Jul 10 20:33:58 2012 +0300 (2012-07-10)
parents 5df7a1220bd0
children eebc02275912
files scripts/v2.1/Refine.sparql
line diff
     1.1 --- a/scripts/v2.1/Refine.sparql	Tue Jul 10 19:40:16 2012 +0300
     1.2 +++ b/scripts/v2.1/Refine.sparql	Tue Jul 10 20:33:58 2012 +0300
     1.3 @@ -1,11 +1,12 @@
     1.4  PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#> 
     1.5  PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
     1.6 +PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
     1.7  PREFIX strdf: <http://strdf.di.uoa.gr/ontology#> 
     1.8  PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
     1.9 -
    1.10 +PREFIX gag: <http://www.semanticweb.org/ontologies/2011/gagKallikratis.rdf#>
    1.11  
    1.12  INSERT { ?h noa:isDiscarded "1"^^xsd:int . 
    1.13 -	 ?valid rdf:type noa:Hotspot ;
    1.14 +	?valid rdf:type noa:Hotspot ;
    1.15  		noa:hasConfidence ?conf ;
    1.16  	        noa:hasGeometry ?dif ;
    1.17  		noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 
    1.18 @@ -13,18 +14,23 @@
    1.19  		noa:hasConfirmation noa:unknown ;
    1.20  	        noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    1.21  		noa:isProducedBy noa:noa ;
    1.22 -		noa:isDerivedFromSatellite "SAT"^^xsd:string .
    1.23 +		noa:isDerivedFromSatellite "SAT"^^xsd:string ;
    1.24 +		gag:hasMunicipality ?muni .
    1.25  }
    1.26  WHERE { 
    1.27 -  SELECT ?h  (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (BNODE() AS ?valid) ?conf 
    1.28 -  WHERE { 
    1.29 -?h     noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    1.30 -       noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    1.31 -       noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    1.32 -       noa:hasGeometry ?hGeo ;
    1.33 -       noa:hasConfidence ?conf .
    1.34 -?c     rdf:type noa:Coastline ;
    1.35 -       noa:hasGeometry ?cGeo .
    1.36 +  SELECT ?h (SAMPLE(?mLabel) AS ?muni) (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (BNODE() AS ?valid) ?conf 
    1.37 +  WHERE {
    1.38 +	?h  noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    1.39 +		noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    1.40 +		noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    1.41 +		noa:hasGeometry ?hGeo ;
    1.42 +		noa:hasConfidence ?conf .
    1.43 +	?c  rdf:type noa:Coastline ;
    1.44 +		noa:hasGeometry ?cGeo .
    1.45 +	?m	rdf:type gag:Dhmos ;
    1.46 +		rdfs:label ?mLabel ;
    1.47 +		strdf:hasGeometry ?mGeo .
    1.48 +	FILTER(strdf:anyInteract(?hGeo, ?mGeo)) .
    1.49      FILTER(strdf:anyInteract(?hGeo, ?cGeo)) . 
    1.50    }
    1.51    GROUP BY ?h ?hGeo ?conf