This document is archived and information here might be outdated. Recommended version. |
Creates a predefined projection.
[Visual Basic .NET] Public Function CreateProjection ( _ ByVal projectionType As Integer _ ) As IProjection
[C#] public IProjection CreateProjection ( int projectionType );
[C++]
HRESULT CreateProjection(
long projectionType
);
[C++] Parameters projectionType
projectionType is a parameter of type long
Use an element from the esriSRProjectionType, esriSRProjection2Type, esriSRProjection3Type, or esriSRProjection4Type enumerations as the projectionType to create a particular predefined map projection.
ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
//Create a projections using the available projections. These can be
//found in the esriGeometry esriSRProjectionType, esriSRProjection2Type,
//esriSRProjection3Type, and esriSRProjection4Type enumerations.
IProjection projection = spatialReferenceFactory.CreateProjection((int)esriSRProjectionType.esriSRProjection_LambertConformalConic);
'Set the spatial reference factory to a new spatial reference environment
Dim pSpatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory
pSpatRefFact = New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment
'Create a projections using the available projections. These can be
'found in the esriGeometry esriSRProjectionType, esriSRProjection2Type,
'esriSRProjection3Type, and esriSRProjection4Type enumerations.
Dim pProj As ESRI.ArcGIS.Geometry.IProjection
pProj = pSpatRefFact.CreateProjection(ESRI.ArcGIS.Geometry.esriSRProjectionType.esriSRProjection_LambertConformalConic)
ISpatialReferenceFactory Interface | esriSRProjectionType Constants | esriSRProjection2Type Constants | esriSRProjection3Type Constants | esriSRProjection4Type Constants