Skip to content

Commit

Permalink
added R packages
Browse files Browse the repository at this point in the history
  • Loading branch information
albhasan committed Oct 30, 2015
1 parent 4bda03c commit dea7a87
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN apt-get -qq update && apt-get install --fix-missing -y --force-yes --allow-u
postgresql-8.4 \
sshpass \
git-core \
bzip2 \
apt-transport-https \
net-tools \
imagemagick
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Reproduction of the computations on the article "Spatio-Temporal Change Detectio
</ul>
</li>

<li>Scrpts for running the expriement:
<li>Scripts for running the expriement:
<ul>
<li><code>reprosarefp.R</code> - .</li>
<li><code>rexec_sar_efp_f.R</code> - .</li>
Expand Down
20 changes: 19 additions & 1 deletion containerSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
build-essential \
cmake \
libgdal-dev \
libproj-dev \
gdal-bin \
g++ \
python-dev \
Expand Down Expand Up @@ -80,12 +81,23 @@ echo "***** Installing additional stuff..."
#********************************************************
cd ~
yes | /root/./installR.sh
Rscript /home/scidb/installPackages.R packages=scidb,Rserve verbose=0 quiet=0


Rscript /home/scidb/installPackages.R packages=spdep,bfast,forecast,sandwich,scidb,Rserve verbose=0 quiet=0
git clone https://github.com/mengluchu/strucchange.git
git clone https://github.com/mengluchu/bfast2.git
R CMD INSTALL strucchange/
R CMD INSTALL bfast2/


yes | /root/./installParallel.sh
yes | /root/./installBoost_1570.sh
yes | /root/./installGribModis2SciDB.sh
ldconfig
cp /root/libr_exec.so /opt/scidb/14.12/lib/scidb/plugins
#********************************************************
echo "***** Starting RSERVE..."
#********************************************************
R CMD Rserve
#********************************************************
echo "***** Installing SHIM..."
Expand Down Expand Up @@ -157,6 +169,12 @@ echo "***** ***** Executing BFAST..."
#********************************************************
# Subset just Juara
iquery -naq "store(between(MOD09Q1, 58828, 48103, 0, 59679, 49050, 9200), MOD09Q1_JUARA);"
# Redimension
iquery -naq "store(repart(MOD09Q1_JUARA, <red:int16,nir:int16,quality:uint16> [col_id=57600:62399,502,5,row_id=48000:52799,502,5,time_id=0:9200,1,0]), MOD09Q1_repart);"
Expand Down
9 changes: 6 additions & 3 deletions rexec_sar_efp_f.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ scidbconnect("localhost", 8083, "scidb", "xxxx.xxxx.xxxx")
#########################################
###### subset and prepare scidb array ##
#########################################


# NOTE: Adjust the schema accordingly. Meng uses this query to remove overlap
# => remove overlap since data load
iquery("
store(
project(
Expand All @@ -11,9 +15,8 @@ iquery("
apply(
subarray(
repart(
MOD09Q1,
<red:int16,nir:int16,quality:uint16> [col_id=58828:59679,502,0,row_id=48103:49050,502,0,time_id=0:9200,1,0]),
MOD09Q1_JUARA,
<red:int16,nir:int16,quality:uint16> [col_id=57600:62399,502,5,row_id=48000:52799,502,5,time_id=0:9200,1,0]),
58930,48210,6,59079,48359,643),
evi2,2.5*((nir*0.0001-red*0.0001)/(nir*0.0001+2.4*red*0.0001+1.0))),
<red:int16,nir:int16,quality:uint16,evi2:double>[col_id=0:149,1,1,row_id=0:149,1,1,time_id=0:637,638,0]),
Expand Down

0 comments on commit dea7a87

Please sign in to comment.