Strabon

annotate examples/teleios/refineTimePersistence.rq @ 1426:014379fdddf2

fixed the tests of geof:distance and geof:buffer, that had wrong results due to the
conversion of the resulting geometry to the srid 3857.
The results are validated using PostGIS, where in the case of buffer there are
small differences in the precision.
Moreover, in the case of BufferMetresTest, there was no point in having as distance
1m, because the geometry did not change, so i added 55000 metres instead (about 0.5 degrees).
author Stella Giannakopoulou <sgian@di.uoa.gr>
date Wed Sep 24 17:43:53 2014 +0300 (2014-09-24)
parents 441a607b4f49
children
rev   line source
kkyzir@536 1 PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
kkyzir@536 2 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
kkyzir@536 3 PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
kkyzir@536 4 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
kkyzir@536 5 PREFIX gag: <http://geo.linkedopendata.gr/greekadministrativeregion/ontology#>
kkyzir@536 6
charnik@564 7 INSERT {?newHotspot rdf:type noa:Hotspot ;
charnik@564 8 noa:hasConfidence ?hConfidence ;
charnik@564 9 noa:hasGeometry ?hGeometry1 ;
charnik@564 10 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
charnik@564 11 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
charnik@564 12 noa:hasConfirmation noa:unknown ;
charnik@564 13 noa:producedFromProcessingChain "PROCESSING_CHAIN-TimePersistence"^^xsd:string ;
charnik@564 14 noa:isProducedBy noa:noa ;
charnik@564 15 gag:hasMunicipality ?hMunicipality1 ;
charnik@564 16 noa:isDerivedFromSatellite "SAT"^^xsd:string ;
charnik@564 17 noa:refinedBy noa:temporalPersistence ;
charnik@564 18 noa:refinedBy ?refined .
kkyzir@536 19 }
kkyzir@536 20 WHERE {
ggarbis@867 21 SELECT (URI(CONCAT(STR(MAX(?h1)),"/virtual/", substr("TIMESTAMP", 3, 2), substr("TIMESTAMP", 6, 2), substr("TIMESTAMP", 9, 2), "_", substr("TIMESTAMP", 12, 2), substr("TIMESTAMP", 15, 2) )) AS ?newHotspot)
kkyzir@536 22 (SUM(?hConfidence1)/ACQUISITIONS_IN_HALF_AN_HOUR AS ?hConfidence)
sgian@868 23 ?hGeometry1 ?hMunicipality1 ?refined
kkyzir@536 24 WHERE {
kkyzir@536 25 ?h1 noa:hasConfidence ?hConfidence1 ;
kkyzir@536 26 noa:hasGeometry ?hGeometry1 ;
kkyzir@536 27 gag:hasMunicipality ?hMunicipality1 ;
kkyzir@536 28 noa:hasAcquisitionTime ?hAcquisitionTime1 ;
kkyzir@536 29 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
kkyzir@536 30 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string .
kkyzir@536 31 OPTIONAL { ?h1 noa:isDiscarded ?z } .
kkyzir@536 32 FILTER (!BOUND(?z)) .
charnik@564 33 OPTIONAL { ?h1 noa:refinedBy ?refined } .
kkyzir@536 34 FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) .
kkyzir@536 35 OPTIONAL {
kkyzir@536 36 ?h2 noa:hasGeometry ?hGeometry2 ;
kkyzir@536 37 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
kkyzir@536 38 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
kkyzir@536 39 noa:producedFromProcessingChain ?hProcessingChain2 .
kkyzir@536 40 FILTER(("PROCESSING_CHAIN"^^xsd:string = ?hProcessingChain2)||("PROCESSING_CHAIN-TimePersistence"^^xsd:string = ?hProcessingChain2)).
kkyzir@536 41 FILTER( strdf:mbbEquals(?hGeometry1, ?hGeometry2) ) .
kkyzir@536 42 }
kkyzir@536 43 FILTER( !BOUND(?h2) ) .
kkyzir@536 44 }
sgian@869 45 GROUP BY ?hGeometry1 ?hMunicipality1 ?refined
kkyzir@536 46 HAVING(SUM(?hConfidence1)>0.0)
kkyzir@536 47 }