Class DefaultPassThroughOperation

All Implemented Interfaces:
Serializable, Formattable, Deprecable, Lenient­Comparable, Printable, Identified­Object, Coordinate­Operation, Pass­Through­Operation, Single­Operation

public class DefaultPassThroughOperation extends AbstractCoordinateOperation implements PassThroughOperation
Specifies that a subset of a coordinate tuple is subject to a specific coordinate operation.
Since:
0.6
See Also:
  • Constructor Details

    • DefaultPassThroughOperation

      public DefaultPassThroughOperation(Map<String,?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, SingleOperation operation, int firstAffectedCoordinate, int numTrailingCoordinates)
      Constructs a pass-through operation from a set of properties. The properties given in argument follow the same rules as for the super-class constructor. The following table is a reminder of main (not all) properties:
      Recognized properties (non exhaustive list)
      Property name Value type Returned by
      "name" Identifier or String AbstractIdentifiedObject.getName()
      "identifiers" Identifier (optionally as array) AbstractIdentifiedObject.getIdentifiers()
      Parameters:
      properties - the properties to be given to the identified object.
      source­CRS - the source CRS.
      target­CRS - the target CRS.
      operation - the operation to apply on the subset of a coordinate tuple.
      first­Affected­Coordinate - index of the first affected coordinate.
      num­Trailing­Coordinates - number of trailing coordinates to pass through.
    • DefaultPassThroughOperation

      protected DefaultPassThroughOperation(PassThroughOperation operation)
      Creates a new coordinate operation with the same values as the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.

      This constructor performs a shallow copy, i.e. the properties are not cloned.

      Parameters:
      operation - the coordinate operation to copy.
      See Also:
  • Method Details

    • castOrCopy

      public static DefaultPassThroughOperation castOrCopy(PassThroughOperation object)
      Returns a SIS coordinate operation implementation with the values of the given arbitrary implementation. If the given object is already an instance of Default­Pass­Through­Operation, then it is returned unchanged. Otherwise a new Default­Pass­Through­Operation instance is created using the copy constructor and returned. Note that this is a shallow copy operation, because the other properties contained in the given object are not recursively copied.
      Parameters:
      object - the object to get as a SIS implementation, or null if none.
      Returns:
      a SIS implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
    • getInterface

      public Class<? extends PassThroughOperation> getInterface()
      Returns the GeoAPI interface implemented by this class. The SIS implementation returns Pass­Through­Operation​.class.

      Note for implementers

      Subclasses usually do not need to override this method since GeoAPI does not define Pass­Through­Operation sub-interface. Overriding possibility is left mostly for implementers who wish to extend GeoAPI with their own set of interfaces.
      Overrides:
      get­Interface in class Abstract­Coordinate­Operation
      Returns:
      Pass­Through­Operation​.class or a user-defined sub-interface.
    • getMethod

      @Deprecated public OperationMethod getMethod()
      Deprecated.
      May be removed in GeoAPI 4.0 since it does not apply to pass-through operations.
      Returns the operation method.
      Specified by:
      get­Method in interface Single­Operation
      Returns:
      null.
    • getParameterValues

      @Deprecated public ParameterValueGroup getParameterValues()
      Deprecated.
      May be removed in GeoAPI 4.0 since it does not apply to pass-through operations.
      Returns the parameter values.
      Specified by:
      get­Parameter­Values in interface Single­Operation
      Returns:
      null.
    • getOperation

      public SingleOperation getOperation()
      Returns the operation to apply on the subset of a coordinate tuple.
      Upcoming API change
      This method is conformant to ISO 19111:2003. But the ISO 19111:2007 revision changed the type from Single­Operation to Coordinate­Operation. This change may be applied in GeoAPI 4.0. This is necessary for supporting usage of Pass­Through­Operation with Concatenated­Operation.
      Specified by:
      get­Operation in interface Pass­Through­Operation
      Returns:
      the operation to apply on the subset of a coordinate tuple.
      See Also:
    • getModifiedCoordinates

      public int[] getModifiedCoordinates()
      Returns the ordered sequence of indices in a source coordinate tuple of the coordinates affected by this pass-through operation.
      Specified by:
      get­Modified­Coordinates in interface Pass­Through­Operation
      Returns:
      zero-based indices of the modified source coordinates.
      See Also:
    • formatTo

      protected String formatTo(Formatter formatter)
      Formats this coordinate operation in a pseudo-Well Known Text (WKT) format. Current format is specific to Apache SIS and may change in any future version if a standard format for pass through operations is defined.
      Overrides:
      format­To in class Abstract­Coordinate­Operation
      Parameters:
      formatter - the formatter to use.
      Returns:
      currently "Pass­Through­Operation" (may change in any future version).
      Since:
      0.7
      See Also: