PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwline_split()

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

Definition at line 320 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, LWGEOM::type, and LWMPOINT::type.

Referenced by lwgeom_split().

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