152 for (i = 0; i < npoints; i++)
156 lwerror(
"lwcurve_from_lwpointarray: invalid input type: %s",
162 if (zmflag == 3)
break;
165 if (zmflag == 0) ptsize = 2 *
sizeof(double);
166 else if (zmflag == 3) ptsize = 4 *
sizeof(double);
167 else ptsize = 3 *
sizeof(double);
172 size = ptsize * npoints;
174 memset(newpoints, 0, size);
177 for (i = 0; i < npoints; i++)
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.
uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
size_t ptarray_point_size(const POINTARRAY *pa)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FLAGS_GET_M(flags)
void * lwalloc(size_t size)
LWCIRCSTRING * lwcircstring_construct(int srid, GBOX *bbox, POINTARRAY *points)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.