Class DemFile

java.lang.Object
  |
  +--ElevationFile
        |
        +--DemFile

public class DemFile
extends ElevationFile

This class is a specialization of the ElevationFile class created specifically to load DEM format data from the USGS archives.

Author:
Mark Pendergast
See Also:
ElevationFile

Field Summary
static int ARECORD_LENGTH
           
static int MIN_ARECORD_TOKENS
           
static int QUADRANGLE_NAME_LENGTH
           
 
Fields inherited from class ElevationFile
elevations, fileName, groundCoordinates, maxElevation, minElevation, nColumns, nRows, quadrangleName
 
Constructor Summary
DemFile(java.lang.String aFileName)
          Create DemFile object from data contained in specified file
 
Method Summary
 double parseDemDouble(java.lang.String in)
          This method parses a double from a string.
 int parseDemInt(java.lang.String in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARECORD_LENGTH

public static final int ARECORD_LENGTH
See Also:
Constant Field Values

QUADRANGLE_NAME_LENGTH

public static final int QUADRANGLE_NAME_LENGTH
See Also:
Constant Field Values

MIN_ARECORD_TOKENS

public static final int MIN_ARECORD_TOKENS
See Also:
Constant Field Values
Constructor Detail

DemFile

public DemFile(java.lang.String aFileName)
        throws java.lang.IllegalArgumentException
Create DemFile object from data contained in specified file

Parameters:
aFileName - name of the DEM file to load. File name should be a fully qualified file name.
Throws:
IllegalArgumnetException - thrown whenever an invalid data file is given as an argument.
java.lang.IllegalArgumentException
Method Detail

parseDemDouble

public double parseDemDouble(java.lang.String in)
                      throws java.lang.NumberFormatException
This method parses a double from a string. Note, DEM data uses the old fortan notation for storing doubles using a 'D' intead of an 'E'.

Parameters:
in - string to parse
Returns:
double value from string
Throws:
java.lang.NumberFormatException - thrown when string is not a valid double

parseDemInt

public int parseDemInt(java.lang.String in)
                throws java.lang.NumberFormatException
java.lang.NumberFormatException