PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ ST_IsCollection()

Datum ST_IsCollection ( PG_FUNCTION_ARGS  )

Definition at line 2085 of file lwgeom_functions_basic.c.

References dumpnode::geom, gserialized_get_type(), LWGEOM_makepoint(), lwtype_is_collection(), PG_FUNCTION_INFO_V1(), and ovdump::type.

Referenced by ST_MakeEnvelope().

2086 {
2087  GSERIALIZED *geom;
2088  int type;
2089  size_t size;
2090 
2091  /* Pull only a small amount of the tuple, enough to get the type. */
2092  /* header + srid/flags + bbox? + type number */
2093  size = VARHDRSZ + 8 + 32 + 4;
2094 
2095  geom = PG_GETARG_GSERIALIZED_P_SLICE(0, 0, size);
2096 
2097  type = gserialized_get_type(geom);
2098  PG_RETURN_BOOL(lwtype_is_collection(type));
2099 }
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
LWGEOM * geom
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
Definition: lwgeom.c:1048
type
Definition: ovdump.py:41
Here is the call graph for this function:
Here is the caller graph for this function: