ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / Datum Class / SpheroidWkid Property
Example

In This Topic
    SpheroidWkid Property
    In This Topic
    Gets the well-known ID of the spheroid of this horizontal datum.
    Syntax
    public int SpheroidWkid {get;}
    Public ReadOnly Property SpheroidWkid As Integer
    Example
    SpatialReference Datum and datum properties
    // Get datum of a spatial reference
    SpatialReference srWgs84 = SpatialReferences.WGS84;
    Datum datum = srWgs84.Datum;
    // datum.Name = "D_WGS_1984"
    // datum.Wkid = 6326
    // datum.SpheroidName = "WGS_1984"
    // datum.SpheroidWkid = 7030
    // datum.SpheroidFlattening = 0.0033528106647474805
    // datum.SpheroidSemiMajorAxis = 6378137.0
    // datum.SpheroidSemiMinorAxis = 6356752.3142451793
    
    // Custom WKT
    string wyomingWkt = "PROJCS[\"Wyoming_State_Pl_NAD_1927\",GEOGCS[\"GCS_North_American_1927\",DATUM[\"D_North_American_1927_Perry\",SPHEROID[\"Clarke_1866_Chase\",6378210.0,250.0]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"false_easting\",500000.0],PARAMETER[\"false_northing\",0.0],PARAMETER[\"central_meridian\",-107.3333333],PARAMETER[\"scale_factor\",0.9999412],PARAMETER[\"latitude_of_origin\",40.66666667],UNIT[\"Foot_US\",0.3048006096012192]]";
    SpatialReference srFromWkt = SpatialReferenceBuilder.CreateSpatialReference(wyomingWkt);
    datum = srWgs84.Datum;
    // datum.Name = "D_North_American_1927_Perry"
    // datum.Wkid = 0
    // datum.SpheroidName = "Clarke_1866_Chase"
    // datum.SpheroidWkid = 0
    // datum.SpheroidFlattening = 0.004
    // datum.SpheroidSemiMajorAxis = 6378210.0
    // datum.SpheroidSemiMinorAxis = 6352697.16
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also