obspy.clients.iris.client.Client.distaz
- Client.distaz(stalat, stalon, evtlat, evtlon)[source]
Low-level interface for distaz Web service of EarthScope (http://service.iris.edu/irisws/distaz/) - release 1.0.3 (2016).
This method will calculate the great-circle angular distance, azimuth, and backazimuth between two geographic coordinate pairs. All results are reported in degrees, with azimuth and backazimuth measured clockwise from North.
- Parameters:
- Return type:
- Returns:
Dictionary containing values for azimuth, backazimuth and distance.
The
azimuth
is the angle from the station to the event, while thebackazimuth
is the angle from the event to the station.Latitudes are converted to geocentric latitudes using the WGS84 spheroid to correct for ellipticity.
The
distance
(in degrees) anddistancemeters
are the distance between the two points on the spheroid.Example
>>> from obspy.clients.iris import Client >>> client = Client() >>> result = client.distaz(stalat=1.1, stalon=1.2, evtlat=3.2, ... evtlon=1.4) >>> print(result['distance']) 2.10256 >>> print(result['distancemeters']) 233272.79028 >>> print(result['backazimuth']) 5.46944 >>> print(result['azimuth']) 185.47695 >>> print(result['ellipsoidname']) WGS84