Class AreaReader


  • public class AreaReader
    extends Object
    Class to read an AREA file and create a netCDF data structure from it.
    • Constructor Detail

      • AreaReader

        public AreaReader()
    • Method Detail

      • init

        public boolean init​(String location,
                            ucar.nc2.NetcdfFile ncfile)
                     throws ucar.mcidas.AreaFileException
        initialize; note that the file is reopened here
        Parameters:
        location - the AREA file to open
        ncfile - the netCDF file to fill out
        Returns:
        true if successful
        Throws:
        ucar.mcidas.AreaFileException - problem opening the area file
      • isValidFile

        public static boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
        Check to see if this is a valid AREA file.
        Parameters:
        raf - the file in question
        Returns:
        true if it is an AREA file.
      • readVariable

        public ucar.ma2.Array readVariable​(ucar.nc2.Variable v2,
                                           ucar.ma2.Section section)
                                    throws IOException,
                                           ucar.ma2.InvalidRangeException
        Read the values for a variable
        Parameters:
        v2 - the variable
        section - the section info (time,x,y range);
        Returns:
        the data
        Throws:
        IOException - problem reading file
        ucar.ma2.InvalidRangeException - range doesn't match data