Class CoordinateOperationSorter

java.lang.Object
org.apache.sis.referencing.operation.CoordinateOperationSorter
All Implemented Interfaces:
Comparable<CoordinateOperationSorter>

final class CoordinateOperationSorter extends Object implements Comparable<CoordinateOperationSorter>
Used for sorting coordinate operation in preference order.
Since:
1.0
Version:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    Accuracy of the coordinate operation.
    private final double
    Intersection between the domain of validity of the operation and the area of interest, as a negative value for sorting widest areas first and unknown areas (Double.NaN) last.
    private final org.opengis.referencing.operation.CoordinateOperation
    The coordinate operation to sort with other operations.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    CoordinateOperationSorter(org.opengis.referencing.operation.CoordinateOperation operation, org.opengis.metadata.extent.GeographicBoundingBox areaOfInterest)
    Creates a new sorter for the given coordinate operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns -1 if this element should be sorted before the given element.
    (package private) static void
    sort(List<org.opengis.referencing.operation.CoordinateOperation> operations, org.opengis.metadata.extent.GeographicBoundingBox areaOfInterest)
    Sorts in-place the given list of operations.

    Methods inherited from class java.lang.Object

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

    • operation

      private final org.opengis.referencing.operation.CoordinateOperation operation
      The coordinate operation to sort with other operations.
    • area

      private final double area
      Intersection between the domain of validity of the operation and the area of interest, as a negative value for sorting widest areas first and unknown areas (Double.NaN) last.
    • accuracy

      private final double accuracy
      Accuracy of the coordinate operation.
  • Constructor Details

    • CoordinateOperationSorter

      private CoordinateOperationSorter(org.opengis.referencing.operation.CoordinateOperation operation, org.opengis.metadata.extent.GeographicBoundingBox areaOfInterest)
      Creates a new sorter for the given coordinate operation.
      Parameters:
      operation - the coordinate operation to sort with other operations.
      areaOfInterest - the geographic area of interest, or null if unspecified.
  • Method Details

    • compareTo

      public int compareTo(CoordinateOperationSorter other)
      Returns -1 if this element should be sorted before the given element.
      Specified by:
      compareTo in interface Comparable<CoordinateOperationSorter>
    • sort

      static void sort(List<org.opengis.referencing.operation.CoordinateOperation> operations, org.opengis.metadata.extent.GeographicBoundingBox areaOfInterest)
      Sorts in-place the given list of operations.
      Parameters:
      operations - the operation to sort.
      areaOfInterest - the geographic area of interest, or null if unspecified.