1021 g1 = PG_GETARG_GSERIALIZED_P(0);
1022 g2 = PG_GETARG_GSERIALIZED_P(1);
1029 elog(ERROR,
"ST_Azimuth(geography, geography) is only valid for point inputs");
1041 elog(ERROR,
"ST_Azimuth(geography, geography) cannot work with empty points");
1055 PG_FREE_IF_COPY(g1, 0);
1056 PG_FREE_IF_COPY(g2, 1);
1059 if( isnan(azimuth) )
1064 PG_RETURN_FLOAT8(azimuth);
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area...
double lwgeom_azumith_spheroid(const LWPOINT *r, const LWPOINT *s, const SPHEROID *spheroid)
Calculate the bearing between two points on a spheroid.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...