PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_split ( const LWGEOM lwgeom_in,
const LWGEOM blade_in 
)

Definition at line 470 of file lwgeom_geos_split.c.

References COLLECTIONTYPE, LINETYPE, lwcollection_split(), lwerror(), lwline_split(), lwpoly_split(), lwtype_name(), MULTILINETYPE, MULTIPOLYGONTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by lwcollection_split(), ST_Split(), and test_lwgeom_split().

471 {
472  switch (lwgeom_in->type)
473  {
474  case LINETYPE:
475  return lwline_split((const LWLINE*)lwgeom_in, blade_in);
476 
477  case POLYGONTYPE:
478  return lwpoly_split((const LWPOLY*)lwgeom_in, blade_in);
479 
480  case MULTIPOLYGONTYPE:
481  case MULTILINETYPE:
482  case COLLECTIONTYPE:
483  return lwcollection_split((const LWCOLLECTION*)lwgeom_in, blade_in);
484 
485  default:
486  lwerror("Splitting of %s geometries is unsupported",
487  lwtype_name(lwgeom_in->type));
488  return NULL;
489  }
490 
491 }
#define LINETYPE
Definition: liblwgeom.h:61
static LWGEOM * lwline_split(const LWLINE *lwgeom_in, const LWGEOM *blade_in)
#define POLYGONTYPE
Definition: liblwgeom.h:62
static LWGEOM * lwcollection_split(const LWCOLLECTION *lwcoll_in, const LWGEOM *blade_in)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:164
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
static LWGEOM * lwpoly_split(const LWPOLY *lwpoly_in, const LWGEOM *blade_in)
uint8_t type
Definition: liblwgeom.h:352
#define MULTILINETYPE
Definition: liblwgeom.h:64
#define COLLECTIONTYPE
Definition: liblwgeom.h:66

Here is the call graph for this function:

Here is the caller graph for this function: