PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_CollectionHomogenize()

Datum ST_CollectionHomogenize ( PG_FUNCTION_ARGS  )

Definition at line 2880 of file lwgeom_functions_basic.c.

2881 {
2882  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
2883  GSERIALIZED *output;
2884  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
2885  LWGEOM *lwoutput = NULL;
2886 
2887  lwoutput = lwgeom_homogenize(lwgeom);
2888  lwgeom_free(lwgeom);
2889 
2890  if (!lwoutput)
2891  {
2892  PG_FREE_IF_COPY(input, 0);
2893  PG_RETURN_NULL();
2894  }
2895 
2896  output = geometry_serialize(lwoutput);
2897  lwgeom_free(lwoutput);
2898 
2899  PG_FREE_IF_COPY(input, 0);
2900  PG_RETURN_POINTER(output);
2901 }
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:1155
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: