PostGIS  2.1.10dev-r@@SVN_REVISION@@
static LWGEOM * lwline_split_by_point ( const LWLINE lwgeom_in,
const LWPOINT blade_in 
)
static

Definition at line 142 of file lwgeom_geos_split.c.

References COLLECTIONTYPE, LWLINE::flags, FLAGS_GET_M, FLAGS_GET_Z, lwline_clone_deep(), lwline_split_by_point_to(), lwmline_add_lwline(), lwmline_construct_empty(), LWLINE::srid, and LWMLINE::type.

Referenced by lwline_split().

143 {
144  LWMLINE* out;
145 
146  out = lwmline_construct_empty(lwline_in->srid,
147  FLAGS_GET_Z(lwline_in->flags),
148  FLAGS_GET_M(lwline_in->flags));
149  if ( lwline_split_by_point_to(lwline_in, blade_in, out) < 2 )
150  {
151  lwmline_add_lwline(out, lwline_clone_deep(lwline_in));
152  }
153 
154  /* Turn multiline into collection */
155  out->type = COLLECTIONTYPE;
156 
157  return (LWGEOM*)out;
158 }
uint8_t type
Definition: liblwgeom.h:433
LWMLINE * lwmline_add_lwline(LWMLINE *mobj, const LWLINE *obj)
Definition: lwmline.c:33
LWMLINE * lwmline_construct_empty(int srid, char hasz, char hasm)
Definition: lwmline.c:25
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:106
int lwline_split_by_point_to(const LWLINE *lwline_in, const LWPOINT *blade_in, LWMLINE *v)
Split a line by a point and push components to the provided multiline.
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:107
LWLINE * lwline_clone_deep(const LWLINE *lwgeom)
Definition: lwline.c:105
#define COLLECTIONTYPE
Definition: liblwgeom.h:66

Here is the call graph for this function:

Here is the caller graph for this function: