260 int append_points = 0;
271 lwerror(
"ptarray_to_GEOSCoordSeq called with fix_ring and 0 vertices in ring, cannot fix");
281 #if POSTGIS_GEOS_VERSION >= 31000
282 if (append_points == 0) {
286 lwerror(
"Error creating GEOS Coordinate Sequence");
292 if (!(sq = GEOSCoordSeq_create(pa->
npoints + append_points, dims)))
294 lwerror(
"Error creating GEOS Coordinate Sequence");
298 for (i = 0; i < pa->
npoints; i++)
304 LWDEBUGF(4,
"Point: %g,%g,%g", p3d->
x, p3d->
y, p3d->
z);
312 #if POSTGIS_GEOS_VERSION < 30800
313 GEOSCoordSeq_setX(sq, i, p2d->
x);
314 GEOSCoordSeq_setY(sq, i, p2d->
y);
315 if (dims == 3) GEOSCoordSeq_setZ(sq, i, p3d->
z);
318 GEOSCoordSeq_setXYZ(sq, i, p2d->
x, p2d->
y, p3d->
z);
320 GEOSCoordSeq_setXY(sq, i, p2d->
x, p2d->
y);
334 for (i = pa->
npoints; i < pa->npoints + append_points; i++)
336 #if POSTGIS_GEOS_VERSION < 30800
337 GEOSCoordSeq_setX(sq, i, p2d->
x);
338 GEOSCoordSeq_setY(sq, i, p2d->
y);
340 GEOSCoordSeq_setXY(sq, i, p2d->
x, p2d->
y);
343 if (dims == 3) GEOSCoordSeq_setZ(sq, i, p3d->
z);
#define FLAGS_GET_Z(flags)
#define FLAGS_GET_M(flags)
int ptarray_is_closed_2d(const POINTARRAY *pa)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
static const POINT3D * getPoint3d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT3D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
uint8_t * serialized_pointlist