public class GeographicGrid extends Object implements Grid
Grid.InterpolationMethod| Modifier and Type | Field and Description |
|---|---|
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 array containing transformation parameters (rotation,
translation and scale coefficients) for each node of the grid.
|
protected double |
x0 |
protected double |
xL |
protected double |
y0 |
protected double |
yL |
| Modifier | Constructor and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
bilinearInterpolation(double latitude,
double longitude)
Return a double value interpolated in this geographic grid with a
bilinear interpolation method.
|
boolean |
equals(Object o) |
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.
|
int |
hashCode() |
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.
|
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
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)scale - context - optional context objectpublic int getColumnNumber()
getColumnNumber in interface Gridpublic int getRowNumber()
getRowNumber in interface Gridpublic double getX0()
public double getY0()
public double getXL()
public double getYL()
public double getDX()
public double getDY()
public double getGridWidth()
public double getGridHeight()
public int getScale()
public void setScale(int scale)
scale - public Object getContext()
public double[] getValues(int r,
int c)
r - row indexc - column indexpublic void setValue(int r,
int c,
double[] values)
r - row indexc - column indexvalues - new value for row r column cpublic double[] getValue(double x,
double y,
Grid.InterpolationMethod method)
throws OutOfExtentException,
InterpolationMethodException
getValue in interface GridOutOfExtentExceptionInterpolationMethodExceptionpublic 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 longitudeOutOfExtentExceptionpublic String toString()
public String toStringAll()
Copyright © 2019 CNRS. All rights reserved.