148 struct geod_geodesic gd;
149 geod_init(&gd, spheroid->
a, spheroid->
f);
150 struct geod_polygon poly;
151 geod_polygon_init(&poly, 0);
157 for ( i = 0; i < pa->
npoints - 1; i++ )
160 geod_polygon_addpoint(&gd, &poly, p.
y, p.
x);
161 LWDEBUGF(4,
"geod_polygon_addpoint %d: %.12g %.12g", i, p.
y, p.
x);
163 i = geod_polygon_compute(&gd, &poly, 0, 1, &area, 0);
166 lwerror(
"ptarray_area_spheroid: different number of points %d vs %d",
169 LWDEBUGF(4,
"geod_polygon_compute area: %.12g", area);
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.