org.opensha.sha.calc.hazardMap
Class HazardDataSetLoader
java.lang.Object
org.opensha.sha.calc.hazardMap.HazardDataSetLoader
public class HazardDataSetLoader
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HazardDataSetLoader
public HazardDataSetLoader()
loadDataSet
public static HashMap<Location,ArbitrarilyDiscretizedFunc> loadDataSet(File dir)
throws FileNotFoundException,
IOException
- Recursively loads all of the arbitrarily discretized functions at locations in the given
directory structure. Files should be named "lat_lon".txt.
- Parameters:
dir -
- Returns:
-
- Throws:
FileNotFoundException
IOException
shouldSkip
public static boolean shouldSkip(File file)
extractPointFromCurves
public static GeoDataSet extractPointFromCurves(HashMap<Location,ArbitrarilyDiscretizedFunc> curves,
boolean isProbAt_IML,
double level)
extractPointFromCurves
public static GeoDataSet extractPointFromCurves(File dir,
boolean isProbAt_IML,
double level)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
getCurveVal
public static double getCurveVal(DiscretizedFunc func,
boolean isProbAt_IML,
double level)
decodeFileName
public static Location decodeFileName(String fileName)
- Decodes a filename of the format lat_lon.txt
- Parameters:
fileName -
- Returns:
main
public static void main(String[] args)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException