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

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

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

3421 {
3422  GSERIALIZED *geom1, *out;
3423  LWGEOM *g1, *lwgeom_out;
3424 
3425  geom1 = PG_GETARG_GSERIALIZED_P(0);
3426 
3427  g1 = lwgeom_from_gserialized(geom1);
3428 
3429  lwgeom_out = lwgeom_node(g1);
3430  lwgeom_free(g1);
3431 
3432  if ( ! lwgeom_out )
3433  {
3434  PG_FREE_IF_COPY(geom1, 0);
3435  PG_RETURN_NULL();
3436  }
3437 
3438  out = geometry_serialize(lwgeom_out);
3439  lwgeom_free(lwgeom_out);
3440 
3441  PG_FREE_IF_COPY(geom1, 0);
3442  PG_RETURN_POINTER(out);
3443 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
LWGEOM * lwgeom_node(const LWGEOM *lwgeom_in)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

Here is the call graph for this function: