PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwgeom_segmentize2d()

LWGEOM* lwgeom_segmentize2d ( const LWGEOM lwgeom,
double  dist 
)

Definition at line 762 of file lwgeom.c.

763 {
764  switch (lwgeom->type)
765  {
766  case LINETYPE:
767  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
768  dist);
769  case POLYGONTYPE:
770  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
771  dist);
772  case MULTILINETYPE:
773  case MULTIPOLYGONTYPE:
774  case COLLECTIONTYPE:
776  (LWCOLLECTION *)lwgeom, dist);
777 
778  default:
779  return lwgeom_clone(lwgeom);
780  }
781 }
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
LWLINE * lwline_segmentize2d(const LWLINE *line, double dist)
Definition: lwline.c:141
LWCOLLECTION * lwcollection_segmentize2d(const LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:250
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
LWPOLY * lwpoly_segmentize2d(const LWPOLY *line, double dist)
Definition: lwpoly.c:312
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:482
uint8_t type
Definition: liblwgeom.h:399

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().

Here is the call graph for this function:
Here is the caller graph for this function: