420{
424 int result = -1;
425
429 {
430 PG_RETURN_NULL();
431 }
432
435 {
436 result = 0;
437 }
438 else
439 {
441 result = poly->
nrings - 1;
442 }
443
445 PG_FREE_IF_COPY(geom, 0);
446
447 if ( result < 0 )
448 PG_RETURN_NULL();
449
450 PG_RETURN_INT32(result);
451}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
void lwgeom_free(LWGEOM *geom)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)