PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ST_CollectionHomogenize()

Datum ST_CollectionHomogenize ( PG_FUNCTION_ARGS  )

Definition at line 2962 of file lwgeom_functions_basic.c.

2963 {
2964  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
2965  GSERIALIZED *output;
2966  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
2967  LWGEOM *lwoutput = NULL;
2968 
2969  lwoutput = lwgeom_homogenize(lwgeom);
2970  lwgeom_free(lwgeom);
2971 
2972  if (!lwoutput)
2973  {
2974  PG_FREE_IF_COPY(input, 0);
2975  PG_RETURN_NULL();
2976  }
2977 
2978  output = geometry_serialize(lwoutput);
2979  lwgeom_free(lwoutput);
2980 
2981  PG_FREE_IF_COPY(input, 0);
2982  PG_RETURN_POINTER(output);
2983 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:268
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
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: