PostGIS  2.3.7dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_stroke ( const LWGEOM geom,
uint32_t  perQuad 
)

Definition at line 462 of file lwstroke.c.

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, lwcircstring_stroke(), lwcollection_stroke(), lwcompound_stroke(), lwcurvepoly_stroke(), lwgeom_clone(), lwmcurve_stroke(), lwmsurface_stroke(), MULTICURVETYPE, MULTISURFACETYPE, and LWGEOM::type.

Referenced by centroid(), LWGEOM2GEOS(), LWGEOM_curve_segmentize(), lwgeom_force_sfs(), and test_ptarray_unstroke().

463 {
464  LWGEOM * ogeom = NULL;
465  switch (geom->type)
466  {
467  case CIRCSTRINGTYPE:
468  ogeom = (LWGEOM *)lwcircstring_stroke((LWCIRCSTRING *)geom, perQuad);
469  break;
470  case COMPOUNDTYPE:
471  ogeom = (LWGEOM *)lwcompound_stroke((LWCOMPOUND *)geom, perQuad);
472  break;
473  case CURVEPOLYTYPE:
474  ogeom = (LWGEOM *)lwcurvepoly_stroke((LWCURVEPOLY *)geom, perQuad);
475  break;
476  case MULTICURVETYPE:
477  ogeom = (LWGEOM *)lwmcurve_stroke((LWMCURVE *)geom, perQuad);
478  break;
479  case MULTISURFACETYPE:
480  ogeom = (LWGEOM *)lwmsurface_stroke((LWMSURFACE *)geom, perQuad);
481  break;
482  case COLLECTIONTYPE:
483  ogeom = (LWGEOM *)lwcollection_stroke((LWCOLLECTION *)geom, perQuad);
484  break;
485  default:
486  ogeom = lwgeom_clone(geom);
487  }
488  return ogeom;
489 }
#define MULTICURVETYPE
Definition: liblwgeom.h:94
LWMLINE * lwmcurve_stroke(const LWMCURVE *mcurve, uint32_t perQuad)
Definition: lwstroke.c:349
#define CURVEPOLYTYPE
Definition: liblwgeom.h:93
#define COMPOUNDTYPE
Definition: liblwgeom.h:92
LWMPOLY * lwmsurface_stroke(const LWMSURFACE *msurface, uint32_t perQuad)
Definition: lwstroke.c:386
LWCOLLECTION * lwcollection_stroke(const LWCOLLECTION *collection, uint32_t perQuad)
Definition: lwstroke.c:422
LWLINE * lwcircstring_stroke(const LWCIRCSTRING *icurve, uint32_t perQuad)
Definition: lwstroke.c:206
LWPOLY * lwcurvepoly_stroke(const LWCURVEPOLY *curvepoly, uint32_t perQuad)
Definition: lwstroke.c:305
LWLINE * lwcompound_stroke(const LWCOMPOUND *icompound, uint32_t perQuad)
Definition: lwstroke.c:258
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:408
#define MULTISURFACETYPE
Definition: liblwgeom.h:95
uint8_t type
Definition: liblwgeom.h:395
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:91
#define COLLECTIONTYPE
Definition: liblwgeom.h:90

Here is the call graph for this function:

Here is the caller graph for this function: