public class GRIDnav extends Object implements Serializable
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 and Description |
---|
GRIDnav(int[] gridDirBlock)
Construct a new GRIDnav from a grid directory block
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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
|
public final int indexRow
public final int indexCol
public final int indexLat
public final int indexLon
public GRIDnav(int[] gridDirBlock) throws McIDASException
gridDirBlock
- grid header blockMcIDASException
- illegal grid headerpublic double[][] toLatLon(double[][] rowcol)
rowcol
- array of row/col pairs. Where
rowcol[indexRow][] is a row and
rowcol[indexCol][] is a column.public double[][] toRowCol(double[][] latlon)
latlon
- array of lat/long pairs. Where latlon[indexLat][]
are latitudes and latlon[indexLon][] are longitudes.public boolean equals(Object obj)
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.public void setStart(int startRow, int startColumn)
startRow
- the starting row number in another
coordinate systemstartColumn
- the starting column number in another
coordinate systempublic void setFlipRowCoordinates(int row)
row
- ending row numberpublic boolean isFlippedRowCoordinates()
public double getRowOffset()
public int getRowIndex()
public int getColumnIndex()
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.