260 uint32_t npoints = 0;
265 if ( where >= npoints )
267 lwerror(
"%s: index %d is not in range of number of vertices (%d) in input", __func__, where, npoints);
271 for ( i = 0; i < lwcmp->ngeoms; i++ )
273 LWGEOM* part = lwcmp->geoms[i];
275 if ( where >=
count && where <
count + npoints_part )
281 count += npoints_part;
uint32_t lwgeom_count_vertices(const LWGEOM *geom)
Count the total number of vertices in any LWGEOM.
LWPOINT * lwline_get_lwpoint(const LWLINE *line, uint32_t where)
Returns freshly allocated LWPOINT that corresponds to the index where.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)