PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ST_Normalize()

Datum ST_Normalize ( PG_FUNCTION_ARGS  )

Definition at line 1974 of file lwgeom_functions_basic.c.

1975{
1976 GSERIALIZED *in, *out;
1977 LWGEOM *lwgeom_in, *lwgeom_out;
1978
1979 POSTGIS_DEBUG(2, "ST_Normalize called");
1980
1981 in = PG_GETARG_GSERIALIZED_P_COPY(0);
1982
1983 lwgeom_in = lwgeom_from_gserialized(in);
1984 POSTGIS_DEBUGF(3, "Deserialized: %s", lwgeom_summary(lwgeom_in, 0));
1985
1986 lwgeom_out = lwgeom_normalize(lwgeom_in);
1987 POSTGIS_DEBUGF(3, "Normalized: %s", lwgeom_summary(lwgeom_out, 0));
1988
1989 out = geometry_serialize(lwgeom_out);
1990 lwgeom_free(lwgeom_in);
1991 lwgeom_free(lwgeom_out);
1992
1993 PG_FREE_IF_COPY(in, 0);
1994
1995 PG_RETURN_POINTER(out);
1996}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
LWGEOM * lwgeom_normalize(const LWGEOM *geom)

References lwgeom_free(), lwgeom_from_gserialized(), lwgeom_normalize(), and lwgeom_summary().

Here is the call graph for this function: