Definition at line 116 of file lwgeom_ogc.c.
References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, geometry_geometrytype(), gserialized_get_type(), gserialized_has_m(), gserialized_has_z(), gserialized_max_header_size(), LINETYPE, MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, PG_FUNCTION_INFO_V1(), POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, TINTYPE, TRIANGLETYPE, and ovdump::type.
Referenced by LWGEOM_set_srid().
122 static int maxtyplen = 20;
125 text_ob = palloc0(VARHDRSZ + maxtyplen);
126 result = VARDATA(text_ob);
131 strcpy(result,
"POINT");
133 strcpy(result,
"MULTIPOINT");
135 strcpy(result,
"LINESTRING");
137 strcpy(result,
"CIRCULARSTRING");
139 strcpy(result,
"COMPOUNDCURVE");
141 strcpy(result,
"MULTILINESTRING");
143 strcpy(result,
"MULTICURVE");
145 strcpy(result,
"POLYGON");
147 strcpy(result,
"TRIANGLE");
149 strcpy(result,
"CURVEPOLYGON");
151 strcpy(result,
"MULTIPOLYGON");
153 strcpy(result,
"MULTISURFACE");
155 strcpy(result,
"GEOMETRYCOLLECTION");
157 strcpy(result,
"POLYHEDRALSURFACE");
159 strcpy(result,
"TIN");
161 strcpy(result,
"UNKNOWN");
166 SET_VARSIZE(text_ob, strlen(result) + VARHDRSZ);
168 PG_FREE_IF_COPY(gser, 0);
170 PG_RETURN_TEXT_P(text_ob);
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area...
int gserialized_has_m(const GSERIALIZED *gser)
Check if a GSERIALIZED has an M ordinate.
#define POLYHEDRALSURFACETYPE
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
uint32_t gserialized_max_header_size(void)
Returns the size in bytes to read from toast to get the basic information from a geometry: GSERIALIZE...