View on GitHub


About | Authors | Documentation | Development | Screencast | Installation
Download this project as a .zip file Download this project as a tar.gz file


The project uses git and GitHub to manage the source code, bug reports and issues.

You are free to fork the project and welcome to propose evolutions. The prefered way of submitting patches is through the pull request mechanism of GitHub.

Bugs can be reported via the Issues section of the GitHub project.


The master branch of the repository represents the current development version of SFCGAL. Each commit on this branch is enforced not to break the compilation and unit / regression tests.

For each public release, a new tag is created on this branch.

When different major versions are to be maintained, the most recent major version is hosted on the master branch and the older versions have their own branch where fixes can be backported if needed.

In conformance with the git way of development, each new feature is made on its own temporary branch.

Version numbers follow the Semantic Versioning 2.0.0 policy and are tagged as x.y.z where :


The classic way of building with cmake is to first create a build directory and use a CMake client to configure the build (ccmake or cmake-gui).

mkdir build_debug
cd build_debug
ccmake -DCMAKE_BUILD_TYPE=Debug .. && make -j 2 

Environment variables and build options are listed in the instalation section.


SFCGAL comes with different layers of tests. The SFCGAL_BUILD_TESTS CMake option allows to build these tests.

Unit tests are used to test each feature independently with hand-crafted dataset that must cover every possible case. Run it with unit-test-SFCGAL

Regression tests consist of call to functions with real or near-real datasets. Run it with standalone-regress-test-SFCGAL

A garden test (inspired by the eponym PostGIS test) is used to ensure every combination of parameters are acceptable parameters for each function, i.e. that no function crashes on a specific parameter combination that would not be part of the unit tests. Run it with garden-test-SFCGAL

A style test is used to ensure that code is properly formatted before committing. Run the script

Benchmark tests allow to test processing speed of SFCGAL algorithms. Compilation available through the SFCGAL_BUILD_BENCH CMake option.


Valgrind can automatically detect many memory management and threading bugs, and profile programs in detail. Since SFCGAL uses a CGAL Kernel that depends on floating point rounding modes that are not supported by the current version of valgrind, a patched version is necessary:

git clone
cd valgrind/
git clone VEX
./configure && make -j 8 && sudo make install 


The SFCGAL documentation is primarilly written in doxygen. If doxygen is available, you may run make doc to generate the code documentation.


To release of a new SFCGAL version: