PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ LWGEOM_distance_ellipsoid()

Datum LWGEOM_distance_ellipsoid ( PG_FUNCTION_ARGS  )

Definition at line 534 of file lwgeom_spheroid.c.

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