Package ucar.nc2.iosp.mcidas
Class AreaReader
- java.lang.Object
-
- ucar.nc2.iosp.mcidas.AreaReader
-
public class AreaReader extends Object
Class to read an AREA file and create a netCDF data structure from it.
-
-
Constructor Summary
Constructors Constructor Description AreaReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
init(String location, NetcdfFile ncfile)
initialize; note that the file is reopened herestatic 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 variableString
toString()
-
-
-
Method Detail
-
init
public boolean init(String location, NetcdfFile ncfile) throws ucar.mcidas.AreaFileException
initialize; note that the file is reopened here- Parameters:
location
- the AREA file to openncfile
- the netCDF file to fill out- Returns:
- true if successful
- Throws:
ucar.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 variablesection
- the section info (time,x,y range);- Returns:
- the data
- Throws:
IOException
- problem reading fileInvalidRangeException
- range doesn't match data
-
-