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. If you set ignoreVertical to false, this is equivalent to calling TransformationCatalog.getTransformation.

If areaOfInterest is null or Geometry.isEmpty, the returned transformation does not take into account an area of interest, and the best choice for the entire world extent is effectively assumed.

Otherwise, if areaOfInterest does not intersect the area of use of inputSpatialReference, this method returns null.

If the SpatialReference of areaOfInterest differs from inputSpatialReference, then areaOfInterest is reprojected to inputSpatialReference.

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

Parameters

inputSpatialReference

The spatial reference to use as the input.

outputSpatialReference

The spatial reference to use as the output.

areaOfInterest

The bounding box of coordinates to be transformed, or null to consider the entire world extent.

ignoreVertical

True if TransformationCatalog should ignore any vertical coordinate system set on the inputSpatialReference or outputSpatialReference, and only consider horizontal (geographic) transformations; false otherwise.