Clip an input MULTILINESTRING between two values, on any ordinate input.
Clip a multi-line based on the from/to range of one of its ordinates.
Definition at line 468 of file lwlinearreferencing.c.
474 lwerror(
"Null input geometry.");
488 char homogeneous = 1;
489 size_t geoms_size = 0;
493 for ( i = 0; i < mline->
ngeoms; i ++ )
502 if ( lwgeom_out->
geoms )
511 for ( j = 0; j < col->
ngeoms; j++ )
526 if ( lwgeom_out->
bbox )
void lwgeom_refresh_bbox(LWGEOM *lwgeom)
Drop current bbox and calculate a fresh one.
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
LWGEOM * lwmline_as_lwgeom(const LWMLINE *obj)
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
void * lwrealloc(void *mem, size_t size)
void * lwalloc(size_t size)
#define FLAGS_SET_M(flags, value)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
#define FLAGS_SET_Z(flags, value)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
LWCOLLECTION * lwline_clip_to_ordinate_range(const LWLINE *line, char ordinate, double from, double to)
Take in a LINESTRING and return a MULTILINESTRING of those portions of the LINESTRING between the fro...
References LWCOLLECTION::bbox, COLLECTIONTYPE, LWCOLLECTION::flags, FLAGS_SET_M, FLAGS_SET_Z, LWMLINE::geoms, LWCOLLECTION::geoms, lwalloc(), lwcollection_construct_empty(), lwerror(), lwfree(), lwgeom_has_m(), lwgeom_has_z(), lwgeom_refresh_bbox(), lwline_clip_to_ordinate_range(), lwmline_as_lwgeom(), lwrealloc(), MULTILINETYPE, LWMLINE::ngeoms, LWCOLLECTION::ngeoms, LWMLINE::srid, LWMLINE::type, and LWCOLLECTION::type.
Referenced by lwgeom_clip_to_ordinate_range(), and test_lwmline_clip().