版本信息
| Server | Version |
|---|---|
| CentOS | 7.6 |
| CGAL | 4.13.2 |
| SFCGAL | 1.3.8 |
一、概述
SFCGAL官网
SFCGAL是一个围绕CGAL(Computational Geometry Algorithms Library - 计算几何算法库)的c++包装库,旨在支持ISO 19107:2013和OGC简单特性Access 1.2用于3D操作。
SFCGAL提供了符合标准的几何类型和操作,可以通过其C或c++ api访问。PostGIS使用C API,在空间数据库中公开一些SFCGAL的功能(参见PostGIS手册)。
安装要求
Supported platforms SFCGAL has been successfully compiled and tested on the following platforms :
- Linux 32 and 64 bits with gcc and clang-3.0
- Windows with mingw
- MacOSX with clang-4.0 (please note that a compilation error occures with clang-3.1)
Requirements
- A C++ compiler, see above for supported platforms
- CMake version ≥ 2.8.6
- CGAL version ≥ 4.3
- Boost version ≥ 1.54
- MPFR version ≥ 2.2.1
- GMP version ≥ 4.2
二、先决条件
# CGAL
➜ wget https://github.com/CGAL/cgal/archive/releases/CGAL-4.13.2.tar.gz
➜ tar -zxf CGAL-4.13.2.tar.gz
➜ mkdir -p build/release; cd build/release
➜ cmake3 -DCMAKE_BUILD_TYPE=Release ../..
➜ make && make install
# Boost
# ➜ wget https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.gz
# ➜ tar -zxf boost_1_74_0.tar.gz
# ➜ cd boost_1_74_0/
# ➜ ./bootstrap.sh --with-libraries=all --with-toolset=gcc
# ➜ ./b2 install
# MPFR
➜ yum info mpfr
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Installed Packages
Name : mpfr
Arch : x86_64
Version : 3.1.1
# GMP
➜ yum info gmp
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Installed Packages
Name : gmp
Arch : x86_64
Epoch : 1
Version : 6.0.0
三、编译
# SFCGAL
➜ wget https://gitlab.com/Oslandia/SFCGAL/-/archive/v1.3.8/SFCGAL-v1.3.8.tar.gz
➜ tar -zxf SFCGAL-v1.3.8.tar.gz
# 编译
➜ cd SFCGAL-v1.3.8
➜ cmake3 . && make && make install
参考链接:
1、搜索libSFCGAL.so包
2、sfcgal官网