public class NTV2SubGrid extends java.lang.Object implements java.lang.Cloneable, 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.Object |
clone()
Make a deep clone of this Sub Grid
|
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() |
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.
|
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 java.lang.String subGridName
private java.lang.String parentSubGridName
private java.lang.String created
private java.lang.String updated
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
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 NTV2SubGrid getSubGrid(int index)
public void setSubGridArray(NTV2SubGrid[] subGrid)
subGrid
- subgridspublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDetails()
public java.lang.Object clone()
clone
in class java.lang.Object
public double getMaxLat()
public double getMaxLon()
public double getMinLat()
public double getMinLon()