PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ ST_Points()

Datum ST_Points ( PG_FUNCTION_ARGS  )

Definition at line 3015 of file lwgeom_functions_basic.c.

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

Referenced by ST_Scale().

3016 {
3017  if (PG_ARGISNULL(0))
3018  {
3019  PG_RETURN_NULL();
3020  }
3021  else
3022  {
3023  GSERIALIZED* geom = PG_GETARG_GSERIALIZED_P(0);
3024  GSERIALIZED* ret;
3025  LWGEOM* lwgeom = lwgeom_from_gserialized(geom);
3026  LWMPOINT* result = lwmpoint_from_lwgeom(lwgeom);
3027 
3028  lwgeom_free(lwgeom);
3029 
3030  ret = geometry_serialize(lwmpoint_as_lwgeom(result));
3031  lwmpoint_free(result);
3032  PG_RETURN_POINTER(ret);
3033  }
3034 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
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:295
Here is the call graph for this function:
Here is the caller graph for this function: