PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ lwgeom_unstroke()

LWGEOM * lwgeom_unstroke ( const LWGEOM geom)

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

1148 {
1149  LWDEBUG(2, "lwgeom_unstroke called.");
1150 
1151  switch (geom->type)
1152  {
1153  case LINETYPE:
1154  return lwline_unstroke((LWLINE *)geom);
1155  case POLYGONTYPE:
1156  return lwpolygon_unstroke((LWPOLY *)geom);
1157  case MULTILINETYPE:
1158  return lwmline_unstroke((LWMLINE *)geom);
1159  case MULTIPOLYGONTYPE:
1160  return lwmpolygon_unstroke((LWMPOLY *)geom);
1161  case COLLECTIONTYPE:
1162  return lwcollection_unstroke((LWCOLLECTION *)geom);
1163  default:
1164  return lwgeom_clone_deep(geom);
1165  }
1166 }
#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:1034
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
LWGEOM * lwline_unstroke(const LWLINE *line)
Definition: lwstroke.c:1025
uint8_t type
Definition: liblwgeom.h:398
#define MULTILINETYPE
Definition: liblwgeom.h:88
LWGEOM * lwcollection_unstroke(const LWCOLLECTION *c)
Definition: lwstroke.c:1119
LWGEOM * lwmpolygon_unstroke(const LWMPOLY *mpoly)
Definition: lwstroke.c:1091
#define COLLECTIONTYPE
Definition: liblwgeom.h:90
LWGEOM * lwmline_unstroke(const LWMLINE *mline)
Definition: lwstroke.c:1063
Here is the call graph for this function:
Here is the caller graph for this function: