Class CurvilinearCoords


  • public final class CurvilinearCoords
    extends Object
    A horizontal (2D) grid that is defined by explicitly specifying the longitude and latitude coordinates of its cells. We assume the WGS84 lat-lon coordinate system.
    Author:
    Guy Griffiths, Jon Blower
    • Method Detail

      • getMidpoint

        public HorizontalPosition getMidpoint​(int i,
                                              int j)
        Gets the location of the midpoint of the cell at indices i, j. The longitude coordinate of the midpoint will be in the range [-180,180].
        Throws:
        ArrayIndexOutOfBoundsException - if i and j combine to give a point outside the grid.
      • getNi

        public int getNi()
        Returns:
        the number of points in the i direction in this grid
      • getNj

        public int getNj()
        Returns:
        the number of points in the j direction in this grid
      • size

        public int size()
        Returns the number of cells in this grid
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getCells

        public List<CurvilinearCoords.Cell> getCells()
        Returns an unmodifiable list of the cells in this grid, with the i direction varying fastest.
      • getMeanCellArea

        public double getMeanCellArea()
        Gets the mean area of the cells in this grid, in square degrees.
      • main

        public static void main​(String[] args)