visad.data.mcidas
Class GRIDCoordinateSystem

java.lang.Object
  extended by visad.CoordinateSystem
      extended by visad.georef.NavigatedCoordinateSystem
          extended by visad.georef.MapProjection
              extended by visad.data.mcidas.GRIDCoordinateSystem
All Implemented Interfaces:
Serializable

public class GRIDCoordinateSystem
extends MapProjection

GRIDCoordinateSystem is the VisAD CoordinateSystem class for conversions to/from (Latitude, Longitude) and Cartesian (col,row), and with Latitude and Longitude in degrees.

See Also:
Serialized Form

Constructor Summary
GRIDCoordinateSystem(GridDirectory gridDirectory)
          create a GRID coordinate system from a GridDirectory
GRIDCoordinateSystem(int[] dirBlock)
          create a GRID coordinate system from the GRID's directory block;
 
Method Summary
 boolean equals(Object obj)
          Determines whether or not the Object in question is the same as this AREACoordinateSystem.
 double[][] fromReference(double[][] latlon)
          Converts lat/lon to grid xy (col,row)
 Rectangle2D getDefaultMapArea()
          Get the bounds for this grid
 int[] getDirBlock()
          Get the directory block used to initialize this GRIDCoordinateSystem
 double[][] toReference(double[][] rowcol)
          Converts grid xy (col,row) to latitude/longitude
 
Methods inherited from class visad.georef.MapProjection
getCenterLatLon, getLatLon, getXIndex, getYIndex, isLatLonOrder, isXYOrder, toString
 
Methods inherited from class visad.georef.NavigatedCoordinateSystem
getLatitudeIndex, getLongitudeIndex
 
Methods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GRIDCoordinateSystem

public GRIDCoordinateSystem(GridDirectory gridDirectory)
                     throws VisADException
create a GRID coordinate system from a GridDirectory

Parameters:
gridDirectory - directory to use
Throws:
VisADException

GRIDCoordinateSystem

public GRIDCoordinateSystem(int[] dirBlock)
                     throws VisADException
create a GRID coordinate system from the GRID's directory block;

Parameters:
dirBlock - the grid's directory block
Throws:
VisADException
Method Detail

toReference

public double[][] toReference(double[][] rowcol)
                       throws VisADException
Converts grid xy (col,row) to latitude/longitude

Specified by:
toReference in class CoordinateSystem
Parameters:
rowcol - array containing the col/row pairs
Returns:
array containing the corresponding lat/lon pairs
Throws:
VisADException - if input is invalid or there is no nav module

fromReference

public double[][] fromReference(double[][] latlon)
                         throws VisADException
Converts lat/lon to grid xy (col,row)

Specified by:
fromReference in class CoordinateSystem
Parameters:
latlon - array containing the corresponding lat/lon pairs
Returns:
array containing the col/row pairs
Throws:
VisADException - if input is invalid or there is no nav module

getDefaultMapArea

public Rectangle2D getDefaultMapArea()
Get the bounds for this grid

Specified by:
getDefaultMapArea in class MapProjection
Returns:
the bounding box of the MapProjection

getDirBlock

public int[] getDirBlock()
Get the directory block used to initialize this GRIDCoordinateSystem


equals

public boolean equals(Object obj)
Determines whether or not the Object in question is the same as this AREACoordinateSystem. The specified Object is equal to this GRIDCoordinateSystem if it is an instance of GRIDCoordinateSystem and it has the same navigation module and default map area as this one.

Specified by:
equals in class CoordinateSystem
Parameters:
obj - the Object in question
Returns:
true if and only if this instance equals cs.