public final class Faults extends Object
| Modifier and Type | Field and Description |
|---|---|
static Range<Double> |
DIP_RANGE
Supported fault dips:
[0..90]°. |
static Range<Double> |
RAKE_RANGE
Supported fault rakes:
[-180..180]°. |
static Range<Double> |
STRIKE_RANGE
Supported fault strikes:
[0..360)°. |
| Modifier and Type | Method and Description |
|---|---|
static double |
checkDip(double dip)
Ensure
0° ≤ dip ≤ 90°. |
static double |
checkRake(double rake)
Ensure
-180° ≤ rake ≤ 180°. |
static double |
checkStrike(double strike)
Ensure
0° ≤ strike < 360°. |
static LocationList |
checkTrace(LocationList trace)
Ensure
trace contains at least two points. |
static double |
dipDirection(double strike) |
static double |
dipDirection(LocationList locs)
Returns the dip direction for the supplied line/trace assuming the
right-hand rule (strike + 90°).
|
static double |
dipDirection(Location p1,
Location p2) |
static double |
dipDirectionRad(double strikeRad) |
static double |
dipDirectionRad(LocationList locs) |
static double |
dipDirectionRad(Location p1,
Location p2) |
static double |
getAngleAverage(List<Double> angles)
Averages angles dealing with any -180/180 or 0/360 cut issues.
|
static List<LocationList> |
getEqualLengthSubsectionTraces(LocationList faultTrace,
double maxSubSectionLen)
This subdivides the given fault trace into sub-traces that have the length
as given (or less).
|
static List<LocationList> |
getEqualLengthSubsectionTraces(LocationList faultTrace,
double maxSubSectionLen,
int minSubSections)
This subdivides the given fault trace into sub-traces that have the length
as given (or less).
|
static double |
getLengthBasedAngleAverage(LocationList locs,
List<Double> angles)
Returns an average of the given angles scaled by the distances between the
corresponding locations.
|
static double |
getScaledAngleAverage(List<Double> scalars,
List<Double> angles)
Returns an average of the given angles scaled by the given scalars.
|
static double[] |
getSlipVector(double[] strikeDipRake)
Calculates a slip vector from strike, dip, and rake information provided.
|
static double |
hypocentralDepth(double dip,
double width,
double zTop)
Generic model for hypocentral depth returns a value that is halfway between
the top and bottom of a fault, parameterized by its dip, width, and depth.
|
static LocationList |
resampleTrace(LocationList trace,
int num)
This resamples the trace into num subsections of equal length (final number
of points in trace is num+1).
|
static double |
strike(LocationList locs)
Compute the strike in degrees of the supplied line, or trace, by connecting
the first and last points in
locs. |
static double |
strike(Location p1,
Location p2)
Compute the strike in degrees of the line connecting
p1 to
p2. |
static double |
strikeRad(LocationList locs)
Compute the strike in radians of the supplied line, or trace, by connecting
the first and last points in
locs. |
static double |
strikeRad(Location p1,
Location p2)
Compute the strike in degrees of the line connecting
p1 to
p2. |
public static double checkDip(double dip)
0° ≤ dip ≤ 90°.dip - to validateIllegalArgumentException - if dip is outside the range
[0..90]°public static double checkStrike(double strike)
0° ≤ strike < 360°.strike - to validateIllegalArgumentException - if strike is outside the range
[0..360)°public static double checkRake(double rake)
-180° ≤ rake ≤ 180°.rake - to validateIllegalArgumentException - if rake is outside the range
[-180..180]°public static LocationList checkTrace(LocationList trace)
trace contains at least two points.trace - to validateIllegalArgumentException - if trace.size() < 2public static List<LocationList> getEqualLengthSubsectionTraces(LocationList faultTrace, double maxSubSectionLen)
faultTrace - maxSubSectionLen - Maximum length of each subsectionList of subsection tracespublic static List<LocationList> getEqualLengthSubsectionTraces(LocationList faultTrace, double maxSubSectionLen, int minSubSections)
faultTrace - maxSubSectionLen - Maximum length of each subsectionminSubSections - minimum number of sub sections to generateList of subsection tracespublic static LocationList resampleTrace(LocationList trace, int num)
trace - num - - number of subsectionspublic static double getLengthBasedAngleAverage(LocationList locs, List<Double> angles)
locs - locations for distance scalingangles - angles in degrees corresponding to each pair of locationspublic static double getScaledAngleAverage(List<Double> scalars, List<Double> angles)
scalars - scalar weights for each angle (does not need to be
normalized)angles - angles in degrees corresponding to each pair of locationspublic static double getAngleAverage(List<Double> angles)
angles - public static double hypocentralDepth(double dip,
double width,
double zTop)
dip - of the fault planewidth - of the fault planezTop - depth to the fault planepublic static double strike(LocationList locs)
locs. Method forwards to
Locations.azimuth(Location, Location).
This approach has been shown to be as accurate as length-weighted angle averaging and is significantly faster; see StrikeDirectionMethods for more information.
locs - line for which to compute strikestrikeRad(LocationList)public static double strike(Location p1, Location p2)
p1 to
p2.p1 - starting Locationp2 - ending LocationstrikeRad(Location, Location)public static double strikeRad(LocationList locs)
locs. Method forwards to
Locations.azimuth(Location, Location).
This approach has been shown to be as accurate as length-weighted angle averaging and is significantly faster; see StrikeDirectionMethods for more information.
locs - line for which to compute strikestrike(LocationList)public static double strikeRad(Location p1, Location p2)
p1 to
p2.p1 - starting Locationp2 - ending Locationstrike(Location, Location)public static double dipDirection(LocationList locs)
locs - line for which to compute dip directionpublic static double dipDirectionRad(LocationList locs)
public static double dipDirection(double strike)
public static double dipDirectionRad(double strikeRad)
public static double[] getSlipVector(double[] strikeDipRake)
strikeDipRake - array