PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ ST_Node()

Datum ST_Node ( PG_FUNCTION_ARGS  )

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

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

Referenced by ST_SharedPaths().

3570 {
3571  GSERIALIZED *geom1, *out;
3572  LWGEOM *g1, *lwgeom_out;
3573 
3574  geom1 = PG_GETARG_GSERIALIZED_P(0);
3575 
3576  g1 = lwgeom_from_gserialized(geom1);
3577 
3578  lwgeom_out = lwgeom_node(g1);
3579  lwgeom_free(g1);
3580 
3581  if ( ! lwgeom_out )
3582  {
3583  PG_FREE_IF_COPY(geom1, 0);
3584  PG_RETURN_NULL();
3585  }
3586 
3587  out = geometry_serialize(lwgeom_out);
3588  lwgeom_free(lwgeom_out);
3589 
3590  PG_FREE_IF_COPY(geom1, 0);
3591  PG_RETURN_POINTER(out);
3592 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
LWGEOM * lwgeom_node(const LWGEOM *lwgeom_in)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
Here is the call graph for this function:
Here is the caller graph for this function: