PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ptarray_clone()

POINTARRAY* ptarray_clone ( const POINTARRAY in)

Clone a POINTARRAY object.

Serialized pointlist is not copied.

Definition at line 659 of file ptarray.c.

660 {
661  POINTARRAY *out = lwalloc(sizeof(POINTARRAY));
662 
663  LWDEBUG(3, "ptarray_clone called.");
664 
665  out->flags = in->flags;
666  out->npoints = in->npoints;
667  out->maxpoints = in->maxpoints;
668 
669  FLAGS_SET_READONLY(out->flags, 1);
670 
672 
673  return out;
674 }
void * lwalloc(size_t size)
Definition: lwutil.c:229
#define FLAGS_SET_READONLY(flags, value)
Definition: liblwgeom.h:150
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
uint32_t maxpoints
Definition: liblwgeom.h:375
uint32_t npoints
Definition: liblwgeom.h:374
uint8_t * serialized_pointlist
Definition: liblwgeom.h:369
uint8_t flags
Definition: liblwgeom.h:372

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().

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