在Ubuntu上安装grassgis,最简单的方法是使用预编译好的包直接进行安装,当然也可以选择下载源码后自己编译再安装,在这里使用的是预编译包安装的方法,除了安装GRASSGIS之外,还需要安装依赖PROJ,GEOS,GDAL
-
GRASS GIS安装
- 日更新的 GRASS GIS 7.x 安装包
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo add-apt-repository ppa:grass/grass-devel
2. 最新的 GRASS GIS 7.x 稳定版安装包
sudo add-apt-repository ppa:ubuntugis/ppa sudo add-apt-repository ppa:grass/grass-stable
3. 添加了ppa源之后,需要运行:
sudo apt-get update
然后执行安装:
sudo apt-get install grass
-
PROJ 安装
# be sure to have an updated system sudo apt-get update && sudo apt-get upgrade -y # install PROJ sudo apt-get install libproj-dev proj-data proj-bin -y
-
GEOS 安装
# install GEOS sudo apt-get install libgeos-dev -y
-
GDAL 安装
# install GDAL sudo apt-get install libgdal-dev python-gdal gdal-bin -y
-
PDAL 安装 (可选)
# install PDAL (optional) sudo apt-get install libpdal-dev pdal libpdal-plugin-python -y
-
安装编译器和其他依赖项 (可选)
# install compiler stuff and further dependencies # this is a single command, please copy-paste it entirely into the terminal: sudo apt-get install \ build-essential \ flex make bison gcc libgcc1 g++ cmake ccache \ python python-dev \ python-opengl \ python-wxversion python-wxtools python-wxgtk3.0 python3-wxgtk4.0 \ python-dateutil libgsl-dev python-numpy \ wx3.0-headers wx-common libwxgtk3.0-dev \ libwxbase3.0-dev \ libncurses5-dev \ libbz2-dev \ zlib1g-dev gettext \ libtiff5-dev libpnglite-dev \ libcairo2 libcairo2-dev \ sqlite3 libsqlite3-dev \ libpq-dev \ libreadline6-dev libfreetype6-dev \ libfftw3-3 libfftw3-dev \ libboost-thread-dev libboost-program-options-dev liblas-c-dev \ subversion libzstd-dev \ checkinstall \ libglu1-mesa-dev libxmu-dev \ ghostscript wget -y
最后,在终端输入grass,即可打开grass界面
grass