Add a ring, allocating extra space if necessary.
The curvepolygon takes ownership of the passed point array.
Definition at line 71 of file lwcurvepoly.c.
76 if( ! poly || ! ring )
78 LWDEBUG(4,
"NULL inputs!!! quitting");
85 LWDEBUG(4,
"mismatched nrings/maxrings");
86 lwerror(
"Curvepolygon is in inconsistent state. Null memory but non-zero collection counts.");
99 if ( poly->
rings == NULL )
114 for ( i = 0; i < poly->
nrings; i++ )
116 if ( poly->
rings[i] == ring )
118 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 void lwerror(const char *fmt,...) __attribute__((format(printf
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().