Two way to intall roi_pac
0. install basic environment
apt-get update && apt-get dist-upgrade
apt-get install build-essential gcc g++ gfortran make perl subversion libhdf4-dev python-dev libgdal-dev gdal-bin libc6 libgcc libstdc++6 libxml2-dev libxslt1-dev idle python-lxml gawk
check every folder
better to install Doris
1. follows http://www.linuxidc.com/Linux/2011-10/44952.htm
(1) install fftw
cd fftw-3.3
./configure --enable-float
make
make install
It installed to the default location /usr/local/lib and /usr/local/include
you can add export below to .bashrc, the path should be set to the folder where libfftw2f.a is for LIB_DIR and fftw3.h for INC_DIR
export FFTW_LIB_DIR=/usr/local/lib
export FFTW_INC_DIR=/usr/local/include
(2) install roi_pac
cd ROI_PAC_3_0_1
cd ROI_PAC
./configure
make
make install
cp DOC/SAR_CONFIG ./ copy SAR_CONFIG in DOC to ROI_PAC
gedit SAR_CONFIG
It is my SAR_CONFIG showing below.
export ROI_PAC="/usr/local"
export INT_BIN="$ROI_PAC/bin"
export INT_SCR="$ROI_PAC/share/roi_pac"
export MAI_SCR="/usr/local/soft/ROI_PAC_3_0_1/ROI_PAC/MAI_SCR"
export ROI_MAI="/usr/local/soft/ROI_PAC_3_0_1/ROI_PAC/roi_mai"
export FFTW_LIB="/usr/local/lib"
export MY_BIN="/usr/local/soft/ALOS_preproc/bin/x86_64"
export PATH=$PATH:$INT_BIN:$INT_SCR:$FFTW_LIB:$MY_BIN:$MAI_SCR:$ROI_MAI
add
source /usr/local/soft/ROI_PAC_3_0_1/ROI_PAC/SAR_CONFIG
to the end of .bashrc
(3) download make_raw_alos.pl and ALOS_preproc.tar.gz fromROI_PAC Wiki ALOS PALSAR page
transform dos format make_raw_alos.pl to unix format using
dos2unix ***(filename)
make it exacutable
chmod a+x make_raw_alos.pl
the copy the .pl to /usr/local/share/roi_pac or where your INT_SCR is.
then go into ALOS_preproc folder
cd ALOS_preproc
make
finally add MY_BIN and PATH to your SAR_CONFIG
export MY_BIN="/usr/local/soft/ALOS_preproc/bin/x86_64"
<pre name="code" class="plain">export PATH=$PATH:$INT_BIN:$INT_SCR:$FFTW_LIB:$MY_BIN:$MAI_SCR:$ROI_MAI
(4) modified add_rmgAmpPhs.c in /ROI_PAC_3_0_1/ROI_PAC/fip
cd /ROI_PAC/fip
gedit add_rmpAmpPhs.c
add #include <stdlib.h> to the third line
save
gcc -o add_rmgAmpPhs add_rmgAmpPhs.c
chmod a+x add_rmgAmpPhs
sudo mv add_rmgAmpPhs /usr/local/bin
(5) install roiview
search roiview in sourceforge.net and download RoiView-0.75_src_full.tar.gz
http://sourceforge.net/projects/roiview/files/?source=navbar
the bugs are already fixed and can be found in README.txt
##################
# BUGS #
##################
1. A known issue is the high memory usage. That's part of the matplotlib module problems.
for a low memory machines it is recommended to use -o option without -s
(this will produce the image with now viewing option) or reduce the file size.
2. ERROR: "Sorry, Can't creat image. Colorbar instance has no attribute '__getitem__'.
Changes in matplotlib colorbar function cause this error. Fix:
With the source package, go to the code where roiview.py is and run:
sed -i "s/colorbar\[0\]/colorbar/g" *.py
sed -i "s/colorbar\[1\]/colorbar\.ax/g" *.py
3. When using ROI_PAC output files: "Sorry, Can't create image"
This is a known problem of the roi-pac headers.
The number of lines should be adjusted to the correct number of lines in the file.
You can check it by using the following formula:
[file_size_in_bytes] = width X length X 8
Usually, the length should be decreased by 1.
(6) install MAI package
Noa Bechor and Howard Zebker package: http://chandler.mit.edu/~nbechor/code.html
copy acpatch.F in roi_deskew_distribute to ROI_PAC/roi
make clean
make
cp roi $INT_BIN/.
in /INT_SCR_deskew_distribute folder
dos2unix *.pl
chmod a+x *.pl
cp *.pl $INT_SCR/.
in /ROI_PAC folder
mkdir roi_mai
cp -rf roi/* roi_mai/.
go into roi/ and press Ctrl+H to show the folder .deps/, then copy the folder to roi_mai/
cd roi_mai
"abs_builddir ="
"abs_srcdir ="
"subdir = roi" not sure
copy the files in roi_mai_distribute/ into roi_mai
make
cp roi ./roi_mai
in /ROI_PAC folder
mkdir MAI_SCR
copy the files in MAI_SCR_distribute/ into it
change the name a.out, get_time_new and translate_new to diffigram, get_time and translate
add path in SAR_CONFIG
export MAI_SCR="/usr/local/soft/ROI_PAC_3_0_1/ROI_PAC/MAI_SCR"
export ROI_MAI="/usr/local/soft/ROI_PAC_3_0_1/ROI_PAC/roi_mai"
<pre name="code" class="plain">export PATH=$PATH:$INT_BIN:$INT_SCR:$FFTW_LIB:$MY_BIN:$MAI_SCR:$ROI_MAI
you may encounter an error when using it
shared libraries: libg2c.so.0
you can find solution in
http://blog.csdn.net/wanion911/article/details/50466899
the file *.f can be compiled by
gfortran -ffree-form diffigram.f
the output is a.out
=======================================
to be continue...........
=======================================
Maybe it's better to install the roi_pac to local folder ROI_PAC
2. Second approach to install is to do as the official guide. It install to the local
reference:
http://www.verydemo.com/demo_c137_i36582.html
I follow the guide to do test.
NOTICE: modify the multitest.sh in /ROR_PAC/contrib
from "SAR_ODR_DIR="$testrun_dir"/ERS/Delft" to "SAR_ODR_DIR="$testrun_dir"/ERS1/Delft"
or you may not find the orbit data when you run multitest.sh
# go to download directory
admins-MacBook-Pro-7:~ insar$ cd Downloads/
# unpack ROI_pac source code
admins-MacBook-Pro-7:Downloads insar$ tar xvf roi_pac_3_1beta.tgz
x ROI_PAC_3_1beta/
x ROI_PAC_3_1beta/.DS_Store
x ROI_PAC_3_1beta/AAREADME
x ROI_PAC_3_1beta/Delft/
x ROI_PAC_3_1beta/DGX_MDX/
x ROI_PAC_3_1beta/FFTW/
x ROI_PAC_3_1beta/ROI_PAC/
x ROI_PAC_3_1beta/ROI_