PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ ptarray_clone()

POINTARRAY* ptarray_clone ( const POINTARRAY in)

Clone a POINTARRAY object.

Serialized pointlist is not copied.

Definition at line 665 of file ptarray.c.

References POINTARRAY::flags, FLAGS_SET_READONLY, lwalloc(), LWDEBUG, POINTARRAY::maxpoints, POINTARRAY::npoints, and POINTARRAY::serialized_pointlist.

Referenced by lwline_clone(), lwpoint_clone(), lwpoly_clone(), and lwt_AddPolygon().

666 {
667  POINTARRAY *out = lwalloc(sizeof(POINTARRAY));
668 
669  LWDEBUG(3, "ptarray_clone_deep called.");
670 
671  out->flags = in->flags;
672  out->npoints = in->npoints;
673  out->maxpoints = in->maxpoints;
674 
675  FLAGS_SET_READONLY(out->flags, 1);
676 
678 
679  return out;
680 }
uint8_t * serialized_pointlist
Definition: liblwgeom.h:365
int npoints
Definition: liblwgeom.h:370
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
uint8_t flags
Definition: liblwgeom.h:368
int maxpoints
Definition: liblwgeom.h:371
void * lwalloc(size_t size)
Definition: lwutil.c:227
#define FLAGS_SET_READONLY(flags, value)
Definition: liblwgeom.h:149
Here is the call graph for this function:
Here is the caller graph for this function: