SFCGAL 2.1.0: New Features and Improvements

By Wednesday May 14th, 2025, GIS, NewsFR, PostGIS, QGIS, SFCGAL

SFCGAL 2.1.0 : New Features and Improvements

The upcoming version 2.1.0 of SFCGAL will soon be available, bringing with it a host of new features and improvements
for this library dedicated to 3D spatial geometry.

What’s New?

SFCGAL 2.1.0 introduces several significant additions:

  • 3D Alpha Wrapping: A new algorithm that allows for the reconstruction of surfaces from point
    clouds.
  • Wrapper for CGAL’s 2.5D Simplification: This wrapper supports Z and M coordinates, facilitating
    geometric simplifications.
  • Unified Surface Processing: PolyhedralSurface and TriangulatedSurface are now treated as a
    single entity rather than just a collection of polygons or triangles.

In a bid for standardization and to meet more common needs, this version also offers:

  • New Coordinate Operations: Addition of the functions force_z,
    force_m, dropZ, dropM, and swapXY.
  • Geometric Analysis Functions: New functions to calculate centroid, length, boundary, and
    dimension.

    • AlphaWrapping 3D:
      "Standford Bunny de CGAL" - 3D bunny mesh view with point cloud
      “CGAL Standford Bunny”
      3D bunny mesh view with point cloud
      "Standford Bunny de CGAL" - 3D bunny top view
      “CGAL Standford Bunny”
      3D bunny top view
      "Standford Bunny de CGAL" - 3D bunny front view
      “CGAL Standford Bunny”
      3D bunny front view
    • Simplification:
      France Simplification 10000
      France Simplification 10000

Improvements and Fixes

This update also includes numerous fixes and optimizations:

    • Segmentation Fault Fix: Resolution of a bug in the Alpha Wrapping algorithm with gcc
      15.1.
    • Allocation Optimizations: Improvements in geometric functions for better performance.
    • Validity Checks: Added checks in the partition algorithm.
    • Enhanced Documentation: Improvements to the C API for better understanding.
    • Build System Modernization: Updated with CMake for smoother integration.

PySFCGAL

PySFCGAL, the Python version of SFCGAL, has also been updated to incorporate all the new features introduced in this latest version of SFCGAL. Another new feature: a cookbook is now available. It provides code snippets and several practical examples to illustrate how to use PySFCGAL, complementing the existing documentation. We plan to expand it in future versions.

Integration with Other GIS Tools

The new features of SFCGAL 2.1.0 will be integrated into PostGIS 3.6.0 and are expected to be available in
upcoming versions of QGIS. This will allow users of these software tools to benefit from advancements in 3D
geometry processing.

This version enhances the tools available for managing complex 3D geometries in geographic information systems.

Infrastructure and Maintenance

Version 2.1.0 also improves the development infrastructure:

  • Continuous Integration Pipeline Updates: To ensure better code quality.
  • Testing on New Platforms: This time, we have expanded our compatibility to BSD systems,
    including FreeBSD, NetBSD, and OpenBSD, as well as macOS.
  • Documentation and Quality Control: Strengthening of documentation resources and
    verification processes.

If you are interested in using SFCGAL for your 3D GIS projects or if you would like to contribute to its
development, please feel free to contact us!