PostGIS  2.4.9dev-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 134 of file lwcurvepoly.c.

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

Referenced by lwgeom_area().

135 {
136  double area = 0.0;
137  LWPOLY *poly;
138  if( lwgeom_is_empty((LWGEOM*)curvepoly) )
139  return 0.0;
140  poly = lwcurvepoly_stroke(curvepoly, 32);
141  area = lwpoly_area(poly);
142  lwpoly_free(poly);
143  return area;
144 }
Datum area(PG_FUNCTION_ARGS)
LWPOLY * lwcurvepoly_stroke(const LWCURVEPOLY *curvepoly, uint32_t perQuad)
Definition: lwstroke.c:584
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:174
double lwpoly_area(const LWPOLY *poly)
Find the area of the outer ring - sum (area of inner rings).
Definition: lwpoly.c:524
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
Definition: lwgeom.c:1346
Here is the call graph for this function:
Here is the caller graph for this function: