net.sourceforge.jgrib.gdsgrids
Class GribGDSLatLon

Object
  extended by GribRecordGDS
      extended by GribGDSLatLon

public final class GribGDSLatLon
extends GribRecordGDS

A class that represents the grid definition section (GDS) of a GRIB record with a Lat/Lon grid projection.

Author:
Richard Gonzalez based heavily on the original GribRecordGDS, simone giannecchini

Field Summary
static int LATLON_GRID_TYPE
           
 
Fields inherited from class GribRecordGDS
adiacent_i, EARTH_RADIUS, grid_dx, grid_dy, grid_lat1, grid_lat2, grid_latsp, grid_lon1, grid_lon2, grid_lonsp, grid_mode, grid_nx, grid_ny, grid_rotang, grid_scan, grid_type, length
 
Constructor Summary
GribGDSLatLon()
          GribGDSLatLon
GribGDSLatLon(ImageInputStream in, int[] header)
          Constructs a GribRecordGDS object from a bit input stream.
 
Method Summary
 boolean canProduce(int GDSType)
           
 boolean equals(Object obj)
           
 double[] getGridCoords()
          Get grid coordinates in longitude/latitude pairs Longitude is returned in the range +/- 180 degrees
 Map getImplementationHints()
           
 String getName()
           
 Set<Integer> getSupportedTypes()
           
 double[] getXCoords()
          Get longitude coordinates converted to the range +/- 180
 double[] getXCoords(boolean convertTo180)
          Get longitide coordinates
 double[] getYCoords()
          Get all latitude coordinates
 int hashCode()
           
 boolean isAvailable()
           
 String toString()
          Get a string representation of this GDS.
 void writeTo(OutputStream out)
          writeTo writes this section to an output stream
 
Methods inherited from class GribRecordGDS
compare, getGridDX, getGridDY, getGridLat1, getGridLat2, getGridLatSP, getGridLon1, getGridLon2, getGridLonSP, getGridMode, getGridNX, getGridNY, getGridRotAngle, getGridScanmode, getGridType, getLength, isAdiacent_i_Or_j, setGridDX, setGridDY, setGridLat1, setGridLat2, setGridLatSP, setGridLon1, setGridLon2, setGridLonSP, setGridMode, setGridNX, setGridNY, setGridRotAngle, setGridScanmode, setGridType, setLength
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LATLON_GRID_TYPE

public static final int LATLON_GRID_TYPE
See Also:
Constant Field Values
Constructor Detail

GribGDSLatLon

public GribGDSLatLon(ImageInputStream in,
                     int[] header)
              throws IOException
Constructs a GribRecordGDS object from a bit input stream. See Table D of NCEP Office Note 388 for details

Parameters:
in - bit input stream with GDS content
header - DOCUMENT ME!
Throws:
IOException - if stream can not be opened etc.
NoValidGribException - if stream contains no valid GRIB file
NotSupportedException - DOCUMENT ME!

GribGDSLatLon

public GribGDSLatLon()
GribGDSLatLon

Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class GribRecordGDS

equals

public boolean equals(Object obj)
Overrides:
equals in class GribRecordGDS

getXCoords

public double[] getXCoords()
Get longitude coordinates converted to the range +/- 180

Returns:
longtitude as double

getXCoords

public double[] getXCoords(boolean convertTo180)
Get longitide coordinates

Parameters:
convertTo180 - DOCUMENT ME!
Returns:
longtitude as double

getYCoords

public double[] getYCoords()
Get all latitude coordinates

Returns:
latitude as double

getGridCoords

public double[] getGridCoords()
Get grid coordinates in longitude/latitude pairs Longitude is returned in the range +/- 180 degrees

Overrides:
getGridCoords in class GribRecordGDS
Returns:
longitide/latituide as doubles

toString

public String toString()
Get a string representation of this GDS.

Overrides:
toString in class GribRecordGDS
Returns:
string representation of this GDS

writeTo

public void writeTo(OutputStream out)
             throws IOException
writeTo writes this section to an output stream

Specified by:
writeTo in class GribRecordGDS
Parameters:
out - String
Throws:
IOException - DOCUMENT ME!

getName

public String getName()

getSupportedTypes

public Set<Integer> getSupportedTypes()

isAvailable

public boolean isAvailable()

canProduce

public boolean canProduce(int GDSType)

getImplementationHints

public Map getImplementationHints()


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.