PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwcurvepoly_area()

double lwcurvepoly_area ( const LWCURVEPOLY curvepoly)

This should be rewritten to make use of the curve itself.

Definition at line 133 of file lwcurvepoly.c.

134 {
135  double area = 0.0;
136  LWPOLY *poly;
137  if( lwgeom_is_empty((LWGEOM*)curvepoly) )
138  return 0.0;
139  poly = lwcurvepoly_stroke(curvepoly, 32);
140  area = lwpoly_area(poly);
141  lwpoly_free(poly);
142  return area;
143 }
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:175
double lwpoly_area(const LWPOLY *poly)
Find the area of the outer ring - sum (area of inner rings).
Definition: lwpoly.c:434
LWPOLY * lwcurvepoly_stroke(const LWCURVEPOLY *curvepoly, uint32_t perQuad)
Definition: lwstroke.c:676
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwinline.h:193

References lwcurvepoly_stroke(), lwgeom_is_empty(), lwpoly_area(), and lwpoly_free().

Referenced by lwgeom_area().

Here is the call graph for this function:
Here is the caller graph for this function: