Strabon

changeset 455:206040860011

chain script fix
author Konstantina Mpereta <grad1110@di.uoa.gr>
date Wed Jul 18 21:06:36 2012 +0300 (2012-07-18)
parents c38041bfcb3d
children 8474bc9a1e60
files scripts/v2.2/runNoaRefinementChain.sh
line diff
     1.1 --- a/scripts/v2.2/runNoaRefinementChain.sh	Wed Jul 18 18:51:27 2012 +0300
     1.2 +++ b/scripts/v2.2/runNoaRefinementChain.sh	Wed Jul 18 21:06:36 2012 +0300
     1.3 @@ -98,14 +98,14 @@
     1.4  POSTGRES_MAIN_VERSION=$(sudo service ${postgres} status | grep -o '.\..' | cut -b 1)
     1.5  
     1.6  echo "Dropping endpoint database";
     1.7 -dropdb -U postgres ${DB}
     1.8 +dropdb  ${DB}
     1.9  
    1.10  echo "Creating endpoint database"
    1.11 -createdb -U postgres ${DB} 
    1.12 +createdb  ${DB} 
    1.13  
    1.14  # load data
    1.15 -curl -s  http://dev.strabon.di.uoa.gr/rdf/Kallikratis-Coastline-Corine-dump-postgres-${POSTGRES_MAIN_VERSION}.tgz | tar xz -O | psql -U postgres -d ${DB}
    1.16 -psql ${DB} -U postgres -c 'VACUUM ANALYZE '
    1.17 +curl -s  http://dev.strabon.di.uoa.gr/rdf/Kallikratis-Coastline-Corine-dump-postgres-${POSTGRES_MAIN_VERSION}.tgz | tar xz -O | psql  -d ${DB}
    1.18 +psql ${DB}  -c 'VACUUM ANALYZE ' 
    1.19  
    1.20  echo "starting tomcat"
    1.21  if test -z "${tomcat}"; then
    1.22 @@ -159,7 +159,7 @@
    1.23  
    1.24  		tmr1=$(timer)
    1.25  
    1.26 -		query=`echo "${insertMunicipalities}" | sed "s/TIMESTAMP/20${year}-${month}-${day}T${time2}:00/g" | \
    1.27 +		query=`echo "${insertMunicipalities}" | sed "s/TIMESTAMP/${year}-${month}-${day}T${time2}:00/g" | \
    1.28  		sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.29  		sed "s/SENSOR/MSG2/g"`
    1.30  
    1.31 @@ -170,8 +170,8 @@
    1.32  		echo;echo;echo;echo "File ${file} inserted Municipalities!"
    1.33  		
    1.34  		# deleteSeaHotspots
    1.35 -		echo -n "Going to deleteSeaHotspots 20${year}-${month}-${day}T${time2}:00 " ;echo; echo; echo;
    1.36 -		query=`echo "${deleteSeaHotspots}" | sed "s/TIMESTAMP/20${year}-${month}-${day}T${time2}:00/g" | \
    1.37 +		echo -n "Going to deleteSeaHotspots ${year}-${month}-${day}T${time2}:00 " ;echo; echo; echo;
    1.38 +		query=`echo "${deleteSeaHotspots}" | sed "s/TIMESTAMP/${year}-${month}-${day}T${time2}:00/g" | \
    1.39  		sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.40  		sed "s/SENSOR/MSG2/g"`
    1.41  		# ${countTime} ./strabon -db endpoint update "${query}"
    1.42 @@ -186,8 +186,8 @@
    1.43  		# echo "Continue?"
    1.44  		# read a
    1.45  			# invalidForFires
    1.46 -		echo -n "invalidForFires 20${year}-${month}-${day}T${time2}:00 "  ; echo; echo ; echo;
    1.47 -		query=`echo "${invalidForFires}" | sed "s/TIMESTAMP/20${year}-${month}-${day}T${time2}:00/g" | \
    1.48 +		echo -n "invalidForFires ${year}-${month}-${day}T${time2}:00 "  ; echo; echo ; echo;
    1.49 +		query=`echo "${invalidForFires}" | sed "s/TIMESTAMP/${year}-${month}-${day}T${time2}:00/g" | \
    1.50  		sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.51  		sed "s/SENSOR/MSG2/g" |\
    1.52  		sed "s/SAT/METEOSAT9/g"`
    1.53 @@ -199,8 +199,8 @@
    1.54  		echo "File ${file} invalidForFires done!"
    1.55   
    1.56  		# refinePartialSeaHotspots
    1.57 -		echo -n "refinePartialSeaHotspots 20${year}-${month}-${day}T${time2}:00 "  ; echo; echo ; echo;
    1.58 -		query=`echo "${refinePartialSeaHotspots}" | sed "s/TIMESTAMP/20${year}-${month}-${day}T${time2}:00/g" | \
    1.59 +		echo -n "refinePartialSeaHotspots ${year}-${month}-${day}T${time2}:00 "  ; echo; echo ; echo;
    1.60 +		query=`echo "${refinePartialSeaHotspots}" | sed "s/TIMESTAMP/${year}-${month}-${day}T${time2}:00/g" | \
    1.61  		sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.62  		sed "s/SENSOR/MSG2/g" |\
    1.63  		sed "s/SAT/METEOSAT9/g"`
    1.64 @@ -215,9 +215,9 @@
    1.65  		# read a
    1.66  
    1.67  		# refineTimePersistence
    1.68 -		echo -n "Going to refineTimePersistence 20${year}-${month}-${day}T${time2}:00 ";echo;echo;echo; 
    1.69 -		min_acquisition_time=`date --date="20${year}-${month}-${day} ${time2}:00 EEST -30 minutes" +%Y-%m-%dT%H:%m:00`
    1.70 -		query=`echo "${refineTimePersistence}" | sed "s/TIMESTAMP/20${year}-${month}-${day}T${time2}:00/g" | \
    1.71 +		echo -n "Going to refineTimePersistence ${year}-${month}-${day}T${time2}:00 ";echo;echo;echo; 
    1.72 +		min_acquisition_time=`date --date="${year}-${month}-${day} ${time2}:00 EEST -30 minutes" +%Y-%m-%dT%H:%m:00`
    1.73 +		query=`echo "${refineTimePersistence}" | sed "s/TIMESTAMP/${year}-${month}-${day}T${time2}:00/g" | \
    1.74  		sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.75  		sed "s/SENSOR/MSG2/g" | \
    1.76  		sed "s/ACQUISITIONS_IN_HALF_AN_HOUR/3.0/g" | \
    1.77 @@ -236,9 +236,9 @@
    1.78  
    1.79  
    1.80  		# discover
    1.81 -		echo -n "Going to discover 20${year}-${month}-${day}T${time2}:00 ";echo;echo;echo; 
    1.82 -		min_acquisition_time=`date --date="20${year}-${month}-${day} 00:00 EEST" +%Y-%m-%dT%H:%m:00`
    1.83 -		max_acquisition_time=`date --date="20${year}-${month}-${day} 23:59 EEST" +%Y-%m-%dT%H:%m:00`
    1.84 +		echo -n "Going to discover ${year}-${month}-${day}T${time2}:00 ";echo;echo;echo; 
    1.85 +		min_acquisition_time=`date --date="${year}-${month}-${day} 00:00 EEST" +%Y-%m-%dT%H:%m:00`
    1.86 +		max_acquisition_time=`date --date="${year}-${month}-${day} 23:59 EEST" +%Y-%m-%dT%H:%m:00`
    1.87  		query=`echo "${discover}" | \
    1.88  			sed "s/PROCESSING_CHAIN/DynamicThresholds/g" | \
    1.89  			sed "s/SENSOR/MSG2/g" | \