Documentation of 'edu.wisc.ssec.mcidas.GRIDnav' Java class
GRIDnav
edu.wisc.ssec.mcidas

Class GRIDnav

  • All Implemented Interfaces:
    java.io.Serializable


    public class GRIDnav
    extends java.lang.Object
    implements java.io.Serializable
    GRIDnav is the class for handling the navigation of McIDAS grids. It is basically a Java version of GRDDEF.FOR.
    See Also:
    McIDAS Programmer's Manual, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      int indexCol
      "Column" index in row/column array
      int indexLat
      "Latitude" index in latitude/longitude array
      int indexLon
      "Longitude" index in latitude/longitude array
      int indexRow
      "Row" index in row/column array
    • Constructor Summary

      Constructors 
      Constructor and Description
      GRIDnav(int[] gridDirBlock)
      Construct a new GRIDnav from a grid directory block
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      Determines whether or not the Object in question is the same as this AREAnav.
      int getColumnIndex()
      Get the column index
      int getRowIndex()
      Get the row index
      double getRowOffset()
      Get the row offset for flipped coordinates
      boolean isFlippedRowCoordinates()
      Determine if navigation is using flipped coordinates.
      void setFlipRowCoordinates(int row)
      specify whether the row coordinates are inverted and the row offset.
      void setStart(int startRow, int startColumn)
      define the starting row and column of another coordinate system -- for example (0,0)
      double[][] toLatLon(double[][] rowcol)
      converts from grid coordinates (x,y) or (col, row) to latitude/longitude
      double[][] toRowCol(double[][] latlon)
      toRowCol converts latitude/longitude to grid row/col
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GRIDnav

        public GRIDnav(int[] gridDirBlock)
                throws McIDASException
        Construct a new GRIDnav from a grid directory block
        Parameters:
        gridDirBlock - grid header block
        Throws:
        McIDASException - illegal grid header
    • Method Detail

      • toLatLon

        public double[][] toLatLon(double[][] rowcol)
        converts from grid coordinates (x,y) or (col, row) to latitude/longitude
        Parameters:
        rowcol - array of row/col pairs. Where rowcol[indexRow][] is a row and rowcol[indexCol][] is a column.
        Returns:
        latlon[][] array of lat/long pairs. Output array is latlon[indexLat][] of latitudes and latlon[indexLon][] of longitudes.
      • toRowCol

        public double[][] toRowCol(double[][] latlon)
        toRowCol converts latitude/longitude to grid row/col
        Parameters:
        latlon - array of lat/long pairs. Where latlon[indexLat][] are latitudes and latlon[indexLon][] are longitudes.
        Returns:
        rowcol[][] array of row/col pairs. Where rowcol[indexRow][] is a row and rowcol[indexCol][] is an column. These are in 'grid' coordinates
      • equals

        public boolean equals(java.lang.Object obj)
        Determines whether or not the Object in question is the same as this AREAnav. Right now, this returns false until we can figure out when two navigations are equal. Subclasses could override if desired.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the AREAnav in question
      • setStart

        public void setStart(int startRow,
                             int startColumn)
        define the starting row and column of another coordinate system -- for example (0,0)
        Parameters:
        startRow - the starting row number in another coordinate system
        startColumn - the starting column number in another coordinate system
      • setFlipRowCoordinates

        public void setFlipRowCoordinates(int row)
        specify whether the row coordinates are inverted and the row offset.
        Parameters:
        row - ending row number
      • isFlippedRowCoordinates

        public boolean isFlippedRowCoordinates()
        Determine if navigation is using flipped coordinates. This would mean that the start of the coordinate system is in the lower left instead of the upper left.
        Returns:
        true if using flipped row coordinates, otherwise false
      • getRowOffset

        public double getRowOffset()
        Get the row offset for flipped coordinates
        Returns:
        row offset
      • getRowIndex

        public int getRowIndex()
        Get the row index
        Returns:
        the row index in the returned arrays
      • getColumnIndex

        public int getColumnIndex()
        Get the column index
        Returns:
        the column index in the returned arrays

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.