public class NTV2SubGrid extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
bigEndian |
private String |
created |
private float[] |
latAccuracy |
private double |
latInterval |
private int |
latRowCount |
private float[] |
latShift |
private float[] |
lonAccuracy |
private int |
lonColumnCount |
private double |
lonInterval |
private float[] |
lonShift |
private double |
maxLat |
private double |
maxLon |
private double |
minLat |
private double |
minLon |
private int |
nodeCount |
private String |
parentSubGridName |
private NTV2SubGrid[] |
subGrid |
private String |
subGridName |
private String |
updated |
Constructor and Description |
---|
NTV2SubGrid(InputStream in,
boolean bigEndian,
boolean loadAccuracy)
Construct a Sub Grid from an InputStream, loading the node data into
arrays in this object.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Make a deep clone of this Sub Grid
|
String |
getDetails()
Returns textual details about the sub grid.
|
double |
getMaxLat()
Get maximum latitude value
|
double |
getMaxLon()
Get maximum longitude value
|
double |
getMinLat()
Get minimum latitude value
|
double |
getMinLon()
Get minimum longitude value
|
int |
getNodeCount() |
String |
getParentSubGridName() |
NTV2SubGrid |
getSubGrid(int index) |
int |
getSubGridCount() |
NTV2SubGrid |
getSubGridForCoord(double lon,
double lat)
Tests if a specified coordinate is within this Sub Grid
or one of its Sub Grids.
|
String |
getSubGridName() |
private double |
interpolate(float a,
float b,
float c,
float d,
double X,
double Y)
Bi-Linear interpolation of four nearest node values as described in
'GDAit Software Architecture Manual' produced by the Geomatics
Department of the University of Melbourne
|
NTV2GridShift |
interpolateGridShift(NTV2GridShift gs)
Interpolate shift and accuracy values for a coordinate in the 'from' datum
of the GridShiftFile.
|
private boolean |
isCoordWithin(double lon,
double lat)
Tests if a specified coordinate is within this Sub Grid.
|
void |
setSubGridArray(NTV2SubGrid[] subGrid)
Set an array of Sub Grids of this sub grid
|
String |
toString() |
private String subGridName
private String parentSubGridName
private double minLat
private double maxLat
private double minLon
private double maxLon
private double latInterval
private double lonInterval
private int nodeCount
private int lonColumnCount
private int latRowCount
private float[] latShift
private float[] lonShift
private float[] latAccuracy
private float[] lonAccuracy
boolean bigEndian
private NTV2SubGrid[] subGrid
public NTV2SubGrid(InputStream in, boolean bigEndian, boolean loadAccuracy) throws IOException
in
- GridShiftFile InputStreambigEndian
- is the file bigEndian?loadAccuracy
- is the node Accuracy data to be loaded?IOException
public NTV2SubGrid getSubGridForCoord(double lon, double lat)
lon
- Longitude in Positive West Secondslat
- Latitude in Secondsprivate boolean isCoordWithin(double lon, double lat)
lon
- Longitude in Positive West Secondslat
- Latitude in Secondsprivate final double interpolate(float a, float b, float c, float d, double X, double Y)
a
- value at the A nodeb
- value at the B nodec
- value at the C noded
- value at the D nodeX
- Longitude factorY
- Latitude factorpublic NTV2GridShift interpolateGridShift(NTV2GridShift gs)
This method is thread safe for both memory based and file based node data.
gs
- GridShift object containing the coordinate to shift and the shift valuespublic String getParentSubGridName()
public String getSubGridName()
public int getNodeCount()
public int getSubGridCount()
public NTV2SubGrid getSubGrid(int index)
public void setSubGridArray(NTV2SubGrid[] subGrid)
subGrid
- public String getDetails()
public double getMaxLat()
public double getMaxLon()
public double getMinLat()
public double getMinLon()