252 int append_points = 0;
263 lwerror(
"ptarray_to_GEOSCoordSeq called with fix_ring and 0 vertices in ring, cannot fix");
273 if (!(sq = GEOSCoordSeq_create(pa->
npoints + append_points, dims)))
275 lwerror(
"Error creating GEOS Coordinate Sequence");
279 for (i = 0; i < pa->
npoints; i++)
285 LWDEBUGF(4,
"Point: %g,%g,%g", p3d->
x, p3d->
y, p3d->
z);
293 #if POSTGIS_GEOS_VERSION < 38
294 GEOSCoordSeq_setX(sq, i, p2d->
x);
295 GEOSCoordSeq_setY(sq, i, p2d->
y);
296 if (dims == 3) GEOSCoordSeq_setZ(sq, i, p3d->
z);
299 GEOSCoordSeq_setXYZ(sq, i, p2d->
x, p2d->
y, p3d->
z);
301 GEOSCoordSeq_setXY(sq, i, p2d->
x, p2d->
y);
315 for (i = pa->
npoints; i < pa->npoints + append_points; i++)
317 #if POSTGIS_GEOS_VERSION < 38
318 GEOSCoordSeq_setX(sq, i, p2d->
x);
319 GEOSCoordSeq_setY(sq, i, p2d->
y);
321 GEOSCoordSeq_setXY(sq, i, p2d->
x, p2d->
y);
324 if (dims == 3) GEOSCoordSeq_setZ(sq, i, p3d->
z);
const POINT3DZ * getPoint3dz_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT3DZ pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
int ptarray_is_closed_2d(const POINTARRAY *pa)
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.