PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_segmentize2d ( LWGEOM lwgeom,
double  dist 
)

Definition at line 624 of file lwgeom.c.

References COLLECTIONTYPE, LINETYPE, lwcollection_segmentize2d(), lwgeom_clone(), lwline_segmentize2d(), lwpoly_segmentize2d(), MULTILINETYPE, MULTIPOLYGONTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by lwcollection_segmentize2d(), LWGEOM_segmentize2d(), and test_lwgeom_segmentize2d().

625 {
626  switch (lwgeom->type)
627  {
628  case LINETYPE:
629  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
630  dist);
631  case POLYGONTYPE:
632  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
633  dist);
634  case MULTILINETYPE:
635  case MULTIPOLYGONTYPE:
636  case COLLECTIONTYPE:
638  (LWCOLLECTION *)lwgeom, dist);
639 
640  default:
641  return lwgeom_clone(lwgeom);
642  }
643 }
#define LINETYPE
Definition: liblwgeom.h:61
LWLINE * lwline_segmentize2d(LWLINE *line, double dist)
Definition: lwline.c:134
#define POLYGONTYPE
Definition: liblwgeom.h:62
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:351
LWCOLLECTION * lwcollection_segmentize2d(LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:220
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
uint8_t type
Definition: liblwgeom.h:352
LWPOLY * lwpoly_segmentize2d(LWPOLY *line, double dist)
Definition: lwpoly.c:210
#define MULTILINETYPE
Definition: liblwgeom.h:64
#define COLLECTIONTYPE
Definition: liblwgeom.h:66

Here is the call graph for this function:

Here is the caller graph for this function: