public class NTV2SubGrid extends java.lang.Object implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.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 java.lang.String |
parentSubGridName |
private static long |
serialVersionUID |
private NTV2SubGrid[] |
subGrid |
private java.lang.String |
subGridName |
private java.lang.String |
updated |
Constructor and Description |
---|
NTV2SubGrid(java.io.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 |
---|---|
java.lang.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() |
java.lang.String |
getParentSubGridName() |
int |
getSubGridCount() |
NTV2SubGrid |
getSubGridForCoord(double lon,
double lat)
Tests if a specified coordinate is within this Sub Grid
or one of its Sub Grids.
|
java.lang.String |
getSubGridName() |
private static 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
|
void |
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.
|
private static void |
readBytes(java.io.InputStream in,
byte[] b) |
void |
setSubGridArray(NTV2SubGrid... subGrid)
Set an array of Sub Grids of this sub grid
|
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.lang.String subGridName
private final java.lang.String parentSubGridName
private final java.lang.String created
private final java.lang.String updated
private final double minLat
private final double maxLat
private final double minLon
private final double maxLon
private final double latInterval
private final double lonInterval
private final int nodeCount
private final int lonColumnCount
private final int latRowCount
private final float[] latShift
private final float[] lonShift
private float[] latAccuracy
private float[] lonAccuracy
private NTV2SubGrid[] subGrid
public NTV2SubGrid(java.io.InputStream in, boolean bigEndian, boolean loadAccuracy) throws java.io.IOException
in
- GridShiftFile InputStreambigEndian
- is the file bigEndian?loadAccuracy
- is the node Accuracy data to be loaded?java.io.IOException
- if any I/O error occursprivate static void readBytes(java.io.InputStream in, byte[] b) throws java.io.IOException
java.io.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 static 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 void 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 java.lang.String getParentSubGridName()
public java.lang.String getSubGridName()
public int getNodeCount()
public int getSubGridCount()
public void setSubGridArray(NTV2SubGrid... subGrid)
subGrid
- subgridspublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDetails()
public double getMaxLat()
public double getMaxLon()
public double getMinLat()
public double getMinLon()