Initializes a new instance of the CoordinateSystem class from a definition stored in a .prj file.

Namespace:  ESRI.ArcGISExplorer.Geometry

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

Syntax

C#
public CoordinateSystem(
	string pathAndFileName
)
Visual Basic (Declaration)
Public Sub New ( _
	pathAndFileName As String _
)

Parameters

pathAndFileName
Type: System..::.String

The complete path and filename of the projection file, including the .prj extension.

Return Value

A new CoordinateSystem as defined in the specified file.

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