PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ ST_CollectionHomogenize()

Datum ST_CollectionHomogenize ( PG_FUNCTION_ARGS  )

Definition at line 2878 of file lwgeom_functions_basic.c.

2879 {
2880  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
2881  GSERIALIZED *output;
2882  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
2883  LWGEOM *lwoutput = NULL;
2884 
2885  lwoutput = lwgeom_homogenize(lwgeom);
2886  lwgeom_free(lwgeom);
2887 
2888  if (!lwoutput)
2889  {
2890  PG_FREE_IF_COPY(input, 0);
2891  PG_RETURN_NULL();
2892  }
2893 
2894  output = geometry_serialize(lwoutput);
2895  lwgeom_free(lwoutput);
2896 
2897  PG_FREE_IF_COPY(input, 0);
2898  PG_RETURN_POINTER(output);
2899 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
LWGEOM * lwgeom_homogenize(const LWGEOM *geom)
Definition: lwhomogenize.c:208

References lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_homogenize().

Here is the call graph for this function: