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.
72{
73 uint32_t i;
74
75
76 if( ! poly || ! ring )
77 {
78 LWDEBUG(4,
"NULL inputs!!! quitting");
80 }
81
82
84 {
85 LWDEBUG(4,
"mismatched nrings/maxrings");
86 lwerror(
"Curvepolygon is in inconsistent state. Null memory but non-zero collection counts.");
88 }
89
90
92 {
95 }
96
97
98
99 if ( poly->
rings == NULL )
100 {
104 }
105
106
108 {
111 }
112
113
114 for ( i = 0; i < poly->
nrings; i++ )
115 {
116 if ( poly->
rings[i] == ring )
117 {
118 LWDEBUGF(4,
"Found duplicate geometry in collection %p == %p", poly->
rings[i], ring);
120 }
121 }
122
123
127}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void * lwrealloc(void *mem, size_t size)
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().