PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwgeom_unstroke()

LWGEOM * lwgeom_unstroke ( const LWGEOM geom)

Convert linearized type into arc type, de-linearizing the strokes where possible.

Definition at line 1271 of file lwstroke.c.

1272{
1273 LWDEBUG(2, "lwgeom_unstroke called.");
1274
1275 switch (geom->type)
1276 {
1277 case LINETYPE:
1278 return lwline_unstroke((LWLINE *)geom);
1279 case POLYGONTYPE:
1280 return lwpolygon_unstroke((LWPOLY *)geom);
1281 case MULTILINETYPE:
1282 return lwmline_unstroke((LWMLINE *)geom);
1283 case MULTIPOLYGONTYPE:
1284 return lwmpolygon_unstroke((LWMPOLY *)geom);
1285 case COLLECTIONTYPE:
1286 return lwcollection_unstroke((LWCOLLECTION *)geom);
1287 default:
1288 return lwgeom_clone_deep(geom);
1289 }
1290}
#define COLLECTIONTYPE
Definition liblwgeom.h:108
#define MULTILINETYPE
Definition liblwgeom.h:106
#define LINETYPE
Definition liblwgeom.h:103
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:107
#define POLYGONTYPE
Definition liblwgeom.h:104
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
Definition lwgeom.c:557
#define LWDEBUG(level, msg)
Definition lwgeom_log.h:101
LWGEOM * lwmpolygon_unstroke(const LWMPOLY *mpoly)
Definition lwstroke.c:1215
LWGEOM * lwpolygon_unstroke(const LWPOLY *poly)
Definition lwstroke.c:1158
LWGEOM * lwcollection_unstroke(const LWCOLLECTION *c)
Definition lwstroke.c:1243
LWGEOM * lwmline_unstroke(const LWMLINE *mline)
Definition lwstroke.c:1187
LWGEOM * lwline_unstroke(const LWLINE *line)
Definition lwstroke.c:1149
uint8_t type
Definition liblwgeom.h:462

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().

Here is the call graph for this function:
Here is the caller graph for this function: