PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwline_split()

static LWGEOM * lwline_split ( const LWLINE lwgeom_in,
const LWGEOM blade_in 
)
static

Definition at line 321 of file lwgeom_geos_split.c.

322 {
323  switch (blade_in->type)
324  {
325  case POINTTYPE:
326  return lwline_split_by_point(lwline_in, (LWPOINT*)blade_in);
327  case MULTIPOINTTYPE:
328  return lwline_split_by_mpoint(lwline_in, (LWMPOINT*)blade_in);
329 
330  case LINETYPE:
331  case MULTILINETYPE:
332  case POLYGONTYPE:
333  case MULTIPOLYGONTYPE:
334  return lwline_split_by_line(lwline_in, blade_in);
335 
336  default:
337  lwerror("Splitting a Line by a %s is unsupported",
338  lwtype_name(blade_in->type));
339  return NULL;
340  }
341  return NULL;
342 }
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:218
static LWGEOM * lwline_split_by_mpoint(const LWLINE *lwgeom_in, const LWMPOINT *blade_in)
static LWGEOM * lwline_split_by_point(const LWLINE *lwgeom_in, const LWPOINT *blade_in)
static LWGEOM * lwline_split_by_line(const LWLINE *lwgeom_in, const LWGEOM *blade_in)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
uint8_t type
Definition: liblwgeom.h:399

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

Referenced by lwgeom_split().

Here is the call graph for this function:
Here is the caller graph for this function: