Class LookUpTable


  • public final class LookUpTable
    extends Object
    An object that provides an approximate means for mapping from longitude-latitude coordinates to i and j index coordinates in a curvilinear grid.
    Author:
    Guy Griffiths, Jon
    • Constructor Detail

      • LookUpTable

        public LookUpTable​(CurvilinearCoords curvCoords,
                           double minResolution)
        Creates an empty look-up table (with all indices set to -1).
        Parameters:
        curvCoords - The CurvilinearCoords which this LUT will approximate
        minResolution - The minimum resolution of the LUT in degrees
    • Method Detail

      • getGridCoordinates

        public int[] getGridCoordinates​(double longitude,
                                        double latitude)
        Returns the nearest coordinates in the original CurvilinearGrid to the given longitude-latitude point, or null if the given longitude-latitude point is not in the domain of this look-up table.
        Parameters:
        longitude - The longitude of the point of interest
        latitude - The latitude of the point of interest
        Returns:
        A newly-created integer array with two values: the first value is the i coordinate in the grid, the second is the j coordinate. Returns null if the given longitude-latitude point is not in the domain of this LUT.
      • getNumLonPoints

        public int getNumLonPoints()
        Gets the number of points in this look-up table along its longitude axis
      • getNumLatPoints

        public int getNumLatPoints()
        Gets the number of points in this look-up table along its latitude axis
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object