Clip a point based on the from/to range of one of its ordinates.
Use for m- and z- clipping
Clip a point based on the from/to range of one of its ordinates.
Definition at line 364 of file lwlinearreferencing.c.
369 double ordinate_value;
373 lwerror(
"Null input geometry.");
393 if ( from <= ordinate_value && to >= ordinate_value )
400 if ( lwgeom_out->
bbox )
void lwgeom_refresh_bbox(LWGEOM *lwgeom)
Drop current bbox and calculate a fresh one.
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
LWCOLLECTION * lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom)
Appends geom to the collection managed by col.
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
LWPOINT * lwpoint_clone(const LWPOINT *lwgeom)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
double lwpoint_get_ordinate(const POINT4D *p, char ordinate)
Given a POINT4D and an ordinate number, return the value of the ordinate.
References LWCOLLECTION::bbox, lwcollection_add_lwgeom(), lwcollection_construct_empty(), lwerror(), lwgeom_has_m(), lwgeom_has_z(), lwgeom_refresh_bbox(), lwpoint_as_lwgeom(), lwpoint_clone(), lwpoint_get_ordinate(), lwpoint_getPoint4d_p(), MULTIPOINTTYPE, and LWPOINT::srid.
Referenced by lwgeom_clip_to_ordinate_range().