Name

CG_Difference — Computes the geometric difference between two geometries

Synopsis

geometry CG_Difference( geometry geomA , geometry geomB );

Beschreibung

Computes the geometric difference between two geometries. The resulting geometry is a set of points that are present in geomA but not in geomB.

Performed by the SFCGAL module

[Note]

NOTE: this function returns a geometry.

Verfügbarkeit: 3.5.0

Diese Methode benötigt ein SFCGAL-Backend.

Diese Funktion unterstützt Dreiecke und dreieckige unregelmäßige Netzoberflächen (TIN).

Beispiele mit dem geometrischen Datentyp

SELECT ST_AsText(CG_Difference('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::geometry, 'LINESTRING(0 0, 2 2)'::geometry));
    cg_difference
    ---------------
    POLYGON((0 0,1 0,1 1,0 1,0 0))
    (1 row)