ArcGIS Explorer Component Help |
CoordinateSystem..::.ProjectedCoordinateSystems Class |
CoordinateSystem Class Example See Also |
The ProjectedCoordinateSystems class contains nested classes which help you create specific types of coordinate system.
Namespace:
ESRI.ArcGISExplorer.GeometryAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public static class ProjectedCoordinateSystems |
Visual Basic (Declaration) |
---|
Public NotInheritable Class ProjectedCoordinateSystems |
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)