PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_segmentize ( LWGEOM geom,
uint32_t  perQuad 
)

Definition at line 446 of file lwsegmentize.c.

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, lwcircstring_segmentize(), lwcollection_segmentize(), lwcompound_segmentize(), lwcurvepoly_segmentize(), lwgeom_clone(), lwmcurve_segmentize(), lwmsurface_segmentize(), MULTICURVETYPE, MULTISURFACETYPE, and LWGEOM::type.

Referenced by LWGEOM_curve_segmentize(), lwgeom_force_sfs(), and test_ptarray_desegmentize().

447 {
448  LWGEOM * ogeom = NULL;
449  switch (geom->type)
450  {
451  case CIRCSTRINGTYPE:
452  ogeom = (LWGEOM *)lwcircstring_segmentize((LWCIRCSTRING *)geom, perQuad);
453  break;
454  case COMPOUNDTYPE:
455  ogeom = (LWGEOM *)lwcompound_segmentize((LWCOMPOUND *)geom, perQuad);
456  break;
457  case CURVEPOLYTYPE:
458  ogeom = (LWGEOM *)lwcurvepoly_segmentize((LWCURVEPOLY *)geom, perQuad);
459  break;
460  case MULTICURVETYPE:
461  ogeom = (LWGEOM *)lwmcurve_segmentize((LWMCURVE *)geom, perQuad);
462  break;
463  case MULTISURFACETYPE:
464  ogeom = (LWGEOM *)lwmsurface_segmentize((LWMSURFACE *)geom, perQuad);
465  break;
466  case COLLECTIONTYPE:
467  ogeom = (LWGEOM *)lwcollection_segmentize((LWCOLLECTION *)geom, perQuad);
468  break;
469  default:
470  ogeom = lwgeom_clone(geom);
471  }
472  return ogeom;
473 }
LWPOLY * lwcurvepoly_segmentize(const LWCURVEPOLY *curvepoly, uint32_t perQuad)
Definition: lwsegmentize.c:290
#define MULTICURVETYPE
Definition: liblwgeom.h:70
LWMLINE * lwmcurve_segmentize(LWMCURVE *mcurve, uint32_t perQuad)
Definition: lwsegmentize.c:334
#define CURVEPOLYTYPE
Definition: liblwgeom.h:69
#define COMPOUNDTYPE
Definition: liblwgeom.h:68
LWLINE * lwcircstring_segmentize(const LWCIRCSTRING *icurve, uint32_t perQuad)
Definition: lwsegmentize.c:191
LWLINE * lwcompound_segmentize(const LWCOMPOUND *icompound, uint32_t perQuad)
Definition: lwsegmentize.c:243
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:351
#define MULTISURFACETYPE
Definition: liblwgeom.h:71
uint8_t type
Definition: liblwgeom.h:352
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:67
#define COLLECTIONTYPE
Definition: liblwgeom.h:66
LWCOLLECTION * lwcollection_segmentize(LWCOLLECTION *collection, uint32_t perQuad)
Definition: lwsegmentize.c:408
LWMPOLY * lwmsurface_segmentize(LWMSURFACE *msurface, uint32_t perQuad)
Definition: lwsegmentize.c:372

Here is the call graph for this function:

Here is the caller graph for this function: