PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ LWGEOM_distance_ellipsoid()

Datum LWGEOM_distance_ellipsoid ( PG_FUNCTION_ARGS  )

Definition at line 532 of file lwgeom_spheroid.c.

533 {
534  SPHEROID s;
535 
536  /* No spheroid provided */
537  if (PG_NARGS() == 2) {
538  /* Init to WGS84 */
539  spheroid_init(&s, 6378137.0, 6356752.314245179498);
540  PG_RETURN_DATUM(DirectFunctionCall4(geometry_distance_spheroid,
541  PG_GETARG_DATUM(0),
542  PG_GETARG_DATUM(1),
543  PointerGetDatum(&s),
544  BoolGetDatum(true)));
545  }
546 
547  PG_RETURN_DATUM(DirectFunctionCall4(geometry_distance_spheroid,
548  PG_GETARG_DATUM(0),
549  PG_GETARG_DATUM(1),
550  PG_GETARG_DATUM(2),
551  BoolGetDatum(true)));
552 }
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: