PostGIS  2.2.7dev-r@@SVN_REVISION@@
POINTARRAY* ptarray_clone ( const POINTARRAY in)

Clone a POINTARRAY object.

Serialized pointlist is not copied.

Definition at line 658 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().

659 {
660  POINTARRAY *out = lwalloc(sizeof(POINTARRAY));
661 
662  LWDEBUG(3, "ptarray_clone_deep called.");
663 
664  out->flags = in->flags;
665  out->npoints = in->npoints;
666  out->maxpoints = in->maxpoints;
667 
668  FLAGS_SET_READONLY(out->flags, 1);
669 
671 
672  return out;
673 }
uint8_t * serialized_pointlist
Definition: liblwgeom.h:350
int npoints
Definition: liblwgeom.h:355
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
uint8_t flags
Definition: liblwgeom.h:353
int maxpoints
Definition: liblwgeom.h:356
void * lwalloc(size_t size)
Definition: lwutil.c:199
#define FLAGS_SET_READONLY(flags, value)
Definition: liblwgeom.h:134

Here is the call graph for this function:

Here is the caller graph for this function: