Documentation of 'visad.data.gis.UsgsDemAdapter' Java class
UsgsDemAdapter
visad.data.gis

Class UsgsDemAdapter



  • public class UsgsDemAdapter
    extends java.lang.Object
    UsgsDemAdapter converts the data in a USGS DEM file to a VisAD object. The specification for * the format can be found at http://rockyweb.cr.usgs.gov/nmpstds/acrodocs/dem/2DEM0198.PDF. Refer to this document for further explanation of the data elements of a DEM.

    To simplify things, class UsgsDem changes the format of a USGS 7.5 minute DEM to a simpler "row by column" raster form rather than the "row by column by subcolumn" format in the specification.

    • Constructor Summary

      Constructors 
      Constructor and Description
      UsgsDemAdapter()
      Default constructor, everything remains null.
      UsgsDemAdapter(java.lang.String filename)
      Constructs a new UsgsDemAdapter object with data read from the given (native format, non-SDTS) USGS DEM file
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      FieldImpl getData()
      Get the DEM as a VisAD data object
      Gridded2DSet getDomain()
      Get the domain set for this DEM
      void load(java.lang.String filename)
      Reinitializes this UsgsDemAdapter object with data read from the given (non-SDTS) USGS DEM file.
      static void main(java.lang.String[] args) 
      static java.lang.String padRight(java.lang.Object obj, int i)
      This method takes any Object and using its String representation provided by its toString() method, pads it with blank characters on the right, to a specified length.
      java.lang.String toString()
      Multi-line string representation
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UsgsDemAdapter

        public UsgsDemAdapter()
        Default constructor, everything remains null. Call load() to load a file.
      • UsgsDemAdapter

        public UsgsDemAdapter(java.lang.String filename)
                       throws java.io.IOException,
                              VisADException
        Constructs a new UsgsDemAdapter object with data read from the given (native format, non-SDTS) USGS DEM file
        Parameters:
        filename - the name of the DEM file
        Throws:
        java.io.IOException
        VisADException
    • Method Detail

      • load

        public void load(java.lang.String filename)
                  throws java.io.IOException,
                         VisADException
        Reinitializes this UsgsDemAdapter object with data read from the given (non-SDTS) USGS DEM file.
        Parameters:
        filename - the name of the DEM file
        Throws:
        java.io.IOException - - If an I/O error occurs (invalid file)
        VisADException
      • toString

        public java.lang.String toString()
        Multi-line string representation
        Overrides:
        toString in class java.lang.Object
        Returns:
        An info string suitable for printing to the console.
      • padRight

        public static java.lang.String padRight(java.lang.Object obj,
                                                int i)
        This method takes any Object and using its String representation provided by its toString() method, pads it with blank characters on the right, to a specified length.
        Parameters:
        obj - Object to be padded
        i - padding length
      • getData

        public FieldImpl getData()
                          throws VisADException
        Get the DEM as a VisAD data object
        Returns:
        a FlatField of type ((x,y) -> altitude) where x,y is either (Longitude, Latitude) or (EASTING, NORTHING)
        Throws:
        VisADException
      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.