obspy.signal.util.util_geo_km

util_geo_km(orig_lon, orig_lat, lon, lat)[source]

Transform lon, lat to km with reference to orig_lon and orig_lat on the elliptic Earth.

>>> util_geo_km(12.0, 48.0, 12.0, 48.0)
(0.0, 0.0)
>>> x, y = util_geo_km(12.0, 48.0, 13.0, 49.0)
>>> print(round(x,7))
73.9041417
>>> print(round(y,7))
111.1908262
Parameters:
  • orig_lon Longitude of reference origin
  • orig_lat Latitude of reference origin
  • lat Latitude to calculate relative coordinate in km
  • lon Longitude to calculate relative coordinate in km
Returns:

x, y coordinate in km (in reference to origin)