ucar.grib
Class GribReadIndex

java.lang.Object
  extended by ucar.grib.GribReadIndex

public class GribReadIndex
extends java.lang.Object

Reads either a binary or text index and returns a GridIndex


Constructor Summary
GribReadIndex()
          Constructor for creating an Index from the Grib file.
 
Method Summary
 void Grib1GDS(GribGridDefRecord ggdr, Grib1GDSVariables gdsv, int gdskey)
          Populates a GridDefRecord according to Projection.
 void Grib2GDS(GribGridDefRecord ggdr, Grib2GDSVariables gdsv, int gdskey)
          Populates a GridDefRecord according to Projection.
static void main(java.lang.String[] args)
          testing
 GridIndex open(java.lang.String location)
          open Grib Index file for scanning.
 GridIndex open(java.lang.String location, java.io.InputStream ios)
          open Grib Index file for scanning.
 void setDebug(boolean flag)
           
 void setVerbose(boolean flag)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GribReadIndex

public GribReadIndex()
Constructor for creating an Index from the Grib file.

Method Detail

open

public final GridIndex open(java.lang.String location)
                     throws java.io.IOException
open Grib Index file for scanning.

Parameters:
location - URL or local filename of Grib Index file
Returns:
GridIndex
Throws:
java.io.IOException - on read error

open

public final GridIndex open(java.lang.String location,
                            java.io.InputStream ios)
                     throws java.io.IOException
open Grib Index file for scanning.

Parameters:
location - URL or local filename of Grib Index file
ios - input stream
Returns:
false if does not match current version; you should regenerate it in that case.
Throws:
java.io.IOException - on read error

Grib2GDS

public void Grib2GDS(GribGridDefRecord ggdr,
                     Grib2GDSVariables gdsv,
                     int gdskey)
Populates a GridDefRecord according to Projection.

Parameters:
ggdr - GridDefRecord
gdsv - Grib2GDSVariables gdsv
gdskey - key for this gds

Grib1GDS

public void Grib1GDS(GribGridDefRecord ggdr,
                     Grib1GDSVariables gdsv,
                     int gdskey)
Populates a GridDefRecord according to Projection.

Parameters:
ggdr - GridDefRecord
gdsv - Grib1GDSVariables gdsv

setDebug

public void setDebug(boolean flag)

setVerbose

public void setVerbose(boolean flag)

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
testing

Parameters:
args - index to read
Throws:
java.io.IOException - on read error