IGeographicCoordinateSystemEdit Interface

Provides access to members that control the properties for a geographic coordinate system.

Members

Name Description
Method Define Defines the properties for a geographic coordinate system.
Method DefineEx Defines the properties for a geographic coordinate system.

IGeographicCoordinateSystemEdit.Define Method

Defines the properties for a geographic coordinate system.

Public Sub Define ( _
    [ByRef Name As Object], _
    [ByRef Alias As Object], _
    [ByRef Abbreviation As Object], _
    [ByRef Remarks As Object], _
    [ByRef useage As Object], _
    [ByRef Datum As Object], _
    [ByRef PrimeMeridian As Object], _
    [ByRef geographicUnit As Object] _
)
public void Define (
    ref object Name,
    ref object Alias,
    ref object Abbreviation,
    ref object Remarks,
    ref object useage,
    ref object Datum,
    ref object PrimeMeridian,
    ref object geographicUnit
);

Description

Use the Define method of IGeographicCoordinateSystemEdit to set the properties of a geographic coordinate system. A geographic coordinate system is defined (at minimum) by a name, an angular unit of measure, a horizontal datum, and a prime meridian.

private void DefineCoordinateSystem()

    {

        // use activator class with SpatialReferenceEnvironment singleton

        Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");

        System.Object obj = Activator.CreateInstance(factoryType);

        ISpatialReferenceFactory spatialReferenceFactory = obj as ISpatialReferenceFactory;

        IDatum datum = spatialReferenceFactory.CreateDatum((int)esriSRDatumType.esriSRDatum_OSGB1936);

        IPrimeMeridian primeMeridian = spatialReferenceFactory.CreatePrimeMeridian((int)esriSRPrimeMType.esriSRPrimeM_Greenwich);

        IUnit unit = spatialReferenceFactory.CreateUnit((int)esriSRUnitType.esriSRUnit_Degree);

        IGeographicCoordinateSystemEdit geographicCoordinateSystemEdit = new GeographicCoordinateSystemClass();

        object name = "UserDefined Geographic Coordinate System";

        object alias = "UserDefined GCS";

        object abbreviation = "UserDefined";

        object remarks = "User Defined Geographic Coordinate System based on OSGB1936";

        object usage = "Suitable for the UK";

        object datumObject = datum as object;

        object primeMeridianObject = primeMeridian as object;

        object unitObject = unit as object;

        geographicCoordinateSystemEdit.Define(ref name,

                                              ref alias,

                                              ref abbreviation,

                                              ref remarks,

                                              ref usage,

                                              ref datumObject,

                                              ref primeMeridianObject,

                                              ref unitObject);

        IGeographicCoordinateSystem userDefinedGGeographicCoordinateSystem = geographicCoordinateSystemEdit as IGeographicCoordinateSystem;

        System.Windows.Forms.MessageBox.Show(userDefinedGGeographicCoordinateSystem.Name);

    }

IGeographicCoordinateSystemEdit.DefineEx Method

Defines the properties for a geographic coordinate system.

Public Sub DefineEx ( _
    ByVal Name As String, _
    ByVal Alias As String, _
    ByVal Abbreviation As String, _
    ByVal Remarks As String, _
    ByVal useage As String, _
    ByVal Datum As IDatum, _
    ByVal PrimeMeridian As IPrimeMeridian, _
    ByVal geographicUnit As IAngularUnit _
)
public void DefineEx (
    string Name,
    string Alias,
    string Abbreviation,
    string Remarks,
    string useage,
    IDatum Datum,
    IPrimeMeridian PrimeMeridian,
    IAngularUnit geographicUnit
);

Classes that implement IGeographicCoordinateSystemEdit

Classes Description
GeographicCoordinateSystem Creates a geographic coordinate system.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close