Table of Contents

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`

.

Abstract

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

- 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

Abstract

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

- CG_ForceLHR — Force LHR orientation
- CG_IsPlanar — Check if a surface is or not planar
- CG_IsSolid — Test if the geometry is a solid. No validity check is performed.
- CG_MakeSolid — 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.
- CG_Orientation — Determine surface orientation
- CG_Area — Calculates the area of a geometry
- CG_3DArea — Computes area of 3D surface geometries. Will return 0 for solids.
- CG_Volume — Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.
- ST_ForceLHR — Force LHR orientation
- ST_IsPlanar — Check if a surface is or not planar
- ST_IsSolid — Test if the geometry is a solid. No validity check is performed.
- ST_MakeSolid — 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 — Determine surface orientation
- ST_3DArea — Computes area of 3D surface geometries. Will return 0 for solids.
- ST_Volume — Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.

- CG_Intersection — Computes the intersection of two geometries
- CG_Intersects — Tests if two geometries intersect (they have at least one point in common)
- CG_3DIntersects — Tests if two 3D geometries intersect
- CG_Difference — Computes the geometric difference between two geometries
- ST_3DDifference — Perform 3D difference
- CG_3DDifference — Perform 3D difference
- CG_Distance — Computes the minimum distance between two geometries
- CG_3DDistance — Computes the minimum 3D distance between two geometries
- ST_3DConvexHull — Computes the 3D convex hull of a geometry.
- CG_3DConvexHull — Computes the 3D convex hull of a geometry.
- ST_3DIntersection — Perform 3D intersection
- CG_3DIntersection — Perform 3D intersection
- CG_Union — Computes the union of two geometries
- ST_3DUnion — Perform 3D union.
- CG_3DUnion — Perform 3D union using postgis_sfcgal.
- ST_AlphaShape — Computes an Alpha-shape enclosing a geometry
- CG_AlphaShape — Computes an Alpha-shape enclosing a geometry
- CG_ApproxConvexPartition — Computes approximal convex partition of the polygon geometry
- ST_ApproximateMedialAxis — Compute the approximate medial axis of an areal geometry.
- CG_ApproximateMedialAxis — Compute the approximate medial axis of an areal geometry.
- ST_ConstrainedDelaunayTriangles — Return a constrained Delaunay triangulation around the given input geometry.
- CG_ConstrainedDelaunayTriangles — Return a constrained Delaunay triangulation around the given input geometry.
- ST_Extrude — Extrude a surface to a related volume
- CG_Extrude — Extrude a surface to a related volume
- CG_ExtrudeStraightSkeleton — Straight Skeleton Extrusion
- CG_GreeneApproxConvexPartition — Computes approximal convex partition of the polygon geometry
- ST_MinkowskiSum — Performs Minkowski sum
- CG_MinkowskiSum — Performs Minkowski sum
- ST_OptimalAlphaShape — Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
- CG_OptimalAlphaShape — Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
- CG_OptimalConvexPartition — Computes an optimal convex partition of the polygon geometry
- CG_StraightSkeleton — Compute a straight skeleton from a geometry
- ST_StraightSkeleton — Compute a straight skeleton from a geometry
- ST_Tesselate — Perform surface Tessellation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
- CG_Tesselate — Perform surface Tessellation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
- CG_Triangulate — Triangulates a polygonal geometry
- CG_Visibility — Compute a visibility polygon from a point or a segment in a polygon geometry
- CG_YMonotonePartition — Computes y-monotone partition of the polygon geometry