RSGISlib
documents
Python Scripting for Spatial Data Processing. ... https://bitbucket.org/petebunting/python-tutorial-for-spatial-data-processing/←ここからダウンロードしてTeXをコンパイルしたもの
How to install in Ubuntu 16.04 (with conda)
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh chmod +x Miniconda3-latest-Linux-x86_64.sh ./Miniconda3-latest-Linux-x86_64.sh (you should restart shell!) conda create --name osgeo python=3.5 source activate osgeo conda install -c conda-forge -c rios rsgislib conda install -c conda-forge rios conda install -c conda-forge tuiview conda install -c conda-forge scikit-learn matplotlib h5py conda install -c ipython exit (you completed installation) (afterwards, you should type the followings whenever you want to start using RSGISlib) source activate osgeo ipython
注: condaの外のpythonやipythonを使わないように注意。それらを使うと, conda環境内の設定が使えず, エラーが出まくって何もできない。
Image segmentation
$ source activate osgeo $ ~/miniconda3/pkgs/rsgislib-3.2.0-py35_2/bin/rsgissegmentation.py -i N06W053_96-10_stack_lee.kea -o N06W053_96-10_segs.kea -m N06W053_96-10_meansegs.kea -t ./tmp/ -k 30 -n 50 -d 1000000
How to install in Ubuntu 16.04 (without conda)
## RSGISLib sudo apt-get install libmpfr-dev mercurial libcgal-dev mkdir ~/tmp cd ~/tmp
# boost cd ~/tmp # https://sourceforge.net/projects/boost/files/boost/1.51.0/boost_1_51_0.tar.gz/download tar zxvf boost_1_51_0.tar.gz cd boost_1_51_0/ ./bootstrap.sh --prefix=/share/osgeo/fw/boost/1.51 --with-libraries=all --with-python=/usr/bin/python --with-python-root=/usr/bin/ ./b2 ./bjam install sudo mkdir -p /share/osgeo/fw/boost/1.51.0/bin sudo cp bjam /share/osgeo/fw/boost/1.51.0/bin/ # HDF5 cd ~/tmp wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.9/src/hdf5-1.8.9.tar.gz tar zxvf hdf5-1.8.9.tar.gz cd hdf5-1.8.9/ ./configure --prefix=/share/osgeo/fw/hdf5/1.8.9 --enable-cxx --enable-shared -with-pic make sudo make install # FFTW cd ~/tmp # wget http://www.fftw.org/fftw-3.3.2.2-pl2.tar.gz # tar zxvf fftw-3.3.6-pl2.tar.gz cd fftw-3.3.6-pl2/ ./configure --prefix=/share/osgeo/fw/fftw/3.3.6-pl2 --enable-shared --disable-static CPPFLAGS=-fPIC; make clean; make sudo make install
# xerces cd ~/tmp #wget http://ftp.meisei-u.ac.jp/mirror/apache/dist//xerces/c/3/sources/xerces-c-3.1.1.tar.gz #tar zxvf xerces-c-3.1.1.tar.gz cd xerces-c-3.1.1/ ./configure --prefix=/share/osgeo/fw/xerces-c/3.1.1; make clean; make sudo make install # GSL cd ~/tmp #wget http://ftp.jaist.ac.jp/pub/GNU/gsl/gsl-2.4.tar.gz #tar zxvf gsl-2.4.tar.gz cd gsl-2.4/ ./configure --prefix=/share/osgeo/fw/gsl/2.4; make clean; make sudo make install # MuParser cd ~/tmp # wget https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz # tar zxvf v2.2.5.tar.gz cd muparser-2.2.5 ./configure --prefix=/share/osgeo/fw/muparser/2.2.5; make clean; make sudo make install # GEOS cd ~/tmp #wget http://download.osgeo.org/geos/geos-3.5.0.tar.bz2 #bunzip2 geos-3.5.0.tar.bz2 #tar xvf geos-3.5.0.tar cd geos-3.5.0/ ./configure --prefix=/share/osgeo/fw/geos/3.5.0; make clean; make sudo make install # PROJ4 cd ~/tmp #wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz #tar zxvf proj-4.9.3.tar.gz cd proj-4.9.3/ ./configure --prefix=/share/osgeo/fw/proj4/4.9.3; make clean; make sudo make install # kea cd ~/tmp #hg clone https://bitbucket.org/chchrsc/kealib cd kealib/trunk cmake -D CMAKE_INSTALL_PREFIX=/share/osgeo/fw/libkea/1.30 -D CMAKE_VERBOSE_MAKEFILE=ON -D HDF5_INCLUDE_DIR=/share/osgeo/fw/hdf5/1.8.19/include -D HDF5_LIB_PATH=/share/osgeo/fw/hdf5/1.8.19/lib . make clean; make sudo make install # gmp cd ~/tmp/ wget https://ftp.gnu.org/gnu/gmp/gmp-5.1.3.tar.gz tar zxvf gmp-5.1.3.tar.gz cd gmp-5.1.3/ ./configure --prefix=/share/osgeo/fw/gmp/5.1.3 --enable-cxx --enable-fit; make clean; make sudo make install # GDAL cd ~/tmp # wget http://download.osgeo.org/gdal/2.2.0/gdal-2.2.0.tar.gz # tar zxvf gdal-2.2.0.tar.gz cd gdal-2.2.0/ ./configure --prefix=/share/osgeo/fw/gdal/2.2.0 --with-hdf5=/share/osgeo/fw/hdf5/1.8.19 --with-python --enable-shared=yes --enable-static=no make sudo make install # RSGISLib cd ~/tmp hg clone https://bitbucket.org/petebunting/rsgislib rsgislib-code # download the document wget https://bitbucket.org/petebunting/rsgislib-documentation/downloads/RSGISLib_Docs_20130926.pdf cd ~/tmp/rsgislib-code cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D GEOS_INCLUDE_DIR=/share/osgeo/fw/geos/3.5.0/include -D GEOS_LIB_PATH=/share/osgeo/fw/geos/3.5.0/lib -D HDF5_INCLUDE_DIR=/share/osgeo/fw/hdf5/1.8.19/include/ -D HDF5_LIB_PATH=/share/osgeo/fw/hdf5/1.8.19/lib -D XERCESC_INCLUDE_DIR=/share/osgeo/fw/xerces-c/3.1.4/include -D XERCESC_LIB_PATH=/share/osgeo/fw/xerces-c/3.1.4/lib -D GDAL_INCLUDE_DIR=/share/osgeo/fw/gdal/2.2.0/include/ -D GDAL_LIB_PATH=/share/osgeo/fw/gdal/2.2.0/lib/ -D GSL_INCLUDE_DIR=/share/osgeo/fw/gsl/2.4/include -D GSL_LIB_PATH=/share/osgeo/fw/gsl/2.4/lib -D FFTW_INCLUDE_DIR=/share/osgeo/fw/fftw/3.3.6-pl2/include -D FFTW_LIB_PATH=/share/osgeo/fw/fftw/3.3.6-pl2/lib -D KEA_INCLUDE_DIR=/share/osgeo/fw/libkea/1.30/include/ -D KEA_LIB_PATH=/share/osgeo/fw/libkea/1.30/lib/ -D GMP_INCLUDE_DIR=/share/osgeo/fw/gmp/5.0.5/include -D GMP_LIB_PATH=/share/osgeo/fw/gmp/5.0.5/lib -D MUPARSER_INCLUDE_DIR=/share/osgeo/fw/muparser/2.2.5/include/ -D MUPARSER_LIB_PATH=/share/osgeo/fw/muparser/2.2.5/lib/ -D CMAKE_VERBOSE_MAKEFILE=ON . make clean; make; sudo make install export LD_LIBRARY_PATH=/share/osgeo/fw/fftw/3.3.6-pl2/lib:/share/osgeo/fw/gdal/2.2.0/lib:/share/osgeo/fw/geos/3.5.0/lib:/share/osgeo/fw/gmp/5.0.5/lib:/share/osgeo/fw/gsl/2.4/lib:/share/osgeo/fw/hdf5/1.8.19/lib:/share/osgeo/fw/libkea/1.30/lib:/share/osgeo/fw/muparser/2.2.5/lib:/share/osgeo/fw/proj4/4.9.3/lib:/share/osgeo/fw/xerces-c/3.1.4/lib
Keyword(s):
References:[とらりもんHOME]