Find the area of the outer ring - sum (area of inner rings).
Definition at line 434 of file lwpoly.c.
435{
436 double poly_area = 0.0;
437 uint32_t i;
438
439 if ( ! poly )
440 lwerror(
"lwpoly_area called with null polygon pointer!");
441
442 for ( i=0; i < poly->
nrings; i++ )
443 {
445 double ringarea = 0.0;
446
447
449 continue;
450
452 if ( i == 0 )
453 poly_area += ringarea;
454 else
455 poly_area -= ringarea;
456 }
457
458 return poly_area;
459}
double ptarray_signed_area(const POINTARRAY *pa)
Returns the area in cartesian units.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
References lwerror(), POINTARRAY::npoints, LWPOLY::nrings, ptarray_signed_area(), and LWPOLY::rings.
Referenced by lwcurvepoly_area(), lwgeom_area(), lwmpoly_to_points(), and lwpoly_to_points().