Package ucar.nc2.dt.grid
Class GridCoordinate2D
- java.lang.Object
-
- ucar.nc2.dt.grid.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
findCoordElement(double wantLat, double wantLon, int[] rectIndex)
boolean
findCoordElementForce(double wantLat, double wantLon, int[] rectIndex)
boolean
findCoordElementNoForce(double wantLat, double wantLon, int[] rectIndex)
Find the best index for the given lat,lon point.
-
-
-
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 pointwantLon
- lon of pointrectIndex
- return (row,col) index, or best guess here. may not be null- Returns:
- false if not in the grid.
-
-