-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavigatorGvar.java
79 lines (64 loc) · 1.6 KB
/
NavigatorGvar.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import java.io.DataInputStream;
import java.io.IOException;
import edu.wisc.ssec.mcidas.GVARnav;
import edu.wisc.ssec.mcidas.AncillaryData;
/**
* NavigatorGvar provides the ability to navigate imagery in the
* GVAR projection. This method pretty much wraps GVARnav, which
* is essentially a math copy of the McIDAS source module
* nvxgvar.dlm.
*
* @version 1.6 6 Aug 1999
* @author Tommy Jasmin, SSEC
*/
class NavigatorGvar implements Navigator {
private GVARnav ng = null;
/**
*
* constructor
*
* @param ad AncillaryData object
* @param navBlock navigation parameters array
*
*/
public NavigatorGvar (
AncillaryData ad,
int [] navBlock
)
throws IOException, NavigatorGException
{
// create a GVARnav object - this will do all the work
ng = new GVARnav(1, navBlock);
// set base res multiplier to that specified in AncillaryData object
ng.setRes(ad.getLineRes(), ad.getElemRes());
// same for image starting coordinates and source coordinates
ng.setImageStart(ad.getStartLine(), ad.getStartElem());
ng.setStart(1,1);
}
/**
*
* given a set of lat/lon, return the corresponding line/element
*
* @param latLon an array of latitudes and longitudes
*
*/
public double [][] toLinEle (
double [][] latLon
)
{
return ng.toLinEle(latLon);
}
/**
*
* given a set of lines/elements, return the corresponding lats/lons.
*
* @param linEle an array of lines and elements
*
*/
public double [][] toLatLon (
double [][] linEle
)
{
return ng.toLatLon(linEle);
}
}