Strabon
view scripts/v2.2/insertMunicipalities.sparql @ 512:4fb3d66649b6
Fixed query performing the join with administrative regions.
Using the mbb of both geometries caused hotspots falling in sea to
be coupled (erroneously) with administrative regions
Using the mbb of both geometries caused hotspots falling in sea to
be coupled (erroneously) with administrative regions
author | Manos Karpathiotakis <mk@di.uoa.gr> |
---|---|
date | Thu Jul 26 17:12:40 2012 +0300 (2012-07-26) |
parents | 1056efcaa186 |
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
4 PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
5 PREFIX gag: <http://teleios.di.uoa.gr/ontologies/gagKallikratis.rdf#>
6 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
8 INSERT { ?h gag:hasMunicipality ?muni }
9 WHERE {
10 SELECT ?h (SAMPLE(?mLabel) AS ?muni)
11 WHERE {
12 ?h rdf:type noa:Hotspot ;
13 noa:hasGeometry ?hGeo ;
14 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
15 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
16 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime .
17 ?m rdf:type gag:Dhmos ;
18 rdfs:label ?mLabel ;
19 strdf:hasGeometry ?mGeo .
20 FILTER(strdf:intersects(?hGeo, ?mGeo)) .
21 }
22 GROUP BY ?h
23 }