PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_Node()

Datum ST_Node ( PG_FUNCTION_ARGS  )

Definition at line 3266 of file postgis/lwgeom_geos.c.

3267 {
3268  GSERIALIZED *geom1, *out;
3269  LWGEOM *g1, *lwgeom_out;
3270 
3271  geom1 = PG_GETARG_GSERIALIZED_P(0);
3272 
3273  g1 = lwgeom_from_gserialized(geom1);
3274 
3275  lwgeom_out = lwgeom_node(g1);
3276  lwgeom_free(g1);
3277 
3278  if ( ! lwgeom_out )
3279  {
3280  PG_FREE_IF_COPY(geom1, 0);
3281  PG_RETURN_NULL();
3282  }
3283 
3284  out = geometry_serialize(lwgeom_out);
3285  lwgeom_free(lwgeom_out);
3286 
3287  PG_FREE_IF_COPY(geom1, 0);
3288  PG_RETURN_POINTER(out);
3289 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * lwgeom_node(const LWGEOM *lwgeom_in)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

References geometry_serialize(), lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_node().

Here is the call graph for this function: