PostGIS  2.2.7dev-r@@SVN_REVISION@@
static LWGEOM * lwline_split ( const LWLINE lwgeom_in,
const LWGEOM blade_in 
)
static

Definition at line 333 of file lwgeom_geos_split.c.

References LINETYPE, lwerror(), lwline_split_by_line(), lwline_split_by_mpoint(), lwline_split_by_point(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by lwgeom_split().

334 {
335  switch (blade_in->type)
336  {
337  case POINTTYPE:
338  return lwline_split_by_point(lwline_in, (LWPOINT*)blade_in);
339  case MULTIPOINTTYPE:
340  return lwline_split_by_mpoint(lwline_in, (LWMPOINT*)blade_in);
341 
342  case LINETYPE:
343  case MULTILINETYPE:
344  case POLYGONTYPE:
345  case MULTIPOLYGONTYPE:
346  return lwline_split_by_line(lwline_in, blade_in);
347 
348  default:
349  lwerror("Splitting a Line by a %s is unsupported",
350  lwtype_name(blade_in->type));
351  return NULL;
352  }
353  return NULL;
354 }
#define LINETYPE
Definition: liblwgeom.h:71
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
static LWGEOM * lwline_split_by_mpoint(const LWLINE *lwgeom_in, const LWMPOINT *blade_in)
static LWGEOM * lwline_split_by_line(const LWLINE *lwgeom_in, const LWGEOM *blade_in)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:188
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
uint8_t type
Definition: liblwgeom.h:380
#define MULTILINETYPE
Definition: liblwgeom.h:74
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
static LWGEOM * lwline_split_by_point(const LWLINE *lwgeom_in, const LWPOINT *blade_in)

Here is the call graph for this function:

Here is the caller graph for this function: