Initializes a new instance of the CoordinateSystem 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 CoordinateSystem(
	int id
)
Visual Basic (Declaration)
Public Sub New ( _
	id As Integer _
)

Parameters

id
Type: System..::.Int32

The coordinate system identifier of the new CoordinateSystem.

Return Value

A new instance of CoordinateSystem representing the predefined system specified in id.

Remarks

If you know a specific identifier for the coordinate system you wish to create, then you can use this constructor.

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 demonstrates alternative ways to initialize a CoordinateSystem variable, using the overloaded constructors and the nested type initializers on the CoordinateSystem class.
CopyC#
// If you know the coordinate system you require, you can hard-code this by using a nested type 
// initializer on the CoordinateSystem class; note these members are statics, and therefore should
// not use the 'new' keyword.
//esriSRProjCS_World_EckertIV 54012 Eckert IV. 
CoordinateSystem cs1 = CoordinateSystem.ProjectedCoordinateSystems.World.EckertIVWorld;

// If you know the identifier, you can create the same coordinate system by using the overloaded 
// constructor passing in the Id.
CoordinateSystem cs2 = new CoordinateSystem(54012);

// Alternatively, if you have a .prj file which defines a coordinate system, you can pass in the 
// filename to create the coordinate system.
string prjFilePath = @"C:\Some Data Path\EckertVI.prj";
CoordinateSystem cs3 = new CoordinateSystem(prjFilePath);
CopyVB.NET
' If you know the coordinate system you require, you can hard-code this by using a nested type 
' initializer on the CoordinateSystem class; note these members are statics, and therefore should
' not use the 'new' keyword.
Dim cs1 As CoordinateSystem = CoordinateSystem.ProjectedCoordinateSystems.World.EckertIVWorld

' If you know the identifier, you can create the same coordinate system by using the overloaded 
' constructor passing in the Id.
Dim cs2 As CoordinateSystem = New CoordinateSystem(54012)

' Alternatively, if you have a .prj file which defines a coordinate system, you can pass in the 
' filename to create the coordinate system.
Dim prjFilePath As String = "C:\Some Data Path\EckertVI.prj"
Dim cs3 As CoordinateSystem = New CoordinateSystem(prjFilePath)

See Also