PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ ST_UnaryUnion()

Datum ST_UnaryUnion ( PG_FUNCTION_ARGS  )

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

References geometry_serialize(), geos_geomunion(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_unaryunion(), and PG_FUNCTION_INFO_V1().

Referenced by pgis_union_geometry_array().

486 {
487  GSERIALIZED *geom1;
488  GSERIALIZED *result;
489  LWGEOM *lwgeom1, *lwresult ;
490 
491  geom1 = PG_GETARG_GSERIALIZED_P(0);
492 
493 
494  lwgeom1 = lwgeom_from_gserialized(geom1) ;
495 
496  lwresult = lwgeom_unaryunion(lwgeom1);
497  result = geometry_serialize(lwresult) ;
498 
499  lwgeom_free(lwgeom1) ;
500  lwgeom_free(lwresult) ;
501 
502  PG_FREE_IF_COPY(geom1, 0);
503 
504  PG_RETURN_POINTER(result);
505 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_unaryunion(const LWGEOM *geom1)
Here is the call graph for this function:
Here is the caller graph for this function: