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
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
    • offsets

      final double[][] offsets
      The translation values. See DatumShiftGridFile.Float.offsets for 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. All double values given to this constructor will be converted from degrees to radians.
      Throws:
      org.opengis.referencing.operation.NoninvertibleTransformException
    • Double

      private Double(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 Details

    • setData

      protected final DatumShiftGridFile<C,T> setData(Object[] other)
      Returns a new grid with the same geometry than this grid but different data arrays. See DatumShiftGridFile.Float.setData(Object[]) for more documentation.
      Specified by:
      setData in class DatumShiftGridFile<C extends javax.measure.Quantity<C>,T extends javax.measure.Quantity<T>>
      Parameters:
      other - data from another DatumShiftGridFile that we can share.
      Returns:
      a new DatumShiftGridFile using the given data reference.
    • getData

      protected final Object[] getData()
      Returns direct references (not cloned) to the data arrays. See DatumShiftGridFile.Float.getData() for more documentation.
      Specified by:
      getData in class DatumShiftGridFile<C extends javax.measure.Quantity<C>,T extends javax.measure.Quantity<T>>
      Returns:
      a direct (not cloned) reference to the internal data array.
    • getTranslationDimensions

      public final int getTranslationDimensions()
      Returns the number of shift dimensions.
      Specified by:
      getTranslationDimensions in class DatumShiftGrid<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. See DatumShiftGridFile.Float.getCellValue(int, int, int) for more documentation.
      Specified by:
      getCellValue in class DatumShiftGrid<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 to DatumShiftGrid.getTranslationDimensions() exclusive.
      gridX - the grid index on the x axis, from 0 inclusive to gridSize[0] exclusive.
      gridY - the grid index on the y axis, from 0 inclusive to gridSize[1] exclusive.
      Returns:
      the translation for the given dimension in the grid cell at the given index.