219 int append_points = 0;
231 lwerror(
"ptarray_to_GEOSCoordSeq called with fix_ring and 0 vertices in ring, cannot fix");
238 append_points = 4 - pa->
npoints;
247 if ( ! (sq = GEOSCoordSeq_create(pa->
npoints + append_points, dims)) )
249 lwerror(
"Error creating GEOS Coordinate Sequence");
253 for ( i=0; i < pa->
npoints; i++ )
259 LWDEBUGF(4,
"Point: %g,%g,%g", p3d->
x, p3d->
y, p3d->
z);
267 GEOSCoordSeq_setX(sq, i, p2d->
x);
268 GEOSCoordSeq_setY(sq, i, p2d->
y);
272 GEOSCoordSeq_setZ(sq, i, p3d->
z);
287 for ( i = pa->
npoints; i < pa->npoints + append_points; i++ )
289 GEOSCoordSeq_setX(sq, i, p2d->
x);
290 GEOSCoordSeq_setY(sq, i, p2d->
y);
294 GEOSCoordSeq_setZ(sq, i, p3d->
z);
int ptarray_is_closed_2d(const POINTARRAY *pa)
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, int n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from...
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
const POINT3DZ * getPoint3dz_cp(const POINTARRAY *pa, int n)
Returns a POINT3DZ 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.