PostGIS 3.3 PostGIS SFCGAL Cheatsheet

SFCGAL is a C++ wrapper library around CGAL that provides advanced 2D and 3D spatial functions. For robustness, geometry coordinates have an exact rational number representation. Installation instructions for the library can be found on the SFCGAL home page ( To enable the functions use create extension postgis_sfcgal. SFCGAL Functions
postgis_sfcgal_version3D ()    Returns the version of SFCGAL in use
postgis_sfcgal_full_version1 3D ()    Returns the full version of SFCGAL in use including CGAL and Boost versions
ST_3DAreamm 3D (geom1)    Computes area of 3D surface geometries. Will return 0 for solids.
ST_3DConvexHull1 3D (geom1)    Computes the 3D convex hull of a geometry.
ST_3DIntersectionmm 3D (geom1, geom2)    Perform 3D intersection
ST_3DDifferencemm 3D (geom1, geom2)    Perform 3D difference
ST_3DUnion1 mm 3D    Perform 3D union.
  1. geom1, geom2
  2. g1field
ST_AlphaShape1 (geom, alpha, allow_holes = false)    Computes a possible concave geometry using the CGAL Alpha Shapes algorithm.
ST_ApproximateMedialAxis3D (geom)    Compute the approximate medial axis of an areal geometry.
ST_ConstrainedDelaunayTriangles3D (g1)    Return a constrained Delaunay triangulation around the given input geometry.
ST_Extrude3D (geom, x, y, z)    Extrude a surface to a related volume
ST_ForceLHR3D (geom)    Force LHR orientation
ST_IsPlanar3D (geom)    Check if a surface is or not planar
ST_IsSolid3D (geom1)    Test if the geometry is a solid. No validity check is performed.
ST_MakeSolid3D (geom1)    Cast the geometry into a solid. No check is performed. To obtain a valid solid, the input geometry must be a closed Polyhedral Surface or a closed TIN.
ST_MinkowskiSum (geom1, geom2)    Performs Minkowski sum
ST_OptimalAlphaShape1 (param_geom, allow_holes = false, nb_components)    Computes a possible concave geometry using the CGAL Alpha Shapes algorithm after have computed the "optimal" alpha value.
ST_Orientation3D (geom)    Determine surface orientation
ST_StraightSkeleton3D (geom)    Compute a straight skeleton from a geometry
ST_Tesselate3D (geom)    Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
ST_Volumemm 3D (geom1)    Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.