PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ lwgeom_segmentize2d()

LWGEOM* lwgeom_segmentize2d ( const LWGEOM line,
double  dist 
)

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

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 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:482
LWCOLLECTION * lwcollection_segmentize2d(const LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:250
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
#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: