1017 g1 = PG_GETARG_GSERIALIZED_P(0);
1018 g2 = PG_GETARG_GSERIALIZED_P(1);
1025 elog(ERROR,
"ST_Azimuth(geography, geography) is only valid for point inputs");
1037 elog(ERROR,
"ST_Azimuth(geography, geography) cannot work with empty points");
1051 PG_FREE_IF_COPY(g1, 0);
1052 PG_FREE_IF_COPY(g2, 1);
1055 if( isnan(azimuth) )
1060 PG_RETURN_FLOAT8(azimuth);
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)...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
void lwgeom_free(LWGEOM *geom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
double lwgeom_azumith_spheroid(const LWPOINT *r, const LWPOINT *s, const SPHEROID *spheroid)
Calculate the bearing between two points on a spheroid.