PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ lwgeom_segmentize2d()

LWGEOM* lwgeom_segmentize2d ( const LWGEOM lwgeom,
double  dist 
)

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

754 {
755  switch (lwgeom->type)
756  {
757  case LINETYPE:
758  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
759  dist);
760  case POLYGONTYPE:
761  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
762  dist);
763  case MULTILINETYPE:
764  case MULTIPOLYGONTYPE:
765  case COLLECTIONTYPE:
767  (LWCOLLECTION *)lwgeom, dist);
768 
769  default:
770  return lwgeom_clone(lwgeom);
771  }
772 }
#define LINETYPE
Definition: liblwgeom.h:85
LWPOLY * lwpoly_segmentize2d(const LWPOLY *line, double dist)
Definition: lwpoly.c:312
LWLINE * lwline_segmentize2d(const LWLINE *line, double dist)
Definition: lwline.c:141
#define POLYGONTYPE
Definition: liblwgeom.h:86
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:473
LWCOLLECTION * lwcollection_segmentize2d(const LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:250
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
uint8_t type
Definition: liblwgeom.h:398
#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: