ucar.nc2.iosp.mcidas
Class AreaReader

java.lang.Object
  extended by ucar.nc2.iosp.mcidas.AreaReader

public class AreaReader
extends Object

Class to read an AREA file and create a netCDF data structure from it.

Author:
Don Murray

Constructor Summary
AreaReader()
          Default ctor
 
Method Summary
 boolean init(RandomAccessFile raf, NetcdfFile ncfile)
          initialize with the file
static boolean isValidFile(RandomAccessFile raf)
          Check to see if this is a valid AREA file.
 Array readVariable(Variable v2, Section section)
          Read the values for a variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaReader

public AreaReader()
Default ctor

Method Detail

init

public boolean init(RandomAccessFile raf,
                    NetcdfFile ncfile)
             throws edu.wisc.ssec.mcidas.AreaFileException
initialize with the file

Parameters:
raf - the AREA file to open
ncfile - the netCDF file to fill out
Returns:
true if successful
Throws:
edu.wisc.ssec.mcidas.AreaFileException - problem opening the area file

isValidFile

public static boolean isValidFile(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 Array readVariable(Variable v2,
                          Section section)
                   throws IOException,
                          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
InvalidRangeException - range doesn't match data


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.