GeometryType — Restituisce il tipo di geometria come testo.
text GeometryType(geometry geomA);
Restituisce il tipo di geometria come stringa. Ad esempio: 'LINESTRING', 'POLYGON', 'MULTIPOINT', ecc.
OGC SPEC s2.1.1.1 - Restituisce il nome del sottotipo istanziabile di Geometry di cui questa istanza di Geometry è membro. Il nome del sottotipo istanziabile di Geometry viene restituito come stringa.
|
|
|
Questa funzione indica anche se la geometria è misurata, restituendo una stringa nella forma 'POINTM'. |
Migliorato: Nella 2.0.0 è stato introdotto il supporto per le superfici poliedriche, i triangoli e i TIN.
Questo metodo implementa le OGC Simple Features Implementation Specification for SQL 1.1.
Questo metodo supporta le Curve e le Circular String.
Questa funzione supporta il 3d e non distrugge gli z-index.
Questa funzione supporta le Polyhedral Surface.
Questa funzione supporta i Triangoli e le Triangulated Irregular Network Surfaces (TIN).
SELECT GeometryType('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'::geometry);
LINESTRING
SELECT ST_GeometryType('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)) )');
POLYHEDRALSURFACE
SELECT GeometryType(geom) as result
FROM
(SELECT
'TIN (((
0 0 0,
0 0 1,
0 1 0,
0 0 0
)),((
0 0 0,
0 1 0,
1 1 0,
0 0 0
))
)'::geometry AS geom
) AS g;
TIN