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

Definition at line 166 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().

167 {
168  LWMLINE* out;
169 
170  out = lwmline_construct_empty(lwline_in->srid,
171  FLAGS_GET_Z(lwline_in->flags),
172  FLAGS_GET_M(lwline_in->flags));
173  if ( lwline_split_by_point_to(lwline_in, blade_in, out) < 2 )
174  {
175  lwmline_add_lwline(out, lwline_clone_deep(lwline_in));
176  }
177 
178  /* Turn multiline into collection */
179  out->type = COLLECTIONTYPE;
180 
181  return (LWGEOM*)out;
182 }
uint8_t type
Definition: liblwgeom.h:461
LWMLINE * lwmline_add_lwline(LWMLINE *mobj, const LWLINE *obj)
Definition: lwmline.c:32
LWMLINE * lwmline_construct_empty(int srid, char hasz, char hasm)
Definition: lwmline.c:24
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:124
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:125
LWLINE * lwline_clone_deep(const LWLINE *lwgeom)
Definition: lwline.c:105
#define COLLECTIONTYPE
Definition: liblwgeom.h:76

Here is the call graph for this function:

Here is the caller graph for this function: