Add a ring, allocating extra space if necessary.
The curvepolygon takes ownership of the passed point array.
Definition at line 72 of file lwcurvepoly.c.
77 if( ! poly || ! ring )
79 LWDEBUG(4,
"NULL inputs!!! quitting");
86 LWDEBUG(4,
"mismatched nrings/maxrings");
87 lwerror(
"Curvepolygon is in inconsistent state. Null memory but non-zero collection counts.");
100 if ( poly->
rings == NULL )
115 for ( i = 0; i < poly->
nrings; i++ )
117 if ( poly->
rings[i] == ring )
119 LWDEBUGF(4,
"Found duplicate geometry in collection %p == %p", poly->
rings[i], ring);
void * lwrealloc(void *mem, size_t size)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void * lwalloc(size_t size)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
References CIRCSTRINGTYPE, COMPOUNDTYPE, LINETYPE, LW_FAILURE, LW_SUCCESS, lwalloc(), LWDEBUG, LWDEBUGF, lwerror(), lwrealloc(), lwtype_name(), LWCURVEPOLY::maxrings, LWCURVEPOLY::nrings, LWCURVEPOLY::rings, and LWGEOM::type.
Referenced by lwcurvepoly_from_wkb_state(), and wkt_parser_curvepolygon_add_ring().