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
FieldsModifier and TypeFieldDescriptionprivate 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
ConstructorsModifierConstructorDescriptionprivate
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 TypeMethodDescriptionint
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.
-
Field Details
-
operation
private final org.opengis.referencing.operation.CoordinateOperation operationThe coordinate operation to sort with other operations. -
area
private final double areaIntersection 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 accuracyAccuracy 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, ornull
if unspecified.
-
-
Method Details
-
compareTo
Returns -1 if this element should be sorted before the given element.- Specified by:
compareTo
in interfaceComparable<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, ornull
if unspecified.
-