PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ ST_Node()

Datum ST_Node ( PG_FUNCTION_ARGS  )

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

3484 {
3485  GSERIALIZED *geom1, *out;
3486  LWGEOM *g1, *lwgeom_out;
3487 
3488  geom1 = PG_GETARG_GSERIALIZED_P(0);
3489 
3490  g1 = lwgeom_from_gserialized(geom1);
3491 
3492  lwgeom_out = lwgeom_node(g1);
3493  lwgeom_free(g1);
3494 
3495  if ( ! lwgeom_out )
3496  {
3497  PG_FREE_IF_COPY(geom1, 0);
3498  PG_RETURN_NULL();
3499  }
3500 
3501  out = geometry_serialize(lwgeom_out);
3502  lwgeom_free(lwgeom_out);
3503 
3504  PG_FREE_IF_COPY(geom1, 0);
3505  PG_RETURN_POINTER(out);
3506 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
LWGEOM * lwgeom_node(const LWGEOM *lwgeom_in)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155

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

Here is the call graph for this function: