obspy.geodetics.base.locations2degrees¶

locations2degrees(lat1, long1, lat2, long2)[source]

Convenience function to calculate the great circle distance between two points on a spherical Earth.

This method uses the Vincenty formula in the special case of a spherical Earth. For more accurate values use the geodesic distance calculations of geopy (https://github.com/geopy/geopy).

Parameters: lat1 (float) Latitude of point 1 in degrees long1 (float) Longitude of point 1 in degrees lat2 (float) Latitude of point 2 in degrees long2 (float) Longitude of point 2 in degrees float Distance in degrees as a floating point number.

Example

>>> from obspy.geodetics import locations2degrees
>>> locations2degrees(5, 5, 10, 10)
7.0397014191753815