obspy.core.util.geodetics.gps2DistAzimuth

gps2DistAzimuth(lat1, lon1, lat2, lon2)

Computes the distance between two geographic points on the WGS84 ellipsoid and the forward and backward azimuths between these points.

Parameters:
  • lat1 Latitude of point A in degrees (positive for northern, negative for southern hemisphere)
  • lon1 Longitude of point A in degrees (positive for eastern, negative for western hemisphere)
  • lat2 Latitude of point B in degrees (positive for northern, negative for southern hemisphere)
  • lon2 Longitude of point B in degrees (positive for eastern, negative for western hemisphere)
Returns:

(Great circle distance in m, azimuth A->B in degrees, azimuth B->A in degrees)

Note

This function will check if you have installed the Python module geographiclib - a very fast module for converting between geographic, UTM, UPS, MGRS, and geocentric coordinates, for geoid calculations, and for solving geodesic problems. Otherwise the locally implemented Vincenty’s Inverse formulae (obspy.core.util.geodetics.calcVincentyInverse()) is used which has known limitations for two nearly antipodal points and is ca. 4x slower.

This Page