242{
243 uint32_t i;
245 uint32_t npoints = 0;
247 return NULL;
248
250 if ( where >= npoints )
251 {
252 lwerror(
"%s: index %d is not in range of number of vertices (%d) in input", __func__, where, npoints);
253 return NULL;
254 }
255
256 for ( i = 0; i < lwcmp->ngeoms; i++ )
257 {
258 LWGEOM* part = lwcmp->geoms[i];
260 if ( where >= count && where < count + npoints_part )
261 {
263 }
264 else
265 {
266 count += npoints_part;
267 }
268 }
269
270 return NULL;
271}
LWPOINT * lwline_get_lwpoint(const LWLINE *line, uint32_t where)
Returns freshly allocated LWPOINT that corresponds to the index where.
uint32_t lwgeom_count_vertices(const LWGEOM *geom)
Count the total number of vertices in any LWGEOM.
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)