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

◆ ST_Normalize()

Datum ST_Normalize ( PG_FUNCTION_ARGS  )

Definition at line 1947 of file lwgeom_functions_basic.c.

1948{
1949 GSERIALIZED *in, *out;
1950 LWGEOM *lwgeom_in, *lwgeom_out;
1951
1952 POSTGIS_DEBUG(2, "ST_Normalize called");
1953
1954 in = PG_GETARG_GSERIALIZED_P_COPY(0);
1955
1956 lwgeom_in = lwgeom_from_gserialized(in);
1957 POSTGIS_DEBUGF(3, "Deserialized: %s", lwgeom_summary(lwgeom_in, 0));
1958
1959 lwgeom_out = lwgeom_normalize(lwgeom_in);
1960 POSTGIS_DEBUGF(3, "Normalized: %s", lwgeom_summary(lwgeom_out, 0));
1961
1962 out = geometry_serialize(lwgeom_out);
1963 lwgeom_free(lwgeom_in);
1964 lwgeom_free(lwgeom_out);
1965
1966 PG_FREE_IF_COPY(in, 0);
1967
1968 PG_RETURN_POINTER(out);
1969}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1218
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: