PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ LWGEOM_distance_sphere()

Datum LWGEOM_distance_sphere ( PG_FUNCTION_ARGS  )

Definition at line 557 of file lwgeom_spheroid.c.

558{
559 SPHEROID s;
560 /* Init to WGS84 */
561 spheroid_init(&s, 6378137.0, 6356752.314245179498);
562
563 if (PG_NARGS() == 3) {
564 s.radius = PG_GETARG_FLOAT8(2);
565 }
566 s.a = s.b = s.radius;
567
568 PG_RETURN_DATUM(DirectFunctionCall4(geometry_distance_spheroid,
569 PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PointerGetDatum(&s), BoolGetDatum(false)));
570}
char * s
Definition cu_in_wkt.c:23
void spheroid_init(SPHEROID *s, double a, double b)
Initialize a spheroid object for use in geodetic functions.
Definition lwspheroid.c:39
Datum geometry_distance_spheroid(PG_FUNCTION_ARGS)

References geometry_distance_spheroid(), s, and spheroid_init().

Here is the call graph for this function: