PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum ST_Points ( PG_FUNCTION_ARGS  )

Definition at line 2965 of file lwgeom_functions_basic.c.

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

2966 {
2967  if (PG_ARGISNULL(0))
2968  {
2969  PG_RETURN_NULL();
2970  }
2971  else
2972  {
2973  GSERIALIZED* geom = PG_GETARG_GSERIALIZED_P(0);
2974  GSERIALIZED* ret;
2975  LWGEOM* lwgeom = lwgeom_from_gserialized(geom);
2976  LWMPOINT* result = lwmpoint_from_lwgeom(lwgeom);
2977 
2978  lwgeom_free(lwgeom);
2979 
2980  ret = geometry_serialize(lwmpoint_as_lwgeom(result));
2981  lwmpoint_free(result);
2982  PG_RETURN_POINTER(ret);
2983  }
2984 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
LWMPOINT * lwmpoint_from_lwgeom(const LWGEOM *g)
Definition: lwmpoint.c:93
void lwmpoint_free(LWMPOINT *mpt)
Definition: lwmpoint.c:72
LWGEOM * geom
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwmpoint_as_lwgeom(const LWMPOINT *obj)
Definition: lwgeom.c:294

Here is the call graph for this function: