Class AbstractProvider

All Implemented Interfaces:
Serializable, Formattable, MathTransformProvider, Deprecable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.OperationMethod
Direct Known Subclasses:
Affine, AxisOrderReversal, Equirectangular, FranceGeocentricInterpolation, GeocentricAffine, GeocentricToGeographic, GeocentricToTopocentric, Geographic2Dto3D, Geographic3Dto2D, GeographicOffsets, GeographicToGeocentric, GeographicToTopocentric, Interpolation1D, MapProjection, NADCON, NorthPoleRotation, NTv1, NTv2, PseudoPlateCarree, SouthPoleRotation, VerticalOffset, Wraparound, ZonedTransverseMercator

public abstract class AbstractProvider extends DefaultOperationMethod implements MathTransformProvider
Base class for all providers defined in this package.
Since:
0.6
Version:
1.3
Author:
Martin Desruisseaux (Geomatys)
See Also:
  • Field Details

    • sourceCSType

      public final Class<? extends org.opengis.referencing.cs.CoordinateSystem> sourceCSType
      The base interface of the coordinate system of source/target coordinates. This is used for resolving some ambiguities at WKT parsing time.
    • targetCSType

      public final Class<? extends org.opengis.referencing.cs.CoordinateSystem> targetCSType
      The base interface of the coordinate system of source/target coordinates. This is used for resolving some ambiguities at WKT parsing time.
    • sourceOnEllipsoid

      public final boolean sourceOnEllipsoid
      Flags whether the source and/or target ellipsoid are concerned by this operation. Those flags are read by DefaultMathTransformFactory for determining if this operation has "semi_major", "semi_minor", "src_semi_major", "src_semi_minor" parameters that may need to be filled with values inferred from the source or target DefaultGeodeticDatum. Meaning of return values:
      • (false,false) if neither the source coordinate system or the destination coordinate system is ellipsoidal. There are no parameters that need to be completed.
      • (true,false) if this operation has "semi_major" and "semi_minor" parameters that need to be set to the axis lengths of the source ellipsoid.
      • (false,true) if this operation has "semi_major" and "semi_minor" parameters that need to be set to the axis lengths of the target ellipsoid.
      • (true,true) if this operation has "src_semi_major", "src_semi_minor", "tgt_semi_major" and "tgt_semi_minor" parameters that need to be set to the axis lengths of the source and target ellipsoids.
      Those flags are only hints. If the information is not provided, DefaultMathTransformFactory will try to infer it from the type of user-specified source and target CRS.
    • targetOnEllipsoid

      public final boolean targetOnEllipsoid
      Flags whether the source and/or target ellipsoid are concerned by this operation. Those flags are read by DefaultMathTransformFactory for determining if this operation has "semi_major", "semi_minor", "src_semi_major", "src_semi_minor" parameters that may need to be filled with values inferred from the source or target DefaultGeodeticDatum. Meaning of return values:
      • (false,false) if neither the source coordinate system or the destination coordinate system is ellipsoidal. There are no parameters that need to be completed.
      • (true,false) if this operation has "semi_major" and "semi_minor" parameters that need to be set to the axis lengths of the source ellipsoid.
      • (false,true) if this operation has "semi_major" and "semi_minor" parameters that need to be set to the axis lengths of the target ellipsoid.
      • (true,true) if this operation has "src_semi_major", "src_semi_minor", "tgt_semi_major" and "tgt_semi_minor" parameters that need to be set to the axis lengths of the source and target ellipsoids.
      Those flags are only hints. If the information is not provided, DefaultMathTransformFactory will try to infer it from the type of user-specified source and target CRS.
  • Constructor Details

    • AbstractProvider

      protected AbstractProvider(Map<String,?> properties, int sourceDimension, int targetDimension, org.opengis.parameter.ParameterDescriptorGroup parameters)
      Constructs a math transform provider from the given properties and a set of parameters.
      Parameters:
      properties - set of properties. Shall contain at least "name".
      sourceDimension - number of dimensions in the source CRS of this operation method.
      targetDimension - number of dimensions in the target CRS of this operation method.
      parameters - the set of parameters (never null).
  • Method Details

    • resolveAmbiguity

      public String resolveAmbiguity(DefaultMathTransformFactory.Context context)
      If an operation method is ambiguous according Apache SIS, returns the name of the method that SIS should use. Otherwise returns null. The ambiguities that need to be resolved are:
      Parameters:
      context - the potentially ambiguous context.
      Returns:
      name of the provider to use, or null if there is nothing to change.
      Since:
      0.8
    • getOperationType

      public final Class<? extends org.opengis.referencing.operation.SingleOperation> getOperationType()
      Returns the interface implemented by the coordinate operation. This method returns the type specified at construction time.
      Overrides:
      getOperationType in class DefaultOperationMethod
      Returns:
      interface implemented by all coordinate operations that use this method.
      See Also:
    • inverse

      public AbstractProvider inverse()
      Returns the operation method which is the inverse of this method.
      • If null, no inverse method is easily available. This is the default.
      • If this, the inverse of this operation method is the same operation method with some parameter values changed (typically with sign inverted).
      • If another method, it should take the same parameter values.

      This is a SIS-specific information which may be changed in any future SIS version. Current implementation provides this information in a "all or nothing" way: either all parameter values can have their sign reversed, or either the operation is considered not revertible at all. This is different than the EPSG dataset in two way:

      • EPSG provides an equivalent information in the PARAM_SIGN_REVERSAL column of the [Coordinate_Operation Parameter Usage] table, but on a parameter-by-parameter basis instead of for the whole operation (which is probably better).
      • EPSG provides another information in the REVERSE_OP column of the [Coordinate_Operation Method] table, but this is not equivalent to this method because it does not differentiate the map projection methods from inverse map projection methods.
      Returns:
      the inverse of this operation method (possibly this), or null if none.
      See Also: