• Creates a geodesy instance for the given reference that performs geodesy calculations using spherical approximations of the ellipsoid associated with the given reference. The results of the calculations performed by this type of geodesy instance are less accurate than the ellipsoidal variants, but can be computed faster.

    If earthRadius is specified instances returned by this method will use the given radius when performing spherical calculations. Otherwise an appropriate value for the earth radius will be chosen automatically based on the ellipsoid associated with the given reference.

    Parameters

    • reference: CoordinateReference

      the reference

    • Optional earthRadius: number

      the radius of the sphere in meters

    Returns Geodesy

    a geodesy instance

    Throws

    ProgrammingError if no reference was given or if the reference is not a spatial reference