PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwgeom_segmentize2d()

LWGEOM* lwgeom_segmentize2d ( LWGEOM line,
double  dist 
)

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

718 {
719  switch (lwgeom->type)
720  {
721  case LINETYPE:
722  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
723  dist);
724  case POLYGONTYPE:
725  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
726  dist);
727  case MULTILINETYPE:
728  case MULTIPOLYGONTYPE:
729  case COLLECTIONTYPE:
731  (LWCOLLECTION *)lwgeom, dist);
732 
733  default:
734  return lwgeom_clone(lwgeom);
735  }
736 }
#define LINETYPE
Definition: liblwgeom.h:86
LWLINE * lwline_segmentize2d(LWLINE *line, double dist)
Definition: lwline.c:147
#define POLYGONTYPE
Definition: liblwgeom.h:87
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:444
LWCOLLECTION * lwcollection_segmentize2d(LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:237
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
LWPOLY * lwpoly_segmentize2d(LWPOLY *line, double dist)
Definition: lwpoly.c:323
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the call graph for this function:
Here is the caller graph for this function: