All Implemented Interfaces:
Serializable, Formattable, MathTransformProvider, Deprecable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.OperationMethod

public final class NTv2 extends AbstractProvider
The provider for "National Transformation version 2" (EPSG:9615). This transform requires data that are not bundled by default with Apache SIS.
Since:
0.7
Version:
1.3
See Also:
  • Field Details

    • serialVersionUID

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

      static final org.opengis.parameter.ParameterDescriptor<Path> FILE
      The operation parameter descriptor for the "Latitude and longitude difference file" parameter value. The file extension is typically ".gsb". There is no default value.
      Parameter names
      EPSG: Latitude and longitude difference file
      Notes:
      • No default value
    • PARAMETERS

      private static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERS
      The group of all parameters expected by this coordinate operation.
  • Constructor Details

    • NTv2

      public NTv2()
      Creates a new provider.
  • Method Details

    • createMathTransform

      public org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) throws org.opengis.parameter.ParameterNotFoundException, org.opengis.util.FactoryException
      Creates a transform from the specified group of parameter values.
      Parameters:
      factory - the factory to use if this constructor needs to create other math transforms.
      values - the group of parameter values.
      Returns:
      the created math transform.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if a required parameter was not found.
      org.opengis.util.FactoryException - if an error occurred while loading the grid.
    • createMathTransform

      static org.opengis.referencing.operation.MathTransform createMathTransform(Class<? extends AbstractProvider> provider, org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values, int version) throws org.opengis.parameter.ParameterNotFoundException, org.opengis.util.FactoryException
      Creates a transform from the specified group of parameter values.
      Parameters:
      provider - the provider which is creating a transform: NTv2 or NTv1.
      factory - the factory to use if this constructor needs to create other math transforms.
      values - the group of parameter values.
      version - the expected version (1 or 2).
      Returns:
      the created math transform.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if a required parameter was not found.
      org.opengis.util.FactoryException - if an error occurred while loading the grid.
    • getOrLoad

      static DatumShiftGridFile<javax.measure.quantity.Angle,javax.measure.quantity.Angle> getOrLoad(Class<? extends AbstractProvider> provider, Path file, int version) throws org.opengis.util.FactoryException
      Returns the grid of the given name. This method returns the cached instance if it still exists, or load the grid otherwise.
      Parameters:
      provider - the provider which is creating a transform.
      file - name of the datum shift grid file to load.
      version - the expected version (1 or 2).
      Throws:
      org.opengis.util.FactoryException