PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum ST_RemoveRepeatedPoints ( PG_FUNCTION_ARGS  )

Definition at line 2669 of file lwgeom_functions_basic.c.

References geometry_serialize(), input(), lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_remove_repeated_points().

2670 {
2671  GSERIALIZED *input = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0));
2672  GSERIALIZED *output;
2673  LWGEOM *lwgeom_in = lwgeom_from_gserialized(input);
2674  LWGEOM *lwgeom_out;
2675 
2676  /* lwnotice("ST_RemoveRepeatedPoints got %p", lwgeom_in); */
2677 
2678  lwgeom_out = lwgeom_remove_repeated_points(lwgeom_in);
2679  output = geometry_serialize(lwgeom_out);
2680 
2681  lwgeom_free(lwgeom_in);
2682  PG_FREE_IF_COPY(input, 0);
2683 
2684  PG_RETURN_POINTER(output);
2685 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
static int input(void)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_remove_repeated_points(LWGEOM *in)
Remove repeated points!
Definition: lwgeom.c:1339

Here is the call graph for this function: