getTransformationsBySuitability

fun getTransformationsBySuitability(inputSpatialReference: SpatialReference, outputSpatialReference: SpatialReference, areaOfInterest: Envelope? = null, ignoreVertical: Boolean = false): List<DatumTransformation>

Returns a collection of transformations suitable for projecting between the input and output spatial references, taking into account the area of interest, if specified. Optionally checks for suitable vertical transformations. The collection is ordered in descending order by suitability, with the most suitable being first in the list. The given area of interest can affect the number and order of transformations returned.

A geographic transformation is not needed when input and output spatial references have the same underlying geographic coordinate system, in which case an empty list is returned. A vertical transformation is not needed if both datums (for ellipsoidal heights) or vertical datums (for gravity-related heights) are the same. If neither type of transformation is needed, an empty collection is returned.

Use this method to determine whether or not any vertical coordinate systems set on the spatial reference parameters should be accounted for in the returned list of transformations. This method can be used to replicate the former (prior to version 100.9.0) behavior of the TransformationCatalog.getTransformationsBySuitability(SpatialReference, SpatialReference) and TransformationCatalog.getTransformationsBySuitability(SpatialReference, SpatialReference, Envelope) methods:

Some transformations require a supporting Projection Engine (PE) dataset to function correctly. If this API cannot locate these datasets, the transformation is not usable, and DatumTransformation.isMissingProjectionEngineFiles is true. The list may include transformations like this. To use such transformations, ensure TransformationCatalog.projectionEngineDirectory is set correctly, and that the required dataset is available within that location. Use GeographicTransformationStep.projectionEngineFilenames and HorizontalVerticalTransformationStep.projectionEngineFilenames to determine the dataset required for a specific transformation instance.

Return

A collection of DatumTransformation objects suitable for the given parameters, ordered by suitability, or an empty collection if no transformation is required.

Since

200.1.0