PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ ellipsoid_out()

Datum ellipsoid_out ( PG_FUNCTION_ARGS  )

Definition at line 122 of file lwgeom_spheroid.c.

References SPHEROID::a, SPHEROID::f, MAX_DIGS_DOUBLE, and SPHEROID::name.

Referenced by ellipsoid_in().

123 {
124  SPHEROID *sphere = (SPHEROID *) PG_GETARG_POINTER(0);
125  char *result;
126 
127  result = palloc(MAX_DIGS_DOUBLE + MAX_DIGS_DOUBLE + 20 + 9 + 2);
128 
129  sprintf(result,"SPHEROID(\"%s\",%.15g,%.15g)",
130  sphere->name, sphere->a, 1.0/sphere->f);
131 
132  PG_RETURN_CSTRING(result);
133 }
#define MAX_DIGS_DOUBLE
double f
Definition: liblwgeom.h:315
double a
Definition: liblwgeom.h:313
char name[20]
Definition: liblwgeom.h:319
Here is the caller graph for this function: