org.opensha.sha.calc.hazardMap
Class HazardDataSetLoader

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

public class HazardDataSetLoader
extends Object


Constructor Summary
HazardDataSetLoader()
           
 
Method Summary
static Location decodeFileName(String fileName)
          Decodes a filename of the format lat_lon.txt
static GeoDataSet extractPointFromCurves(File dir, boolean isProbAt_IML, double level)
           
static GeoDataSet extractPointFromCurves(Map<Location,ArbitrarilyDiscretizedFunc> curves, boolean isProbAt_IML, double level)
           
static double getCurveVal(DiscretizedFunc func, boolean isProbAt_IML, double level)
           
static HashMap<Location,ArbitrarilyDiscretizedFunc> loadDataSet(File dir)
          Recursively loads all of the arbitrarily discretized functions at locations in the given directory structure.
static void main(String[] args)
           
static boolean shouldSkip(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 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(Map<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