PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ ST_UnaryUnion()

Datum ST_UnaryUnion ( PG_FUNCTION_ARGS  )

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

561 {
562  GSERIALIZED *geom1;
563  GSERIALIZED *result;
564  LWGEOM *lwgeom1, *lwresult ;
565 
566  geom1 = PG_GETARG_GSERIALIZED_P(0);
567 
568 
569  lwgeom1 = lwgeom_from_gserialized(geom1) ;
570 
571  lwresult = lwgeom_unaryunion(lwgeom1);
572  result = geometry_serialize(lwresult) ;
573 
574  lwgeom_free(lwgeom1) ;
575  lwgeom_free(lwresult) ;
576 
577  PG_FREE_IF_COPY(geom1, 0);
578 
579  PG_RETURN_POINTER(result);
580 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
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: