PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_IsCollection()

Datum ST_IsCollection ( PG_FUNCTION_ARGS  )

Definition at line 2092 of file lwgeom_functions_basic.c.

2093 {
2094  GSERIALIZED *geom;
2095  int type;
2096  size_t size;
2097 
2098  /* Pull only a small amount of the tuple, enough to get the type. */
2099  /* header + srid/flags + bbox? + type number */
2100  size = VARHDRSZ + 8 + 32 + 4;
2101 
2102  geom = PG_GETARG_GSERIALIZED_P_SLICE(0, 0, size);
2103 
2104  type = gserialized_get_type(geom);
2105  PG_RETURN_BOOL(lwtype_is_collection(type));
2106 }
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
Definition: g_serialized.c:86
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
Definition: lwgeom.c:1093
type
Definition: ovdump.py:41

References gserialized_get_type(), lwtype_is_collection(), and ovdump::type.

Here is the call graph for this function: