PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ lwgeom_unstroke()

LWGEOM * lwgeom_unstroke ( const LWGEOM geom)

Definition at line 1160 of file lwstroke.c.

References COLLECTIONTYPE, LINETYPE, lwcollection_unstroke(), LWDEBUG, lwgeom_clone_deep(), lwline_unstroke(), lwmline_unstroke(), lwmpolygon_unstroke(), lwpolygon_unstroke(), MULTILINETYPE, MULTIPOLYGONTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by lwcollection_unstroke(), LWGEOM_line_desegmentize(), and test_unstroke().

1161 {
1162  LWDEBUG(2, "lwgeom_unstroke called.");
1163 
1164  switch (geom->type)
1165  {
1166  case LINETYPE:
1167  return lwline_unstroke((LWLINE *)geom);
1168  case POLYGONTYPE:
1169  return lwpolygon_unstroke((LWPOLY *)geom);
1170  case MULTILINETYPE:
1171  return lwmline_unstroke((LWMLINE *)geom);
1172  case MULTIPOLYGONTYPE:
1173  return lwmpolygon_unstroke((LWMPOLY *)geom);
1174  case COLLECTIONTYPE:
1175  return lwcollection_unstroke((LWCOLLECTION *)geom);
1176  default:
1177  return lwgeom_clone_deep(geom);
1178  }
1179 }
#define LINETYPE
Definition: liblwgeom.h:85
#define POLYGONTYPE
Definition: liblwgeom.h:86
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
Definition: lwgeom.c:520
LWGEOM * lwpolygon_unstroke(const LWPOLY *poly)
Definition: lwstroke.c:1047
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
LWGEOM * lwline_unstroke(const LWLINE *line)
Definition: lwstroke.c:1038
uint8_t type
Definition: liblwgeom.h:398
#define MULTILINETYPE
Definition: liblwgeom.h:88
LWGEOM * lwcollection_unstroke(const LWCOLLECTION *c)
Definition: lwstroke.c:1132
LWGEOM * lwmpolygon_unstroke(const LWMPOLY *mpoly)
Definition: lwstroke.c:1104
#define COLLECTIONTYPE
Definition: liblwgeom.h:90
LWGEOM * lwmline_unstroke(const LWMLINE *mline)
Definition: lwstroke.c:1076
Here is the call graph for this function:
Here is the caller graph for this function: