Strabon

diff examples/teleios/runNoaRefinement.sh @ 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
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/teleios/runNoaRefinement.sh	Wed Sep 24 17:43:53 2014 +0300
     1.3 @@ -0,0 +1,116 @@
     1.4 +#! /bin/bash
     1.5 +
     1.6 +#
     1.7 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.8 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
    1.10 +#
    1.11 +# Copyright (C) 2010, 2011, 2012, Pyravlos Team
    1.12 +#
    1.13 +# http://www.strabon.di.uoa.gr/
    1.14 +#
    1.15 +
    1.16 +
    1.17 +dataDir="/var/www/shapefiles2012all"
    1.18 +dataUrl="http://challenge.strabon.di.uoa.gr/shapefiles2012all/"
    1.19 +name="HMSG2_IR_039_s7"
    1.20 +suffix=".n3"
    1.21 +
    1.22 +logFile="chain.log"
    1.23 +countTime="/usr/bin/time -ao ${logFile} -f %e"
    1.24 +echo > ${logFile}
    1.25 +
    1.26 +insertMunicipalities="`cat insertMunicipalities.rq`"
    1.27 +deleteSeaHotspots="`cat deleteSeaHotspots.rq`"
    1.28 +landUseInvalidForFires="`cat landUseInvalidForFires.rq`"
    1.29 +refinePartialSeaHotspots="`cat refinePartialSeaHotspots.rq`"
    1.30 +refineTimePersistence="`cat refineTimePersistence.rq`"
    1.31 +
    1.32 +# Initialize
    1.33 +#sudo service postgresql restart
    1.34 +#dropdb endpoint
    1.35 +#createdb endpoint -T template_postgis
    1.36 +#sudo service tomcat6 restart
    1.37 +#./endpoint store http://localhost:8080/endpoint N-Triples -u http://pathway.di.uoa.gr/hotspots/grid_4.nt
    1.38 +
    1.39 +#./scripts/endpoint query http://localhost:8080/endpoint "SELECT (COUNT(*) AS ?C) WHERE {?s ?p ?o}"
    1.40 +#echo "Continue?"
    1.41 +#read a
    1.42 +
    1.43 +
    1.44 +for Month in `sec 7 8`; do
    1.45 +	for d in `sec 1 31`; do
    1.46 +		for h in `seq 0 12`; do
    1.47 +			for m in `seq 0 15 45`; do
    1.48 +            			time=`printf "%02d%02d\n" $h $m`
    1.49 +		        	time2=`printf "%02d:%02d\n" $h $m`
    1.50 +				date=`printf "%02d-%02d\n" $Month $d`
    1.51 +##            file=${dataDir}${name}_${time}$suffix
    1.52 +#            file=${dataUrl}${name}_${time}$suffix
    1.53 +#    
    1.54 +#            # store file
    1.55 +#            echo -n "storing 2007-08-25T${time2}:00 " >> ${logFile}
    1.56 +##            ${countTime} ./strabon -db endpoint store $file      
    1.57 +#            ${countTime} ./endpoint store http://localhost:8080/endpoint N-Triples -u ${file}
    1.58 +#            
    1.59 +##            echo "File ${file} stored!" >> ${logFile}
    1.60 +##            echo "Continue?"
    1.61 +##            read a
    1.62 +         
    1.63 +            # deleteSeaHotspots
    1.64 +            echo -n "deleteSeaHotspots 2007-${date}T${time2}:00 " >> ${logFile}
    1.65 +            query=`echo "${deleteSeaHotspots}" | sed "s/TIMESTAMP/2007-${date}T${time2}:00/g" | \
    1.66 +                sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.67 +                sed "s/SENSOR/MSG2/g"`
    1.68 +#            ${countTime} ./strabon -db endpoint update "${query}"
    1.69 +            ${countTime} ./endpoint update http://localhost:8080/endpoint "${query}"
    1.70 +            
    1.71 +#            echo "File ${file} deleteSeaHotspots done!"
    1.72 +#            echo "Continue?"
    1.73 +#            read a
    1.74 +            
    1.75 +            # refinePartialSeaHotspots
    1.76 +            echo -n "refinePartialSeaHotspots 2007-${date}T${time2}:00 " >> ${logFile}
    1.77 +            query=`echo "${refinePartialSeaHotspots}" | sed "s/TIMESTAMP/2007-${date}T${time2}:00/g" | \
    1.78 +                sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.79 +                sed "s/SENSOR/MSG2/g"`
    1.80 +#            ${countTime} ./strabon -db endpoint update "${query}"
    1.81 +            ${countTime} ./endpoint update http://localhost:8080/endpoint "${query}"
    1.82 +            
    1.83 +#            echo "File ${file} refinePartialSeaHotspots done!"
    1.84 +#            echo "Continue?"
    1.85 +#            read a
    1.86 +
    1.87 +            # refineTimePersistence
    1.88 +            echo -n "refineTimePersistence 2007-${date}T${time2}:00 " >> ${logFile}
    1.89 +            min_acquisition_time=`date --date="2007-${date} ${time2}:00 EEST -30 minutes" +%Y-%m-%dT%H:%m:00`
    1.90 +            query=`echo "${refineTimePersistence}" | sed "s/TIMESTAMP/2007-${date}T${time2}:00/g" | \
    1.91 +                sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.92 +                sed "s/SENSOR/MSG2/g" | \
    1.93 +                sed "s/ACQUISITIONS_IN_HALF_AN_HOUR/3.0/g" | \
    1.94 +                sed "s/MIN_ACQUISITION_TIME/${min_acquisition_time}/g"`
    1.95 +
    1.96 +#            echo "Query:"
    1.97 +#            echo "${query}"
    1.98 +#            echo "Continue?"
    1.99 +#            read a
   1.100 +#            ${countTime} ./strabon -db endpoint update "${query}"
   1.101 +#            ${countTime} ./endpoint update http://localhost:8080/endpoint "${query}"
   1.102 +            ${countTime} ./endpoint update http://localhost:8080/endpoint "${query}"
   1.103 +            
   1.104 +#            echo "File ${file} refinePartialSeaHotspots done!"
   1.105 +#            echo "Continue?"
   1.106 +#            read a
   1.107 +    done
   1.108 +done
   1.109 +
   1.110 +
   1.111 +#for f in `ls /home/ggarbis/TELEIOS/NOA_Processing_Chain/chain_msg2/data/out_triples/HMSG2_IR_039_s7_070825_*.hotspots.n3`
   1.112 +#do
   1.113 +
   1.114 +#    echo "Store $f"
   1.115 +#	${countTime} ./scripts/strabon -db endpoint store $f
   1.116 +#	
   1.117 +#	
   1.118 +#done
   1.119 +