SFCGAL 1.5.0 has landed!

By Monday November 6th, 20233D, GIS, NewsFR, PostGIS, SFCGAL

SFCGAL is our C++ library that wraps CGAL, in order to support the ISO 19107:2013 and OGC Simple Features Access 1.2 standards for advanced 2D and 3D operations.
It provides geometry types and operations compliant with the standards, accessible through its interfaces in C or C++.
It’s currently used in a wide range of applications, included within PostGIS for advanced 2D and 3D operations, in GDAL, and in certain libraries for complex calculations.
With the release of SFCGAL 1.5.0, we continue to expand its functionalities and offer new possibilities to developers.

Visibility algorithms

SFCGAL 1.5.0 integrates two new visibility algorithms from the CGAL library.

These algorithms enhance the capability to analyze visibility between geometric objects; a crucial feature in a wide array of applications, from urban planning to robotics.

These algorithms enable determining visible areas from a point or an edge, as illustrated in the following example.

Visibility from a point in a dense neighborhood: starting from an arbitrary polygon (in red) around the point (and subtracting the buildings) results in a polygon of visible areas.

New partitioning variants

This version brings significant improvements to polygon partitioning algorithms.

SFCGAL already has got several triangulation algorithms that can partition a polygon . We’ve just added 4 new algorithms, thus catering to the needs of various geospatial and design applications.

partitions dans SFCGAL

Top left: Y Monotone Partition; top right: Approximal Convex Partition; bottom left: Greene Approximal Convex Partition; bottom right: Optimal Convex Partition

Straight skeleton extrusion

One of the most expected features in SFCGAL 1.5.0 is the ability to generate “false” roofs by extruding the straight skeleton of a polygon.

Methods to convert 2D into 3D (those famous buildings!) existed previously, but the quality and efficiency of the algorithm provided by CGAL allow for a significantly more effective solution for this use case, ensuring a precise and functional roof design.

Roof extrusion in QGIS 3D

This paves the way for a generalization of LoD2 for building reconstruction tasks. A detailed architectural representation remains essential for visualization, simulation, and urban planning, especially in this 3D digital twin era!

WKB and EWKB support

In SFCGAL 1.5.0, we’ve also added features for reading and writing WKB and EWKB binary formats to offer greater interoperability with other geospatial systems and formats.

This update strengthens the ease of integrating SFCGAL into existing workflows. It demonstrates our ongoing commitment to improving SFCGAL to meet the various needs of our users.

Deployment issue resolutions

SFCGAL is a complex software relying on equally complex tools. In this context, compilation, integration, and packaging issues represent a notable challenge (which the library might have faced in the past!).

We’ve worked hard to provide solutions to these problems. Rigorous testing processes have been established on different major platforms (Linux, BSD, Windows, and macOS) to ensure that SFCGAL works reliably and consistently (yes, we’re thinking of you, floating-point errors…).

Additionally, we’re committed to developing integration with vcpkg, a multi-platform C++ package management solution. This integration will further facilitate the installation and use of SFCGAL in various environments.

The ecosystem around SFCGAL

This version represents the most significant advancement of SFCGAL in years, so let’s spread the news!

Our goal is to make SFCGAL accessible and functional for a wide range of users, regardless of their needs and platforms. Three additional possibilities exist for those wanting to test these innovations:

  • The functionalities presented here should be available in the next version of PostGIS.
  • The library is accompanied by the Python binding pySFCGAL, which already includes these developments.
  • Furthermore, we’re pleased to inform you that we’re going to work on a QGIS plugin to facilitate their integration into this powerful geographic information system.

 

Stay tuned for more updates on SFCGAL. We’re already working on integrating new algorithms!

If you’d like to discuss this with us, or if you have use cases that could benefit from these innovations, feel free to contact us at info@oslandia.com!