503         g = PG_GETARG_GSERIALIZED_P(0);
 
  506         use_spheroid = PG_GETARG_BOOL(1);
 
  517                 PG_RETURN_FLOAT8(0.0);
 
  521                 gbox = *(lwgeom->
bbox);
 
  525 #ifndef PROJ_GEODESIC 
  533                 if ( gbox.
zmax > 0.0 && gbox.
zmin < 0.0 )
 
  539         if ( ! use_spheroid )
 
  540                 s.a = 
s.b = 
s.radius;
 
  550         PG_FREE_IF_COPY(g, 0);
 
  555                 elog(ERROR, 
"lwgeom_area_spher(oid) returned area < 0.0");
 
  559         PG_RETURN_FLOAT8(area);
 
int32_t gserialized_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
double lwgeom_area_spheroid(const LWGEOM *lwgeom, const SPHEROID *spheroid)
Calculate the geodetic area of a lwgeom on the spheroid.
#define LW_TRUE
Return types for functions with status returns.
double lwgeom_area_sphere(const LWGEOM *lwgeom, const SPHEROID *spheroid)
Calculate the geodetic area of a lwgeom on the sphere.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)