PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_Points()

Datum ST_Points ( PG_FUNCTION_ARGS  )

Definition at line 3031 of file lwgeom_functions_basic.c.

3032 {
3033  if (PG_ARGISNULL(0))
3034  {
3035  PG_RETURN_NULL();
3036  }
3037  else
3038  {
3039  GSERIALIZED* geom = PG_GETARG_GSERIALIZED_P(0);
3040  GSERIALIZED* ret;
3041  LWGEOM* lwgeom = lwgeom_from_gserialized(geom);
3042  LWMPOINT* result = lwmpoint_from_lwgeom(lwgeom);
3043 
3044  lwgeom_free(lwgeom);
3045 
3046  ret = geometry_serialize(lwmpoint_as_lwgeom(result));
3047  lwmpoint_free(result);
3048  PG_RETURN_POINTER(ret);
3049  }
3050 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwmpoint_free(LWMPOINT *mpt)
Definition: lwmpoint.c:72
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * lwmpoint_as_lwgeom(const LWMPOINT *obj)
Definition: lwgeom.c:295
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: