|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cts.op.transformation.grids.GeographicGrid
public class GeographicGrid
A grid with column and rows representing meridians and parallels and cell values representing any parameter as heights (geoid definition), altitudes (digital elevation model), or transformation parameters for transformations based on a model.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.cts.op.transformation.grids.Grid |
|---|
Grid.InterpolationMethod |
| Field Summary | |
|---|---|
protected int |
colNumber
|
protected Object |
context
Context object (may be used to specify the reference Datum). |
protected int |
dim
The number of values stored in the grid (for instance 3 for 3D translation grid). |
protected double |
dx
|
protected double |
dy
|
protected GeographicExtent |
extent
Extent of use of the Geographic grid. |
protected double |
modulo
|
protected int |
rowNumber
|
protected double[][][] |
values
3-dimensions float array. |
protected double |
x0
|
protected double |
xL
|
protected double |
y0
|
protected double |
yL
|
| Fields inherited from interface org.cts.op.transformation.grids.Grid |
|---|
BICUBIC, BILINEAR, NEAREST |
| Constructor Summary | |
|---|---|
protected |
GeographicGrid()
Creates a new GeographicGrid. |
|
GeographicGrid(double westernLongitude,
double northernLatitude,
double easternLongitude,
double southernLatitude,
int colNumber,
int rowNumber,
int dim,
double modulo,
int scale,
Object context)
Create a new Geographic grid. |
| Method Summary | |
|---|---|
double[] |
bilinearInterpolation(double latitude,
double longitude)
Return a double value interpolated in this geographic grid with a bilinear interpolation method. |
int |
getColumnNumber()
Get the number of columns of this grid (also called cn). |
Object |
getContext()
Get the context Object. |
double |
getDX()
Real world interval between two consecutive columns. |
double |
getDY()
Real world interval between two consecutive row. |
double |
getGridHeight()
Get the total grid height as a positive number. |
double |
getGridWidth()
Get the total grid width as a positive number. |
int |
getRowNumber()
Get the number of rows of this grid (also called rn). |
int |
getScale()
Get the scale which determine the number of decimal to read/write or to 'scale' factor to use to obtain an integer parameter. |
double[] |
getValue(double x,
double y,
Grid.InterpolationMethod method)
Get the value corrsponding to the x,y position. |
double[][][] |
getValues()
Return the array of values. |
double[] |
getValues(int r,
int c)
get the value in row r and column c |
double |
getX0()
Get the real world abscisse (x) of the first column. |
double |
getXL()
Get the first ordinate of the last grid column. |
double |
getY0()
Get the real world ordinate (y) of the first row. |
double |
getYL()
Get the second ordinate of the last grid row. |
void |
setScale(int scale)
Set the scale which determine the number of decimal to read/write or the 'scale' factor to use to obtain an integer parameter. |
void |
setValue(int r,
int c,
double[] values)
set the value in row r and column c |
String |
toString()
Return a short string representation of the grid. |
String |
toStringAll()
Return a complete string representation of the grid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int colNumber
protected int rowNumber
protected int dim
protected double x0
protected double y0
protected double xL
protected double yL
protected double dx
protected double dy
protected GeographicExtent extent
protected double modulo
protected double[][][] values
protected Object context
| Constructor Detail |
|---|
protected GeographicGrid()
public GeographicGrid(double westernLongitude,
double northernLatitude,
double easternLongitude,
double southernLatitude,
int colNumber,
int rowNumber,
int dim,
double modulo,
int scale,
Object context)
westernLongitude - northernLatitude - easternLongitude - southernLatitude - colNumber - number of columnrowNumber - number of rowsdim - dimension of the stored value(s)modulo - a tour (360.0 for longitude in degrees, PI*2 for radians
and 400 for grades)context - optional context object| Method Detail |
|---|
public int getColumnNumber()
getColumnNumber in interface Gridpublic int getRowNumber()
getRowNumber in interface Gridpublic double getX0()
getX0 in interface Gridpublic double getY0()
getY0 in interface Gridpublic double getXL()
getXL in interface Gridpublic double getYL()
getYL in interface Gridpublic double getDX()
getDX in interface Gridpublic double getDY()
getDY in interface Gridpublic double getGridWidth()
public double getGridHeight()
public int getScale()
public void setScale(int scale)
public Object getContext()
public double[] getValues(int r,
int c)
r - row indexc - column index
public void setValue(int r,
int c,
double[] values)
r - row indexc - column indexvalue - new value of row r column c
public double[] getValue(double x,
double y,
Grid.InterpolationMethod method)
throws OutOfExtentException,
InterpolationMethodException
getValue in interface GridOutOfExtentException
InterpolationMethodExceptionpublic double[][][] getValues()
public double[] bilinearInterpolation(double latitude,
double longitude)
throws OutOfExtentException
dx
----------
| |
|ddx |dy
| + ddy |
----------
fx = ddx/dx
fy = ddy/dy
latitude - the latitudelongitude - the longitude
OutOfExtentExceptionpublic String toString()
toString in class Objectpublic String toStringAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||