eqswath: Extract a set of eathquakes in swath along a cross sectional...

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

View source: R/eqswath.R

Description

Extract a set of eathquakes in swath along a cross sectional line

Usage

1
eqswath(x, y, z, L, width = 1, PROJ = NULL)

Arguments

x

x-coordinates of earthquakes

y

y-coordinates of earthquakes

z

z-coordinates of earthquakes

L

list of x-y coordinates of cross section

width

width of swath (km)

PROJ

projection information

Details

All units should be the same.

Value

r

r-distance along cross section (x-coordinate)

dh

distance from cross seection

depth

depth in cross section (y-coordinate)

flag

index vector of which earthquakes fell in swath and depth range

InvBox

coordinates of swath for plotting on map

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

XSECwin, XSECEQ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 #############  create data
x = runif(100, 1, 100)  
y = runif(100, 1, 100) 
z = runif(100, 1, 10) 
plot(x,y, asp=1)
## L = locator()

L=list()
L$x=c( 5.42328560757,64.62879777806)
L$y=c(89.843266449785,-0.174423911329)

J = eqswath(x, y, z, L, width = 10, PROJ = NULL)

##########   show box:
plot(x,y, asp=1)
lines(J$InvBox$x, J$InvBox$y)


############  show cross section with events plotted
plot(J$r, -J$depth)

GEOmap documentation built on May 30, 2017, 3:58 a.m.