PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ ST_UnaryUnion()

Datum ST_UnaryUnion ( PG_FUNCTION_ARGS  )

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

526 {
527  GSERIALIZED *geom1;
528  GSERIALIZED *result;
529  LWGEOM *lwgeom1, *lwresult ;
530 
531  geom1 = PG_GETARG_GSERIALIZED_P(0);
532 
533  lwgeom1 = lwgeom_from_gserialized(geom1) ;
534 
535  lwresult = lwgeom_unaryunion(lwgeom1);
536  result = geometry_serialize(lwresult) ;
537 
538  lwgeom_free(lwgeom1) ;
539  lwgeom_free(lwresult) ;
540 
541  PG_FREE_IF_COPY(geom1, 0);
542 
543  PG_RETURN_POINTER(result);
544 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
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: