ST_PatchN — Returns the Nth face of a PolyhedralSurface or TIN.
geometry ST_PatchN(geometry geomA, integer n);
Returns the 1-based Nth face of a PolyhedralSurface or TIN. Returns NULL for other geometries or an out-of-range index. Use this function to access faces, because ST_GeometryN treats PolyhedralSurface and TIN as unitary geometries.
|
|
|
Der Index ist auf 1 basiert. |
|
|
|
Falls Sie alle Geometrien einer Geometrie entnehmen wollen, so ist ST_Dump wesentlich leistungsfähiger. |
Verfügbarkeit: 2.0.0
Diese Methode setzt die SQL/MM-Spezifikation um. SQL-MM ISO/IEC 13249-3: 8.5
Diese Funktion unterstützt 3d und lässt den Z-Index nicht fallen.
Diese Funktion unterstützt polyedrische Flächen.
Diese Funktion unterstützt Dreiecke und dreieckige unregelmäßige Netzoberflächen (TIN).
Extract the 2nd face of the polyhedral surface.
SELECT ST_PatchN(geom, 2) As geomewkt
FROM (
VALUES ('POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)) )'::geometry) ) As foo(geom);
POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))
ST_AsEWKT, ST_GeomFromEWKT, ST_Dump, ST_GeometryN, ST_NumGeometries, ST_NumPatches