c_get_spheroid - Returns the spheroid datum that is associated with the given semi-major and semi-minor axes

SYNTAX

#include "las.h"
#include "geompak.h"
int c_get_spheroid
(
    double semi_major, /* I: ellipsoid semi-major axis */
    double semi_minor, /* I: ellipsoid semi-minor axis */
    long *datum,       /* O: matching ellipsoid datum number */
    long *datum_valid  /* O: valid flag for the datum (1=valid) */
)

PARAMETERS

semi_major (input, double)

The semi-major axis of the desired ellipsoid.

semi_minor (input, double)

The semi-minor axis of the desired ellipsoid.

datum (output, long *)

The datum number matching the input semi-major and semi-minor axes.

datum_valid (output, long *)

Flag to specify if the datum is valid

   1 = valid datum
   anything else = non-valid datum

DESCRIPTION

c_get_spheroid() will return the datum associated with the input semi-major and semi-minor axes. Some of the spheroid datums have nearly identical parameters (GRS80 and WGS84). The first datum found that is within the tolerances is the datum that is returned.

RETURN VALUE

c_get_spheroid() returns

     E_SUCC (0) --> successful completion
     E_FAIL (-1) --> operation failed