PostGIS 3.6.2dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwline_add_lwpoint()

int lwline_add_lwpoint ( LWLINE line,
LWPOINT point,
uint32_t  where 
)

Add a LWPOINT to an LWLINE.

Definition at line 327 of file lwline.c.

328{
329 POINT4D pt;
330 getPoint4d_p(point->point, 0, &pt);
331
332 if ( ptarray_insert_point(line->points, &pt, where) != LW_SUCCESS )
333 return LW_FAILURE;
334
335 /* Update the bounding box */
336 if ( line->bbox )
337 {
339 }
340
341 return LW_SUCCESS;
342}
void lwgeom_refresh_bbox(LWGEOM *lwgeom)
Drop current bbox and calculate a fresh one.
Definition lwgeom.c:707
#define LW_FAILURE
Definition liblwgeom.h:96
#define LW_SUCCESS
Definition liblwgeom.h:97
int ptarray_insert_point(POINTARRAY *pa, const POINT4D *p, uint32_t where)
Insert a point into an existing POINTARRAY.
Definition ptarray.c:85
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition lwgeom_api.c:125
GBOX * bbox
Definition liblwgeom.h:482
POINTARRAY * points
Definition liblwgeom.h:483
POINTARRAY * point
Definition liblwgeom.h:471

References LWLINE::bbox, getPoint4d_p(), LW_FAILURE, LW_SUCCESS, lwgeom_refresh_bbox(), LWPOINT::point, LWLINE::points, and ptarray_insert_point().

Referenced by LWGEOM_addpoint().

Here is the call graph for this function:
Here is the caller graph for this function: