distaz: Access the 'distaz' Web Service for distance/azimuth...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

From [1]: The distance-azimuth service 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. The azimuth is the angle from the station to the event, while the backazimuth is the angle from the event to the station. Latitudes are converted to geocentric latitudes using the WGS84 spheroid to correct for ellipticity.

Usage

1
2
3
4
5
ws.distaz(station.latlon = c(0, 0), event.latlon = c(0, 0),
  filename = NULL, verbose = TRUE)

distaz.ws(station.latlon = c(0, 0), event.latlon = c(0, 0),
  filename = NULL, verbose = TRUE)

Arguments

station.latlon

numeric; the decimal latitude and longitude of the station

event.latlon

numeric; the decimal latitude and longitude of the event (the 'source')

filename

NA for an auto-generated filename based on the inputs; NULL for a temporary filename; or, a character string of the user's choosing. See Details for details about the auto-generated name.

verbose

logical; should messages be given?

Details

The query is generated with constructor2, and executed with query.iris, which throws errors based on check.query.

distaz.ws is simply a pointer to ws.distaz

Filename options (filename=)

Autogenerated files are of the form:

iriswsQ.distaz

Temporary files are generated within query.iris.

Value

A list (invisibly) with the query string, and data from the result

Author(s)

AJ Barbour

References

[1] http://service.iris.edu/irisws/distaz/1/

See Also

Other WebServices: flinnengdahl, irisws-webservices, resp, timeseries, traveltime

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

# exact same point -- should give zero
qr <- ws.distaz()
querydata(qr)

# two different locations -- note the coordinates
# must be in the order of latitude, longitude
qr <- ws.distaz(c(0.,0.),c(30.,-100.))
querydata(qr)
# should give
#   azimuth backAzimuth distance
#1 84.98686    300.2136 98.66374


## End(Not run)

abarbour/irisws documentation built on May 10, 2019, 4:07 a.m.