1 | #!/bin/bash
|
---|
2 |
|
---|
3 | # generate random tile
|
---|
4 | [ -f 3145728 ] || head -c 3145728 /dev/urandom > 3145728
|
---|
5 |
|
---|
6 | # width/height of the image
|
---|
7 | l=45
|
---|
8 |
|
---|
9 | R="directql --user rasadmin --passwd rasadmin -d $RASDATA/RASBASE"
|
---|
10 | C="test_coll_7GB_rgb"
|
---|
11 |
|
---|
12 | $R -q "create collection $C RGBSet" > /dev/null
|
---|
13 | $R -q "insert into $C values \$1" -f 3145728 --mddtype RGBImage --mdddomain [0:1023,0:1023] > /dev/null
|
---|
14 |
|
---|
15 | echo "Updating collection $C..."
|
---|
16 |
|
---|
17 | for i in $(seq 0 $l); do
|
---|
18 | for j in $(seq 0 $l); do
|
---|
19 | lox=$(($i * 1024))
|
---|
20 | loy=$(($j * 1024))
|
---|
21 | hix=$(($lox + 1024 - 1))
|
---|
22 | hiy=$(($loy + 1024 - 1))
|
---|
23 | echo "i: $i, j: $j..."
|
---|
24 | $R -q "update $C as m set m assign \$1" -f 3145728 --mddtype RGBImage --mdddomain [$lox:$hix,$loy:$hiy] > /dev/null
|
---|
25 | done
|
---|
26 | done
|
---|
27 |
|
---|
28 | echo "done ingestion of collection $C".
|
---|