|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.data.projection.datum.NTV2SubGrid
public class NTV2SubGrid
Models the NTv2 Sub Grid within a Grid Shift File
Field Summary | |
---|---|
(package private) boolean |
bigEndian
|
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 NTV2SubGrid[] |
subGrid
|
private java.lang.String |
subGridName
|
private java.lang.String |
updated
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Make a deep clone of this Sub Grid |
java.lang.String |
getDetails()
|
double |
getMaxLat()
|
double |
getMaxLon()
|
double |
getMinLat()
|
double |
getMinLon()
|
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 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 |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
boolean bigEndian
private NTV2SubGrid[] subGrid
Constructor Detail |
---|
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.lang.Exception
java.io.IOException
Method Detail |
---|
public NTV2SubGrid getSubGridForCoord(double lon, double lat)
lon
- Longitude in Positive West Secondslat
- Latitude in Seconds
private boolean isCoordWithin(double lon, double lat)
lon
- Longitude in Positive West Secondslat
- Latitude in Seconds
private 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 factor
public 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 values
java.io.IOException
public 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
- public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |