|ArcGIS Explorer Component Help|
|CoordinateSystem Constructor (Int32)|
|CoordinateSystem Class Example See Also|
Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 220.127.116.110 (18.104.22.1680)
- Type: System..::.Int32
The coordinate system identifier of the new CoordinateSystem.
Return ValueA new instance of CoordinateSystem representing the predefined system specified in id.
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.
// 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);
' 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)