214{
215 uint32_t i;
217 uint32_t npoints = 0;
219 return NULL;
220
222 if ( where >= npoints )
223 {
224 lwerror(
"%s: index %d is not in range of number of vertices (%d) in input", __func__, where, npoints);
225 return NULL;
226 }
227
228 for ( i = 0; i < lwcmp->ngeoms; i++ )
229 {
230 LWGEOM* part = lwcmp->geoms[i];
232 if ( where >= count && where < count + npoints_part )
233 {
235 }
236 else
237 {
238 count += npoints_part;
239 }
240 }
241
242 return NULL;
243}
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 lwerror(const char *fmt,...)
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)