ucar.grib
Class GribIndexReader

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

public class GribIndexReader
extends Object

Reads either a binary or text index and returns a GridIndex. For GRIB 1 or 2


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

Constructor Detail

GribIndexReader

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

Method Detail

open

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

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

open

public final GridIndex open(String location,
                            InputStream ios)
                     throws 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:
IOException - on read error

populateGDS2

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

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

populateGDS1

public void populateGDS1(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(String[] args)
                 throws IOException
testing

Parameters:
args - index to read
Throws:
IOException - on read error


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