org.opensha.sha.faultSurface
Class FaultTrace

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Location>
              extended by org.opensha.commons.geo.LocationList
                  extended by org.opensha.sha.faultSurface.FaultTrace
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Location>, java.util.Collection<Location>, java.util.List<Location>, java.util.RandomAccess, Named, XMLSaveable

public class FaultTrace
extends LocationList
implements Named

Title: FaultTrace

Description: This simply contains a vector (or array) of Location objects representing the top trace of a fault (with non-zero depth if it buried).

Version:
1.0
Author:
Sid Hellman, Steven W. Rock
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opensha.commons.geo.LocationList
XML_METADATA_NAME
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FaultTrace(java.lang.String faultName)
           
 
Method Summary
 FaultTrace clone()
          Overriden to return a deep copy of this LocationList.
 double getAveStrike()
          This returns the average strike (weight average by length).
 double getDipDirection()
          This returns the dip direction (between 0 and 360 degrees) defined by stike direction + 90.
 double getMinDistance(FaultTrace faultTrace, double discrInterval)
           
 java.lang.String getName()
          Returns the name of this object
 int getNumLocations()
           
 double getStrikeDirection()
          This returns the strike direction (between 0 and 360 degrees) defined by the first and last points only.
 double getStrikeDirectionDifference(FaultTrace trace)
          This returns the change in strike direction in going from this trace to the one passed in (input_trace_azimuth-this_azimuth), where this accounts the change in sign for azimuths at 180 degrees.
 double getTraceLength()
          This returns the total fault-trace length in km
 void setName(java.lang.String faultName)
           
 java.lang.String toString()
           
 
Methods inherited from class org.opensha.commons.geo.LocationList
closestPoint, equals, first, fromXMLMetadata, hashCode, last, minDistIndex, minDistToLine, minDistToLocation, reverse, split, subList, toPath, toXMLMetadata, toXMLMetadata, unmodifiableList
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, iterator, listIterator, listIterator, removeAll, retainAll
 

Constructor Detail

FaultTrace

public FaultTrace(java.lang.String faultName)
Method Detail

setName

public void setName(java.lang.String faultName)

getName

public java.lang.String getName()
Description copied from interface: Named
Returns the name of this object

Specified by:
getName in interface Named

getNumLocations

public int getNumLocations()

getTraceLength

public double getTraceLength()
This returns the total fault-trace length in km

Returns:

getAveStrike

public double getAveStrike()
This returns the average strike (weight average by length).

Note that this method is significantly slower than getStrikeDirection(), while providing almost identical results (typically ~0.08 degrees). See StrikeDirectionMethods for more information.

Returns:

getStrikeDirection

public double getStrikeDirection()
This returns the strike direction (between 0 and 360 degrees) defined by the first and last points only.

It is significantly faster than getAveStrike() and returns almost identical results, typically ~0.08 degrees. See StrikeDirectionMethods for more information.

Returns:
strike direction

getDipDirection

public double getDipDirection()
This returns the dip direction (between 0 and 360 degrees) defined by stike direction + 90.

Returns:
dip direction
See Also:
getStrikeDirection

getStrikeDirectionDifference

public double getStrikeDirectionDifference(FaultTrace trace)
This returns the change in strike direction in going from this trace to the one passed in (input_trace_azimuth-this_azimuth), where this accounts the change in sign for azimuths at 180 degrees. The output is between -180 and 180 degress).

Returns:

getMinDistance

public double getMinDistance(FaultTrace faultTrace,
                             double discrInterval)

toString

public java.lang.String toString()
Overrides:
toString in class LocationList

clone

public FaultTrace clone()
Description copied from class: LocationList
Overriden to return a deep copy of this LocationList.

Overrides:
clone in class LocationList
Returns:
a deep copy of this list