PostGIS  2.5.0dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_segmentize2d ( const LWGEOM line,
double  dist 
)

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

756 {
757  switch (lwgeom->type)
758  {
759  case LINETYPE:
760  return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom,
761  dist);
762  case POLYGONTYPE:
763  return (LWGEOM *)lwpoly_segmentize2d((LWPOLY *)lwgeom,
764  dist);
765  case MULTILINETYPE:
766  case MULTIPOLYGONTYPE:
767  case COLLECTIONTYPE:
769  (LWCOLLECTION *)lwgeom, dist);
770 
771  default:
772  return lwgeom_clone(lwgeom);
773  }
774 }
#define LINETYPE
Definition: liblwgeom.h:85
LWPOLY * lwpoly_segmentize2d(const LWPOLY *line, double dist)
Definition: lwpoly.c:310
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:475
LWCOLLECTION * lwcollection_segmentize2d(const LWCOLLECTION *coll, double dist)
Definition: lwcollection.c:236
#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: