75 LWDEBUG(2,
"ptarray_fromGEOSCoordSeq called");
77 if ( ! GEOSCoordSeq_getSize(cs, &size) )
80 LWDEBUGF(4,
" GEOSCoordSeq size: %d", size);
84 if ( ! GEOSCoordSeq_getDimensions(cs, &dims) )
87 LWDEBUGF(4,
" GEOSCoordSeq dimensions: %d", dims);
90 if ( dims > 3 ) dims = 3;
93 LWDEBUGF(4,
" output dimensions: %d", dims);
97 for (i=0; i<size; i++)
99 GEOSCoordSeq_getX(cs, i, &(point.
x));
100 GEOSCoordSeq_getY(cs, i, &(point.
y));
101 if ( dims >= 3 ) GEOSCoordSeq_getZ(cs, i, &(point.
z));
void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
POINTARRAY * ptarray_construct(char hasz, char hasm, uint32_t npoints)
Construct an empty pointarray, allocating storage and setting the npoints, but not filling in any inf...
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.