PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ST_Points()

Datum ST_Points ( PG_FUNCTION_ARGS  )

Definition at line 3052 of file lwgeom_functions_basic.c.

3053{
3054 if (PG_ARGISNULL(0))
3055 {
3056 PG_RETURN_NULL();
3057 }
3058 else
3059 {
3060 GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
3061 GSERIALIZED *ret;
3062 LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
3063 LWMPOINT *result = lwmpoint_from_lwgeom(lwgeom);
3064
3065 lwgeom_free(lwgeom);
3066
3068 lwmpoint_free(result);
3069 PG_RETURN_POINTER(ret);
3070 }
3071}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * lwmpoint_as_lwgeom(const LWMPOINT *obj)
Definition lwgeom.c:286
void lwmpoint_free(LWMPOINT *mpt)
Definition lwmpoint.c:72
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1138
LWMPOINT * lwmpoint_from_lwgeom(const LWGEOM *g)
Definition lwmpoint.c:93
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

References geometry_serialize(), lwgeom_free(), lwgeom_from_gserialized(), lwmpoint_as_lwgeom(), lwmpoint_free(), and lwmpoint_from_lwgeom().

Here is the call graph for this function: