PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwline_split()

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

Definition at line 326 of file lwgeom_geos_split.c.

327 {
328  switch (blade_in->type)
329  {
330  case POINTTYPE:
331  return lwline_split_by_point(lwline_in, (LWPOINT*)blade_in);
332  case MULTIPOINTTYPE:
333  return lwline_split_by_mpoint(lwline_in, (LWMPOINT*)blade_in);
334 
335  case LINETYPE:
336  case MULTILINETYPE:
337  case POLYGONTYPE:
338  case MULTIPOLYGONTYPE:
339  return lwline_split_by_line(lwline_in, blade_in);
340 
341  default:
342  lwerror("Splitting a Line by a %s is unsupported",
343  lwtype_name(blade_in->type));
344  return NULL;
345  }
346  return NULL;
347 }
#define MULTILINETYPE
Definition: liblwgeom.h:120
#define LINETYPE
Definition: liblwgeom.h:117
#define MULTIPOINTTYPE
Definition: liblwgeom.h:119
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:116
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:121
#define POLYGONTYPE
Definition: liblwgeom.h:118
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
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:448

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: