Class GridCoordinate2D


  • public class GridCoordinate2D
    extends Object
    2D Coordinate System has lat(x,y) and lon(x,y). This class implements finding the index (i,j) from (lat, lon) coord. This is for "one-off" computation, not a systematic lookup table for all points in a pixel array. Hueristic search of the 2D space for the cell that contains the point.
    Since:
    Jul 10, 2009
    • Method Detail

      • findCoordElementForce

        public boolean findCoordElementForce​(double wantLat,
                                             double wantLon,
                                             int[] rectIndex)
      • findCoordElement

        public boolean findCoordElement​(double wantLat,
                                        double wantLon,
                                        int[] rectIndex)
      • findCoordElementNoForce

        public boolean findCoordElementNoForce​(double wantLat,
                                               double wantLon,
                                               int[] rectIndex)
        Find the best index for the given lat,lon point.
        Parameters:
        wantLat - lat of point
        wantLon - lon of point
        rectIndex - return (row,col) index, or best guess here. may not be null
        Returns:
        false if not in the grid.