Returns a list of GeographicTransformation objects appropriate for transforming between two specified CoordinateSystem objects.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public static IList<GeographicTransformation> GetTransformations(
	CoordinateSystem coordinateSystem1,
	CoordinateSystem coordinateSystem2
)
Visual Basic (Declaration)
Public Shared Function GetTransformations ( _
	coordinateSystem1 As CoordinateSystem, _
	coordinateSystem2 As CoordinateSystem _
) As IList(Of GeographicTransformation)

Parameters

coordinateSystem1
Type: ESRI.ArcGISExplorer.Geometry..::.CoordinateSystem

The first CoordinateSystem involved in a Project(Geometry, CoordinateSystem, GeographicTransformation) operation.
coordinateSystem2
Type: ESRI.ArcGISExplorer.Geometry..::.CoordinateSystem

The second CoordinateSystem involved in a Project(Geometry, CoordinateSystem, GeographicTransformation) operation.

Return Value

A list of GeographicTransformations which can be applied to projection operations.

Remarks

A GeographicTransformation object represents a specific function that applies to transformations between two specific CoordinateSystems. However, for a given pair of CoordinateSystems, there may be more than one applicable GeographicTransformation. This static method can be used to return a list of all of the transformations applicable to a specific pair of coordinate systems.

If more than one transformation is returned in this list, then making the correct choice will result in the most accurate projection of the data. In order to choose the most appropriate transformation from the list, you may need to asses the geographical area for which the transformation is being used, and refer to the list of transformations with descriptions at:

Examples

The code below shows how you can use a GeographicTransformation to increase the accuracy of projecting a Point to a CoordinateSystem with a different datum. The initial Point is specified using a geographical coordinate system, with coordinates in lat, long. A new Point is then created by projecting the original into a projected coordinate system which is based on a different datum. A list of suitable GeographicTransformations is generated and the first suitable transformation is used in the Project operation.
CopyC#
// Create a Point at Greenwich, UK. By default new Geometries have the WGS 1984 geographical coordinate system.
ESRI.ArcGISExplorer.Geometry.Point projectPoint = new ESRI.ArcGISExplorer.Geometry.Point(0, 51.4791);

// Create an instance of the CoordinateSystem we want to project the Point into.
CoordinateSystem projectInto = CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid;

// Retrieve suitable transformations between the two coordinate systems.
System.Collections.Generic.IList<GeographicTransformation> suitableTrans = GeographicTransformation.GetTransformations
    (projectPoint.CoordinateSystem, projectInto);

ESRI.ArcGISExplorer.Geometry.Point outputPoint = null;
if (suitableTrans.Count > 0)
{
    // Could display a list of suitable transformations to the user for selection. 
    // For brevity here, simply pick the first suitable transformation.
    GeographicTransformation geoT = suitableTrans[0];

    // Project the point using the selected transformation. Cast back to a Point - Project does
    // not change the type of Geometry.
    outputPoint = GeometryOperations.Project(projectPoint, projectInto, geoT) as ESRI.ArcGISExplorer.Geometry.Point;
}
else
{
    // If no transformations are returned, the most likely reason is that there is no
    // transformation required between the input and output systems, as they have the 
    // same underlying geographic coordinate system. This is not the case for the systems
    // specified above but may apply to other coordinate system pairs.
    // In this case, perform the projection without a transformation.
    outputPoint = GeometryOperations.Project(projectPoint, projectInto) as ESRI.ArcGISExplorer.Geometry.Point;
}
CopyVB.NET
' Create a Point at Greenwich, UK. By default new Geometries have the WGS 1984 geographical coordinate system.
Dim projectPoint As New ESRI.ArcGISExplorer.Geometry.Point(0, 51.4791)

' Create an instance of the CoordinateSystem we want to project the Point into.
Dim projectInto As CoordinateSystem = CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid

' Retrieve suitable transformations between the two coordinate systems.
Dim suitableTrans As System.Collections.Generic.IList(Of GeographicTransformation) = GeographicTransformation.GetTransformations(projectPoint.CoordinateSystem, projectInto)

Dim outputPoint As ESRI.ArcGISExplorer.Geometry.Point = Nothing
If suitableTrans.Count > 0 Then
    ' Could display a list of suitable transformations to the user for selection. 
    ' For brevity here, simply pick the first suitable transformation.
    Dim geoT As GeographicTransformation = suitableTrans(0)

    ' Project the point using the selected transformation. Cast back to a Point - Project does
    ' not change the type of Geometry.
    outputPoint = GeometryOperations.Project(projectPoint, projectInto, geoT)
Else
    ' If no transformations are returned, the most likely reason is that there is no
    ' transformation required between the input and output systems, as they have the 
    ' same underlying geographic coordinate system. This is not the case for the systems
    ' specified above but may apply to other coordinate system pairs.
    ' In this case, perform the projection without a transformation.
    outputPoint = GeometryOperations.Project(projectPoint, projectInto)
End If

See Also