PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_desegmentize ( LWGEOM geom)

Definition at line 841 of file lwsegmentize.c.

References LINETYPE, LWDEBUG, lwgeom_clone(), lwline_desegmentize(), lwmline_desegmentize(), lwmpolygon_desegmentize(), lwpolygon_desegmentize(), MULTILINETYPE, MULTIPOLYGONTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by LWGEOM_line_desegmentize(), and test_ptarray_desegmentize().

842 {
843  LWDEBUG(2, "lwgeom_desegmentize called.");
844 
845  switch (geom->type)
846  {
847  case LINETYPE:
848  return lwline_desegmentize((LWLINE *)geom);
849  case POLYGONTYPE:
850  return lwpolygon_desegmentize((LWPOLY *)geom);
851  case MULTILINETYPE:
852  return lwmline_desegmentize((LWMLINE *)geom);
853  case MULTIPOLYGONTYPE:
854  return lwmpolygon_desegmentize((LWMPOLY *)geom);
855  default:
856  return lwgeom_clone(geom);
857  }
858 }
#define LINETYPE
Definition: liblwgeom.h:61
#define POLYGONTYPE
Definition: liblwgeom.h:62
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
LWGEOM * lwpolygon_desegmentize(LWPOLY *poly)
Definition: lwsegmentize.c:756
LWGEOM * lwmline_desegmentize(LWMLINE *mline)
Definition: lwsegmentize.c:785
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:351
LWGEOM * lwline_desegmentize(LWLINE *line)
Definition: lwsegmentize.c:747
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
LWGEOM * lwmpolygon_desegmentize(LWMPOLY *mpoly)
Definition: lwsegmentize.c:813
uint8_t type
Definition: liblwgeom.h:352
#define MULTILINETYPE
Definition: liblwgeom.h:64

Here is the call graph for this function:

Here is the caller graph for this function: