obspy.geodetics.base.degrees2kilometers

degrees2kilometers(degrees, radius=6371.0)[source]

Convenience function to convert (great circle) degrees to kilometers assuming a perfectly spherical Earth.

Parameters:
  • degrees (float) – Distance in (great circle) degrees

  • radius (float, optional) – Radius of the Earth used for the calculation.

Return type:

float

Returns:

Distance in kilometers as a floating point number.

Example

>>> from obspy.geodetics import degrees2kilometers
>>> degrees2kilometers(1)
111.19492664455873