-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcsv2gee.sh
More file actions
37 lines (31 loc) · 953 Bytes
/
csv2gee.sh
File metadata and controls
37 lines (31 loc) · 953 Bytes
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
#!/bin/bash
#######################################################
## Vector Build/Import Script
## Created by Dale Kunce: (dale@normalhabit.com)
##
## This script will work for any csv directory,
## just modify the variables below.
##
#######################################################
now=$(date -I)
datadir=/gevol/src/path/to/files
resrcdir=Resources/Vector/
provider=provider
project=Projects/Vector/project.kvproject
log=/path/to/log/log.txt
#######################################################
## Do Not Edit Below this line
#######################################################
cd $datadir
echo "import started $now" >> $log
for f in *.csv
do
filename=${f%.*}
echo "filename = $filename"
sourcename=$f
echo "sourcename = $f"
echo "adding vector resource $filename"
geaddvectorresource --sourcedate $now --provider $provider -o $resrcdir/$filename $sourcename
#build the resource
gebuild $resrcdir/$filename
done