PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwgeom_segmentize2d()

LWGEOM* lwgeom_segmentize2d ( LWGEOM lwgeom,
double  dist 
)

Definition at line 668 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(), test_geos_subdivide(), and test_lwgeom_segmentize2d().

669 {
670  switch (lwgeom->type)
671  {
672  case LINETYPE:
673  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
674  dist);
675  case POLYGONTYPE:
676  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
677  dist);
678  case MULTILINETYPE:
679  case MULTIPOLYGONTYPE:
680  case COLLECTIONTYPE:
682  (LWCOLLECTION *)lwgeom, dist);
683 
684  default:
685  return lwgeom_clone(lwgeom);
686  }
687 }
#define LINETYPE
Definition: liblwgeom.h:71
LWLINE * lwline_segmentize2d(LWLINE *line, double dist)
Definition: lwline.c:134
#define POLYGONTYPE
Definition: liblwgeom.h:72
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:395
LWCOLLECTION * lwcollection_segmentize2d(LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:223
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
uint8_t type
Definition: liblwgeom.h:380
LWPOLY * lwpoly_segmentize2d(LWPOLY *line, double dist)
Definition: lwpoly.c:210
#define MULTILINETYPE
Definition: liblwgeom.h:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
Here is the call graph for this function:
Here is the caller graph for this function: