Chapter 8. SFCGAL Functions Reference

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 (http://www.sfcgal.org). To enable the functions use `create extension postgis_sfcgal`.

8.1. SFCGAL Management Functions

Abstract

This section lists functions for determining version of SFCGAL and library dependencies you are running.

• — Returns the version of SFCGAL in use
• — Returns the full version of SFCGAL in use including CGAL and Boost versions

8.2. SFCGAL Accessors and Setters

Abstract

These functions access or set properties of geometries. Geometries primarily supported by these functions are TINS and Polyhedral Surfaces.

• — Force LHR orientation
• — Check if a surface is or not planar
• — Test if the geometry is a solid. No validity check is performed.
• — 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.
• — Determine surface orientation
• — Calculates the area of a geometry
• — Computes area of 3D surface geometries. Will return 0 for solids.
• — Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.
• — Force LHR orientation
• — Check if a surface is or not planar
• — Test if the geometry is a solid. No validity check is performed.
• — 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.
• — Determine surface orientation
• — Computes area of 3D surface geometries. Will return 0 for solids.
• — Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.

8.3. SFCGAL Processing and Relationship Functions

• — Computes the intersection of two geometries
• — Tests if two geometries intersect (they have at least one point in common)
• — Tests if two 3D geometries intersect
• — Computes the geometric difference between two geometries
• — Perform 3D difference
• — Perform 3D difference
• — Computes the minimum distance between two geometries
• — Computes the minimum 3D distance between two geometries
• — Computes the 3D convex hull of a geometry.
• — Computes the 3D convex hull of a geometry.
• — Perform 3D intersection
• — Perform 3D intersection
• — Computes the union of two geometries
• — Perform 3D union.
• — Perform 3D union.
• — Computes an Alpha-shape enclosing a geometry
• — Computes an Alpha-shape enclosing a geometry
• — Computes approximal convex partition of the polygon geometry
• — Compute the approximate medial axis of an areal geometry.
• — Compute the approximate medial axis of an areal geometry.
• — Return a constrained Delaunay triangulation around the given input geometry.
• — Return a constrained Delaunay triangulation around the given input geometry.
• — Extrude a surface to a related volume
• — Extrude a surface to a related volume
• — Straight Skeleton Extrusion
• — Computes approximal convex partition of the polygon geometry
• — Performs Minkowski sum
• — Performs Minkowski sum
• — Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
• — Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
• — Computes an optimal convex partition of the polygon geometry
• — Compute a straight skeleton from a geometry
• — Compute a straight skeleton from a geometry
• — Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
• — Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
• — Triangulates a polygonal geometry
• — Compute a visibility polygon from a point or a segment in a polygon geometry
• — Computes y-monotone partition of the polygon geometry