Class SubTypes

java.lang.Object
org.apache.sis.referencing.operation.SubTypes

final class SubTypes extends Object
Implementation of AbstractCoordinateOperation methods that require knowledge about subclasses. Those methods are defined in a separated static class for avoiding class loading of all implementations before necessary.

This class currently provides implementation for the following methods:

Since:
0.6
Version:
0.7
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static AbstractCoordinateOperation
    castOrCopy(org.opengis.referencing.operation.CoordinateOperation object)
    Returns a SIS implementation for the given coordinate operation.
    (package private) static <T extends org.opengis.referencing.operation.Conversion>
    T
    create(Class<T> baseType, org.opengis.referencing.operation.Conversion definition, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransformFactory factory)
    Returns a conversion from the specified defining conversion.
    (package private) static DefaultConversion
    forConversion(org.opengis.referencing.operation.Conversion object)
    Returns a SIS implementation for the given conversion.
    (package private) static boolean
    isSingleOperation(org.opengis.referencing.operation.CoordinateOperation operation)
    Returns true if the given operation is a single operation but not a pass-through operation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SubTypes

      private SubTypes()
      Do not allow instantiation of this class.
  • Method Details

    • isSingleOperation

      static boolean isSingleOperation(org.opengis.referencing.operation.CoordinateOperation operation)
      Returns true if the given operation is a single operation but not a pass-through operation. In an older ISO 19111 model, PassThroughOperation extended SingleOperation, which was a problem for providing a value to the inherited SingleOperation.getMethod() method. This has been fixed in newer ISO 19111 model, but for safety with objects following the older model (e.g. GeoAPI 3.0) we are better to perform an explicit exclusion of PassThroughOperation.
    • castOrCopy

      static AbstractCoordinateOperation castOrCopy(org.opengis.referencing.operation.CoordinateOperation object)
      Returns a SIS implementation for the given coordinate operation.
      See Also:
    • forConversion

      static DefaultConversion forConversion(org.opengis.referencing.operation.Conversion object)
      Returns a SIS implementation for the given conversion.
      See Also:
    • create

      static <T extends org.opengis.referencing.operation.Conversion> T create(Class<T> baseType, org.opengis.referencing.operation.Conversion definition, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException
      Returns a conversion from the specified defining conversion. The new conversion will be a more specific type like a planar, cylindrical or conic projection. The returned conversion will implement at least the baseType interface, but may implement a more specific GeoAPI interface if this method has been able to infer the type from the conversion argument.
      Parameters:
      baseType - the base GeoAPI interface to be implemented by the conversion to return.
      definition - the defining conversion.
      sourceCRS - the source CRS.
      targetCRS - the target CRS.
      factory - the factory to use for creating a transform from the parameters or for performing axis changes.
      Returns:
      the conversion of the given type between the given CRS.
      Throws:
      ClassCastException - if a contradiction is found between the given baseType, the defining conversion type and the method operation type.
      org.opengis.util.FactoryException