PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ lwgeom_unstroke()

LWGEOM * lwgeom_unstroke ( const LWGEOM geom)

Definition at line 1168 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().

1169 {
1170  LWDEBUG(2, "lwgeom_unstroke called.");
1171 
1172  switch (geom->type)
1173  {
1174  case LINETYPE:
1175  return lwline_unstroke((LWLINE *)geom);
1176  case POLYGONTYPE:
1177  return lwpolygon_unstroke((LWPOLY *)geom);
1178  case MULTILINETYPE:
1179  return lwmline_unstroke((LWMLINE *)geom);
1180  case MULTIPOLYGONTYPE:
1181  return lwmpolygon_unstroke((LWMPOLY *)geom);
1182  case COLLECTIONTYPE:
1183  return lwcollection_unstroke((LWCOLLECTION *)geom);
1184  default:
1185  return lwgeom_clone_deep(geom);
1186  }
1187 }
#define LINETYPE
Definition: liblwgeom.h:86
#define POLYGONTYPE
Definition: liblwgeom.h:87
#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:1055
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
LWGEOM * lwline_unstroke(const LWLINE *line)
Definition: lwstroke.c:1046
uint8_t type
Definition: liblwgeom.h:399
#define MULTILINETYPE
Definition: liblwgeom.h:89
LWGEOM * lwcollection_unstroke(const LWCOLLECTION *c)
Definition: lwstroke.c:1140
LWGEOM * lwmpolygon_unstroke(const LWMPOLY *mpoly)
Definition: lwstroke.c:1112
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
LWGEOM * lwmline_unstroke(const LWMLINE *mline)
Definition: lwstroke.c:1084
Here is the call graph for this function:
Here is the caller graph for this function: