org.opensha.sha.calc.hazardMap
Class HazardDataSetLoader

java.lang.Object
  extended by org.opensha.sha.calc.hazardMap.HazardDataSetLoader

public class HazardDataSetLoader
extends java.lang.Object


Constructor Summary
HazardDataSetLoader()
           
 
Method Summary
static Location decodeFileName(java.lang.String fileName)
          Decodes a filename of the format lat_lon.txt
static GeoDataSet extractPointFromCurves(java.io.File dir, boolean isProbAt_IML, double level)
           
static GeoDataSet extractPointFromCurves(java.util.Map<Location,ArbitrarilyDiscretizedFunc> curves, boolean isProbAt_IML, double level)
           
static double getCurveVal(DiscretizedFunc func, boolean isProbAt_IML, double level)
           
static java.util.HashMap<Location,ArbitrarilyDiscretizedFunc> loadDataSet(java.io.File dir)
          Recursively loads all of the arbitrarily discretized functions at locations in the given directory structure.
static void main(java.lang.String[] args)
           
static boolean shouldSkip(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HazardDataSetLoader

public HazardDataSetLoader()
Method Detail

loadDataSet

public static java.util.HashMap<Location,ArbitrarilyDiscretizedFunc> loadDataSet(java.io.File dir)
                                                                          throws java.io.FileNotFoundException,
                                                                                 java.io.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:
java.io.FileNotFoundException
java.io.IOException

shouldSkip

public static boolean shouldSkip(java.io.File file)

extractPointFromCurves

public static GeoDataSet extractPointFromCurves(java.util.Map<Location,ArbitrarilyDiscretizedFunc> curves,
                                                boolean isProbAt_IML,
                                                double level)

extractPointFromCurves

public static GeoDataSet extractPointFromCurves(java.io.File dir,
                                                boolean isProbAt_IML,
                                                double level)
                                         throws java.io.FileNotFoundException,
                                                java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

getCurveVal

public static double getCurveVal(DiscretizedFunc func,
                                 boolean isProbAt_IML,
                                 double level)

decodeFileName

public static Location decodeFileName(java.lang.String fileName)
Decodes a filename of the format lat_lon.txt

Parameters:
fileName -
Returns:

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException