POLYGON.
273{
274 uint32_t nrings;
275 uint32_t i;
277
278 LWDEBUG(2,
"Entering lwpoly_from_twkb_state");
279
282
283
285
286
288
289 LWDEBUGF(4,
"Polygon has %d rings", nrings);
290
291
292 if( nrings == 0 )
293 return poly;
294
295 for( i = 0; i < nrings; i++ )
296 {
297
300
301
302 if( pa == NULL )
303 continue;
304
305
307 {
311 }
312
313
315 {
318 return NULL;
319 }
320
321
323 {
324 LWDEBUG(2,
"Unable to add ring to polygon");
325 lwerror(
"Unable to add ring to polygon");
326 }
327
328 }
329 return poly;
330}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
int lwpoly_add_ring(LWPOLY *poly, POINTARRAY *pa)
Add a ring, allocating extra space if necessary.
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
#define LW_PARSER_CHECK_MINPOINTS
Parser check flags.
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
int ptarray_is_closed_2d(const POINTARRAY *pa)
LWPOLY * lwpoly_construct_empty(int32_t srid, char hasz, char hasm)
#define SRID_UNKNOWN
Unknown SRID value.
#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.
static POINTARRAY * ptarray_from_twkb_state(twkb_parse_state *s, uint32_t npoints)
POINTARRAY Read a dynamically sized point array and advance the parse state forward.
static uint64_t twkb_parse_state_uvarint(twkb_parse_state *s)