187{
188 uint32_t i;
191 size_t ptsize, size;
192 uint8_t *newpoints, *ptr;
193
194 if (zmflag == 0) ptsize = 2 * sizeof(double);
195 else if (zmflag == 3) ptsize = 4 * sizeof(double);
196 else ptsize = 3 * sizeof(double);
197
198
199 size = ptsize * mpoint->
ngeoms;
201 memset(newpoints, 0, size);
202
203 ptr = newpoints;
204 for (i = 0; i < mpoint->
ngeoms; i++)
205 {
206 memcpy(ptr,
208 ptsize);
209 ptr += ptsize;
210 }
211
213
214 LWDEBUGF(3,
"lwcurve_from_lwmpoint: constructed pointarray for %d points, %d zmflag", mpoint->
ngeoms, zmflag);
215
217}
POINTARRAY * ptarray_construct_reference_data(char hasz, char hasm, uint32_t npoints, uint8_t *ptlist)
Construct a new POINTARRAY, referencing to the data from ptlist.
void * lwalloc(size_t size)
#define FLAGS_GET_ZM(flags)
LWCIRCSTRING * lwcircstring_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
#define LWDEBUGF(level, msg,...)
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)