PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ ST_Node()

Datum ST_Node ( PG_FUNCTION_ARGS  )

Definition at line 3269 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().

3270 {
3271  GSERIALIZED *geom1, *out;
3272  LWGEOM *g1, *lwgeom_out;
3273 
3274  geom1 = PG_GETARG_GSERIALIZED_P(0);
3275 
3276  g1 = lwgeom_from_gserialized(geom1);
3277 
3278  lwgeom_out = lwgeom_node(g1);
3279  lwgeom_free(g1);
3280 
3281  if ( ! lwgeom_out )
3282  {
3283  PG_FREE_IF_COPY(geom1, 0);
3284  PG_RETURN_NULL();
3285  }
3286 
3287  out = geometry_serialize(lwgeom_out);
3288  lwgeom_free(lwgeom_out);
3289 
3290  PG_FREE_IF_COPY(geom1, 0);
3291  PG_RETURN_POINTER(out);
3292 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
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: