/* Initialize spheroid */
spheroid_init(&s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS);
- /* User requests spherical calculation, turn our spheroid into a sphere */
- if ( ! use_spheroid )
- s.a = s.b = s.radius;
-
lwgeom = lwgeom_from_gserialized(g);
/* EMPTY things have no area */
use_spheroid = LW_FALSE;
}
+ /* User requests spherical calculation, turn our spheroid into a sphere */
+ if ( ! use_spheroid )
+ s.a = s.b = s.radius;
+
/* Calculate the area */
if ( use_spheroid )
area = lwgeom_area_spheroid(lwgeom, &gbox, &s);