1798 uint8_t num_dims = 2;
1800 GEOSCoordSequence* coords;
1803 coords = GEOSCoordSeq_create(num_points, num_dims);
1804 if (!coords)
return NULL;
1809 if (i >= num_points)
1811 lwerror(
"Incorrect num_points provided to lwgeom_get_geos_coordseq_2d");
1812 GEOSCoordSeq_destroy(coords);
1817 #if POSTGIS_GEOS_VERSION < 30800
1818 if (!GEOSCoordSeq_setX(coords, i, tmp.
x) || !GEOSCoordSeq_setY(coords, i, tmp.
y))
1820 if (!GEOSCoordSeq_setXY(coords, i, tmp.
x, tmp.
y))
1823 GEOSCoordSeq_destroy(coords);
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
int lwpointiterator_next(LWPOINTITERATOR *s, POINT4D *p)
Attempts to assign the next point in the iterator to p, and advances the iterator to the next point.
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.