65 for ( i = 0; i < ret->
nrings; i++ )
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);
153 for (i=0; i<poly->
nrings; i++)
165 for (i=0; i<poly->
nrings; i++)
GBOX * gbox_clone(const GBOX *gbox)
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
POINTARRAY * ptarray_clone_deep(const POINTARRAY *ptarray)
Deep clone a pointarray (also clones serialized pointlist)
double lwgeom_length(const LWGEOM *geom)
void * lwrealloc(void *mem, size_t size)
double lwgeom_length_2d(const LWGEOM *geom)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
void * lwalloc(size_t size)
void lwpoly_free(LWPOLY *poly)
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
double lwpoly_area(const LWPOLY *poly)
Find the area of the outer ring - sum (area of inner rings).
LWPOLY * lwcurvepoly_stroke(const LWCURVEPOLY *curvepoly, uint32_t perQuad)
LWCURVEPOLY * lwcurvepoly_construct_empty(int srid, char hasz, char hasm)
LWCURVEPOLY * lwcurvepoly_construct_from_lwpoly(LWPOLY *lwpoly)
Construct an equivalent curve polygon from a polygon.
int lwcurvepoly_add_ring(LWCURVEPOLY *poly, LWGEOM *ring)
Add a ring, allocating extra space if necessary.
double lwcurvepoly_perimeter(const LWCURVEPOLY *poly)
double lwcurvepoly_area(const LWCURVEPOLY *curvepoly)
This should be rewritten to make use of the curve itself.
double lwcurvepoly_perimeter_2d(const LWCURVEPOLY *poly)
Datum area(PG_FUNCTION_ARGS)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.