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

◆ lwpoint_clone()

LWPOINT * lwpoint_clone ( const LWPOINT lwgeom)

Definition at line 239 of file lwpoint.c.

240{
241 LWPOINT *ret = lwalloc(sizeof(LWPOINT));
242
243 LWDEBUG(2, "lwpoint_clone called");
244
245 memcpy(ret, g, sizeof(LWPOINT));
246
247 ret->point = ptarray_clone(g->point);
248
249 if ( g->bbox ) ret->bbox = gbox_copy(g->bbox);
250 return ret;
251}
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition gbox.c:438
void * lwalloc(size_t size)
Definition lwutil.c:227
POINTARRAY * ptarray_clone(const POINTARRAY *ptarray)
Clone a POINTARRAY object.
Definition ptarray.c:674
#define LWDEBUG(level, msg)
Definition lwgeom_log.h:101
POINTARRAY * point
Definition liblwgeom.h:471
GBOX * bbox
Definition liblwgeom.h:470

References LWPOINT::bbox, gbox_copy(), lwalloc(), LWDEBUG, LWPOINT::point, and ptarray_clone().

Referenced by lwgeom_clone(), lwgeom_median(), lwmpoint_clip_to_ordinate_range(), lwmpoint_locate_along(), lwpoint_clip_to_ordinate_range(), and lwpoint_locate_along().

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