-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_foot_dsm.sh
43 lines (29 loc) · 1.01 KB
/
run_foot_dsm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#
# Footprint HRSI DSMs
cd $HOME/code
now="$(date +'%Y%m%d')"
dsmDir=/att/nobackup/pmontesa/outASP
inputDir=/att/nobackup/pmontesa/inASP
dsmDir=/att/briskfs/pmontesa/outASP
inputDir=/att/briskfs/pmontesa/inASP
dsmDir=$1
outSHP=${2}_$now.shp
foot_file_str=$3
#foot_file_str=in-Band3N_proj.tif
echo $foot_file_str
# Shapefile name with current date
# hi-res
#outSHP=HRSI_DSM_footprints_$now.shp
# ASTER
#outSHP=HMA_AST_L1A_DSM_footprints_$now.shp
#python -c "import workflow_HRSI_v18 as w; w.footprint_dsm('$dsmDir', '$inputDir', '$myDir', '$outSHP')"
#find $dsmDir -type f -name "VALID*" -exec rm -rf {} \;
# Make GUnion work in SpatiaLite lib of SQLite
source /att/gpfsfs/home/pmontesa/code/sqlite_fix.env
# Remove tmp files from previous bad runs
find $dsmDir -type f -name VALID* -exec rm -rf {} \;
# Run the footprinting script, which adds to current daily file
python footprint_dsm.py ${dsmDir} ${outSHP} -kml -str_fp ${foot_file_str}
# Move to _footprints dir
mv $dsmDir/${2}_$now* $dsmDir/_footprints/