getTransformation

fun getTransformation(inputSpatialReference: SpatialReference, outputSpatialReference: SpatialReference, areaOfInterest: Envelope? = null, ignoreVertical: Boolean = false): DatumTransformation?

Returns the best usable transformation used to transform between the input and output spatial references, taking into account the area of interest, if specified. Optionally disregards any vertical transformations. 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 transformation. This method can be used to replicate the former (prior to version 100.9.0) behavior of the TransformationCatalog.getTransformation(SpatialReference, SpatialReference) and TransformationCatalog.getTransformation(SpatialReference, SpatialReference, Envelope) methods:

Return

A DatumTransformation instance that represents the best choice given the parameters. Always returns a usable transformation where DatumTransformation.isMissingProjectionEngineFiles is false. The specific type returned depends on the given value of the ignoreVertical parameter. Returns null if no transformation is required for the given input parameters, or if no usable transformation is available.

Since

200.1.0