The installation method provided on the ROI_PAC homepage is cumbersome. You can simply complete the installation under Ubuntu. Do not press the commands involved in the article. You must use the tab key flexibly to complete them. 0) the installation of ROI_PAC requires the gcc, gfortran, and perl environments. First, check how these environments are installed. If they are already installed, do not run the following command. $ Sudoapt-getinstallgccgfortranperl1) ROI_PAC required
The installation method provided on the ROI_PAC homepage is cumbersome. You can simply complete the installation under Ubuntu.
Do not press the commands involved in the article. You must use the tab key flexibly to complete them.
0) the installation of ROI_PAC requires the gcc, gfortran, and perl environments. First, check how these environments are installed. If they are already installed, do not run the following command.
$ Sudo apt-get install gcc gfortran perl
1) ROI_PAC must first install fftw. The latest version is 3.3 ,.
Free onHttp://linux.linuxidc.com/
Both the user name and password areWww.linuxidc.com
The specific download directory is in/Pub/2011/06/21/Ubuntu installation of doris and related software tutorials/
$ Tar xzfv fftw-3.3.tar.gz
$ Fftw-3.3 cd
$./Configure -- enable-float
// For multiple cpu cores above P3, this command can be optimized to $./configure -- enable-float -- enable-sse -- with-combined-threads.
$ Make
$ Sudo make install
// If the installation directory is not specified in configure, fftw is installed in/usr/local/lib and/usr/local/include by default, which requires super permissions.
After fftw is installed, set two environment variables, which are required by ROI_PAC.
$ Export FFTW_LIB_DIR =/usr/local/lib
$ Export FFTW_INC_DIR =/usr/local/include
2) download and install ROI_PAC.
The download of ROI_PAC is troublesome. I downloaded it on cdsn. Thank you for sharing your information with caozhentan.
The downloaded ROI_PAC_3_0_1.tgz
$ Tar xzfv ROI_PAC_3_0_1.tgz
$ Cd ROI_PAC_3_0_1
$ Cd ROI_PAC
$./Configure
// If the gcc, gfortran, and perl environments are installed, and fftw and environment variable settings are also correct, this step will not be problematic.
$ Make
$ Sudo make install
3) modify the PATH variable once and for all.
$ Cd
// Return to the logon directory
$ Vi. bashrc
// If you do not like vi, you can use gedit, $ gedit. bashrc
Add the following four lines to the end of the file
Export INT_BIN = "/usr/local/bin"
Export INT_SCR = "/usr/local/share/roi_pac"
Export FFTW_LIB = "/usr/local/lib"
Export PATH = $ PATH: $ INT_BIN: $ INT_SCR: $ FFTW_LIB
If you are familiar with shell, you can modify these four lines.
For me, I have already set/usr/local/bin in PATH when installing doris, so I don't need it in the first line, and the last line has changed.
3e) in this way, the ROI_PAC 3.0.1 is installed, and the test and use methods are omitted.
4) install two ROI_PAC 3.0.1 patches.
4.1) The first patch installation method downloads make_raw_alos.pl in the http://www.roipac.org/ALOS_PALSAR and copies it to the/usr/local/share/roi_pac directory.
However, the perl ^ M cannot be found. The reason is that make_raw_alos.pl is in dos format and needs to be converted to unix format.
If this is the first installation, follow the following command
$ Wget http://www.roipac.org/ALOS_PALSAR? Action = AttachFile & do = get & target = make_raw_alos.pl
// You can use a browser to find the relevant link at http://www.roipac.org/alos_palsar.
$ Sudo apt-get install tofrodos
// Install the dos and unix format conversion tools
$ Fromdos make_raw_alos.pl
// Convert to unix format, remove ^ M
$ Chmod a + x make_raw_alos.pl
// Add the execution permission
$ Sudo mv make_raw_alos.pl/usr/local/share/roi_pac
// Move the file to the corresponding location
4.2) The second patch is to compile add_rmgAmpPhs.c in the ROI_PAC/fip directory and copy it to the/usr/local/bin directory.
However, compilation may fail. Follow the following command
$ Cd ROI_PAC_3_0_1/ROI_PAC/fip
// I decompress ROI_PAC In the logon directory and enter the fip directory.
$ Vi add_rmgAmpPhs.c
Add the following line to the third line of the file. You can use gedit add_rmgAmpPhs.c
# Include
$ Gcc-o add_rmgAmpPhs add_rmgAmpPhs.c
// Compile
$ Chmod a + x add_rmgAmpPhs
// Add the execution permission
$ Sudo mv add_rmgAmpPhs/usr/local/bin
// Move the file to the corresponding location
The two patches are also installed.