目录
GEOS 使用记录
官网
https://trac.osgeo.org/geos/
https://libgeos.org/
下载地址
https://libgeos.org/usage/download/
参考资料
什么是 GEOS?
官网:
GEOS is a C/C++ library for spatial computational geometry of the sort generally used by “geographic information systems” software. GEOS is a core dependency of PostGIS, QGIS, GDAL, and Shapely.
安装
Ubuntu 环境
从源码构建要求:
- CMake 3.13 or later.
- C++11 compiler. We regularly test GCC, Clang and Microsoft Visual C++.
- Doxygen to build the API documentation.
安装 CMake 命令:
由于我的Ubuntu 版本是 18.04 ,自带的 Cmake 是 3.10 不满足要求需要自行安装cmake,参见《Ubuntu 安装 cmake》
1. 下载 geos-3.10.1.tar.bz2
下载地址:https://download.osgeo.org/geos/geos-3.10.1.tar.bz2
注意: 谷歌浏览器直接点击下载无法下载,需将连接换成 https开头才能下载。
2. 解压 geos-3.10.1.tar.bz2
命令:
tar -jxvf geos-3.10.1.tar.bz2
3. 配置构建
命令:
cd geos-3.10.1
mkdir _build
cd _build
# Set up the build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local /home/public/Soft/geos-3.10.1/
# Run the build, test, install steps
make
4. 安装
sudo make install
5. 将命令脚本软链到 /usr/bin/,供全局使用
sudo ln -s /usr/local/bin/* /usr/bin/
6.验证
ctest
至此,安装完成。
本文来自博客园,作者:不安分的黑娃,转载请注明原文链接:https://www.cnblogs.com/lihw-study/p/15661878.html