Class DatumShiftGridFile.Double<C extends javax.measure.Quantity<C>, T extends javax.measure.Quantity<T>>
java.lang.Object
org.apache.sis.referencing.datum.DatumShiftGrid<C,T>
org.apache.sis.internal.referencing.provider.DatumShiftGridFile<C,T>
org.apache.sis.internal.referencing.provider.DatumShiftGridFile.Double<C,T>
- All Implemented Interfaces:
Serializable
- Enclosing class:
DatumShiftGridFile<C extends javax.measure.Quantity<C>, T extends javax.measure.Quantity<T>>
static final class DatumShiftGridFile.Double<C extends javax.measure.Quantity<C>, T extends javax.measure.Quantity<T>>
extends DatumShiftGridFile<C,T>
An implementation of
DatumShiftGridFile which stores the offset values in double[] arrays.
See DatumShiftGridFile.Float for more information (most comments apply to this class as well).- Since:
- 1.1
- Version:
- 1.1
-
Nested Class Summary
Nested classes/interfaces inherited from class DatumShiftGridFile
DatumShiftGridFile.Double<C,T>, DatumShiftGridFile.Float<C, T> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final double[][]The translation values.private static final longSerial number for inter-operability with different versions.Fields inherited from class DatumShiftGridFile
accuracy, CACHE, scanlineStride, subgridsFields inherited from class DatumShiftGrid
INTERPOLATED_DIMENSIONS -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)Double(int dim, javax.measure.Unit<C> coordinateUnit, javax.measure.Unit<T> translationUnit, boolean isCellValueRatio, double x0, double y0, double Δx, double Δy, int nx, int ny, org.opengis.parameter.ParameterDescriptorGroup descriptor, Path... files) Creates a new datum shift grid with the given grid geometry, filename and number of shift dimensions.privateDouble(DatumShiftGridFile<C, T> grid, double[][] offsets) Creates a new grid of the same geometry than the given grid but using a different data array. -
Method Summary
Modifier and TypeMethodDescriptionfinal doublegetCellValue(int dim, int gridX, int gridY) Returns the cell value at the given dimension and grid index.protected final Object[]getData()Returns direct references (not cloned) to the data arrays.final intReturns the number of shift dimensions.protected final DatumShiftGridFile<C, T> Returns a new grid with the same geometry than this grid but different data arrays.Methods inherited from class DatumShiftGridFile
castTo, createGeodeticTransformation, equals, getCellPrecision, getParameterDescriptors, getParameterValues, hashCode, replaceOutsideGridCoordinates, setSubGrids, toString, useSharedDataMethods inherited from class DatumShiftGrid
derivativeInCell, getCellMean, getCoordinateToGrid, getCoordinateUnit, getDomainOfValidity, getDomainOfValidity, getGridSize, getGridSize, getTranslationUnit, interpolateAt, interpolateInCell, isCellInGrid, isCellValueRatio
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
offsets
final double[][] offsetsThe translation values. SeeDatumShiftGridFile.Float.offsetsfor more documentation.
-
-
Constructor Details
-
Double
Double(int dim, javax.measure.Unit<C> coordinateUnit, javax.measure.Unit<T> translationUnit, boolean isCellValueRatio, double x0, double y0, double Δx, double Δy, int nx, int ny, org.opengis.parameter.ParameterDescriptorGroup descriptor, Path... files) throws org.opengis.referencing.operation.NoninvertibleTransformException Creates a new datum shift grid with the given grid geometry, filename and number of shift dimensions. Alldoublevalues given to this constructor will be converted from degrees to radians.- Throws:
org.opengis.referencing.operation.NoninvertibleTransformException
-
Double
Creates a new grid of the same geometry than the given grid but using a different data array.
-
-
Method Details
-
setData
Returns a new grid with the same geometry than this grid but different data arrays. SeeDatumShiftGridFile.Float.setData(Object[])for more documentation. -
getData
Returns direct references (not cloned) to the data arrays. SeeDatumShiftGridFile.Float.getData()for more documentation. -
getTranslationDimensions
public final int getTranslationDimensions()Returns the number of shift dimensions.- Specified by:
getTranslationDimensionsin classDatumShiftGrid<C extends javax.measure.Quantity<C>, T extends javax.measure.Quantity<T>>- Returns:
- number of dimensions of translation vectors.
-
getCellValue
public final double getCellValue(int dim, int gridX, int gridY) Returns the cell value at the given dimension and grid index. SeeDatumShiftGridFile.Float.getCellValue(int, int, int)for more documentation.- Specified by:
getCellValuein classDatumShiftGrid<C extends javax.measure.Quantity<C>, T extends javax.measure.Quantity<T>>- Parameters:
dim- the dimension of the translation vector component to get, from 0 inclusive toDatumShiftGrid.getTranslationDimensions()exclusive.gridX- the grid index on the x axis, from 0 inclusive togridSize[0]exclusive.gridY- the grid index on the y axis, from 0 inclusive togridSize[1]exclusive.- Returns:
- the translation for the given dimension in the grid cell at the given index.
-