143{
144
146 return 0.0;
147
148 struct geod_geodesic gd;
149 geod_init(&gd, spheroid->
a, spheroid->
f);
150 struct geod_polygon poly;
151 geod_polygon_init(&poly, 0);
152 uint32_t i;
153 double area;
155
156
157 for ( i = 0; i < pa->
npoints - 1; i++ )
158 {
160 geod_polygon_addpoint(&gd, &poly, p.
y, p.
x);
161 LWDEBUGF(4,
"geod_polygon_addpoint %d: %.12g %.12g", i, p.
y, p.
x);
162 }
163 i = geod_polygon_compute(&gd, &poly, 0, 1, &area, 0);
165 {
166 lwerror(
"ptarray_area_spheroid: different number of points %d vs %d",
168 }
169 LWDEBUGF(4,
"geod_polygon_compute area: %.12g", area);
170 return fabs(area);
171}
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
#define LWDEBUGF(level, msg,...)
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.