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

Definition at line 681 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().

682 {
683  switch (lwgeom->type)
684  {
685  case LINETYPE:
686  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
687  dist);
688  case POLYGONTYPE:
689  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
690  dist);
691  case MULTILINETYPE:
692  case MULTIPOLYGONTYPE:
693  case COLLECTIONTYPE:
695  (LWCOLLECTION *)lwgeom, dist);
696 
697  default:
698  return lwgeom_clone(lwgeom);
699  }
700 }
#define LINETYPE
Definition: liblwgeom.h:85
LWLINE * lwline_segmentize2d(LWLINE *line, double dist)
Definition: lwline.c:147
#define POLYGONTYPE
Definition: liblwgeom.h:86
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:408
LWCOLLECTION * lwcollection_segmentize2d(LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:236
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
uint8_t type
Definition: liblwgeom.h:395
LWPOLY * lwpoly_segmentize2d(LWPOLY *line, double dist)
Definition: lwpoly.c:281
#define MULTILINETYPE
Definition: liblwgeom.h:88
#define COLLECTIONTYPE
Definition: liblwgeom.h:90

Here is the call graph for this function:

Here is the caller graph for this function: