Initializes a new instance of the GeographicTransformation class based on the specified unique identifier, sometimes referred to as the factory code or Well Known ID (WKID).

Namespace:  ESRI.ArcGISExplorer.Geometry

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

Syntax

C#
public GeographicTransformation(
	int id
)
Visual Basic (Declaration)
Public Sub New ( _
	id As Integer _
)

Parameters

id
Type: System..::.Int32

The identifier of the new GeographicTransformation.

Remarks

Use this constructor if you know a specific identifier for the geographic transformation you wish to create. If you do not know the transformation you wish to create however, you may instead wish to investigate the static GetTransformations(CoordinateSystem, CoordinateSystem) method, which returns a list of GeographicTransformations to choose from.

You may see this number referred to in some ArcGIS documentation as a factory code, projection engine code, or a Well Known Identifier (WKID). For example, ArcGIS Server web service APIs define WKID parameters which allow you to specify a particular unit; developing for ArcGIS using ArcObjects, these numbers are defined in enumeration sets that begin with 'esriSR', for example the enumerations esriSRUnitType and esriSRUnit2Type define identifiers for types of unit of measurement.

These identifier numbers are based on an industry standard defined by the European Petroleum Survey Group (EPSG), and very occasionally, the code value for which an enumeration stands may change; for this reason it is recommended that you use the enumeration member rather than the numeric value in code. Any changes will be noted in the change reports for this API. You can find out more information about the units and coordinate systems defined by the EPSG at their website, http://www.epsg.org.

Examples

The code below shows how you can create a GeographicTransformation directly if you know the unique identifier. After reporting a few properties, the transformation is then added to the collection held by the Map object, so that it can be used in on-the-fly projections.
CopyC#
// Create a GeographicTransformation with a known identifier - the code below will
// create the transformation 1139, suitable for locations in Finland and Norway.
GeographicTransformation ed1950ToWGS84 = new GeographicTransformation(1139);

System.Diagnostics.Debug.WriteLine("The GeographicTransformation:");
System.Diagnostics.Debug.WriteLine(ed1950ToWGS84.Name);
System.Diagnostics.Debug.WriteLine("Converts between the coordinate systems:");
System.Diagnostics.Debug.WriteLine(ed1950ToWGS84.CoordinateSystem1.Name);
System.Diagnostics.Debug.WriteLine("and");
System.Diagnostics.Debug.WriteLine(ed1950ToWGS84.CoordinateSystem2.Name);

// Add the transformation to the Map for use in on-the-fly transformations.
// The variable 'currentMap' should point to the current MapDisplay object. 
// We add this transformation to the 2D transformations collection.
currentDisplay.GeographicTransformations2D.Add(ed1950ToWGS84);
CopyVB.NET
' Create a GeographicTransformation with a known identifier - the code below will
' create the transformation 1139, suitable for locations in Finland and Norway.
Dim ed1950ToWGS84 As New GeographicTransformation(1139)

System.Diagnostics.Debug.WriteLine("The GeographicTransformation:")
System.Diagnostics.Debug.WriteLine(ed1950ToWGS84.Name)
System.Diagnostics.Debug.WriteLine("Converts between the coordinate systems:")
System.Diagnostics.Debug.WriteLine(ed1950ToWGS84.CoordinateSystem1.Name)
System.Diagnostics.Debug.WriteLine("and")
System.Diagnostics.Debug.WriteLine(ed1950ToWGS84.CoordinateSystem2.Name)

' Add the transformation to the Map for use in on-the-fly transformations.
' The variable 'currentMap' should point to the current MapDisplay object. 
' We add this transformation to the 2D transformations collection.
currentDisplay.GeographicTransformations2D.Add(ed1950ToWGS84)

See Also