PostGIS 3.5 SFCGAL Cheatsheet

New in this release 1Enhanced in this release 2   Requires SFCGAL 1.5 or higher cg1.5Aggregate agg    Window function W   2.5/3D support 3d   SQL-MMmm  
SFCGAL Management Functions
postgis_sfcgal_version ()    Returns the version of SFCGAL in use
postgis_sfcgal_full_version ()    Returns the full version of SFCGAL in use including CGAL and Boost versions

SFCGAL Accessors and Setters
ST_3DArea  mm  3d (geom1)    Computes area of 3D surface geometries. Will return 0 for solids.
ST_ForceLHR  3d (geom)    Force LHR orientation
ST_IsPlanar  3d (geom)    Check if a surface is or not planar
ST_IsSolid  3d (geom1)    Test if the geometry is a solid. No validity check is performed.
ST_MakeSolid  3d (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_Orientation  3d (geom)    Determine surface orientation
ST_Volume  mm  3d (geom1)    Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.

SFCGAL Processing and Relationship Functions
ST_3DConvexHull  3d (geom1)    Computes the 3D convex hull of a geometry.
ST_3DIntersection  mm  3d (geom1, geom2)    Perform 3D intersection
ST_3DDifference  mm  3d (geom1, geom2)    Perform 3D difference
ST_3DUnion  mm  3d    Perform 3D union.
  1. geom1, geom2
  2. g1field agg
ST_AlphaShape (geom, alpha, allow_holes = false)    Computes an Alpha-shape enclosing a geometry
CG_ApproxConvexPartition  1  cg1.5 (geom)    Computes approximal convex partition of the polygon geometry
ST_ApproximateMedialAxis  3d (geom)    Compute the approximate medial axis of an areal geometry.
ST_ConstrainedDelaunayTriangles  3d (g1)    Return a constrained Delaunay triangulation around the given input geometry.
ST_Extrude  3d (geom, x, y, z)    Extrude a surface to a related volume
CG_ExtrudeStraightSkeleton  1  cg1.5 (geom, roof_height, body_height = 0)    Straight Skeleton Extrusion
CG_GreeneApproxConvexPartition  1  cg1.5 (geom)    Computes approximal convex partition of the polygon geometry
ST_MinkowskiSum (geom1, geom2)    Performs Minkowski sum
ST_OptimalAlphaShape (geom, allow_holes = false, nb_components = 1)    Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
CG_OptimalConvexPartition  1  cg1.5 (geom)    Computes an optimal convex partition of the polygon geometry
ST_StraightSkeleton  3d (geom)    Compute a straight skeleton from a geometry
ST_Tesselate  3d (geom)    Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
CG_Visibility  1  cg1.5  3d    Compute a visibility polygon from a point or a segment in a polygon geometry
  1. polygon, point
  2. polygon, pointA, pointB
CG_YMonotonePartition  1  cg1.5 (geom)    Computes y-monotone partition of the polygon geometry