149 #if POSTGIS_GEOS_VERSION < 31000
151 POINT4D point = { 0.0, 0.0, 0.0, 0.0 };
154 LWDEBUG(2,
"ptarray_fromGEOSCoordSeq called");
156 if (!GEOSCoordSeq_getSize(cs, &size))
lwerror(
"Exception thrown");
158 LWDEBUGF(4,
" GEOSCoordSeq size: %d", size);
162 if (!GEOSCoordSeq_getDimensions(cs, &dims))
lwerror(
"Exception thrown");
164 LWDEBUGF(4,
" GEOSCoordSeq dimensions: %d", dims);
167 if (dims > 3) dims = 3;
170 LWDEBUGF(4,
" output dimensions: %d", dims);
173 #if POSTGIS_GEOS_VERSION >= 31000
177 for (i = 0; i < size; i++)
179 #if POSTGIS_GEOS_VERSION < 30800
180 GEOSCoordSeq_getX(cs, i, &(point.
x));
181 GEOSCoordSeq_getY(cs, i, &(point.
y));
182 if (dims >= 3) GEOSCoordSeq_getZ(cs, i, &(point.
z));
185 GEOSCoordSeq_getXYZ(cs, i, &(point.
x), &(point.
y), &(point.
z));
187 GEOSCoordSeq_getXY(cs, i, &(point.
x), &(point.
y));
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...
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
uint8_t * serialized_pointlist