PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_Normalize()

Datum ST_Normalize ( PG_FUNCTION_ARGS  )

Definition at line 1944 of file lwgeom_functions_basic.c.

1945 {
1946  GSERIALIZED *in, *out;
1947  LWGEOM *lwgeom_in, *lwgeom_out;
1948 
1949  POSTGIS_DEBUG(2, "ST_Normalize called");
1950 
1951  in = PG_GETARG_GSERIALIZED_P_COPY(0);
1952 
1953  lwgeom_in = lwgeom_from_gserialized(in);
1954  POSTGIS_DEBUGF(3, "Deserialized: %s", lwgeom_summary(lwgeom_in, 0));
1955 
1956  lwgeom_out = lwgeom_normalize(lwgeom_in);
1957  POSTGIS_DEBUGF(3, "Normalized: %s", lwgeom_summary(lwgeom_out, 0));
1958 
1959  out = geometry_serialize(lwgeom_out);
1960  lwgeom_free(lwgeom_in);
1961  lwgeom_free(lwgeom_out);
1962 
1963  PG_FREE_IF_COPY(in, 0);
1964 
1965  PG_RETURN_POINTER(out);
1966 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
Definition: lwgeom_debug.c:158
LWGEOM * lwgeom_normalize(const LWGEOM *geom)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

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

Here is the call graph for this function: