Spatial Reference
The spatial reference specifies how geometry coordinates relate to real-world space. Instances of this class represent a specific coordinate system identified by a well-known ID (WKID) number or well-known text (WKT) string. There are two broad classes of coordinate systems:
Geographic coordinate systems use a 3-dimensional spherical surface to define locations on the earth.
Projected coordinate systems use a flat, 2-dimensional surface. See [https://developers.arcgis.com/documentation/spatial-references/] for more information about spatial references.
SpatialReference ensures that you can accurately view, query, and analyze the layers of a GeoModel.
The spatial reference value is available from a map or scene after loading has completed, and is immutable. If you want to set this value for a new map or scene, use the ArcGISMap.ArcGISMap(SpatialReference) or ArcGISScene.ArcGISScene(SceneViewTilingScheme) constructors.
Since
200.1.0
Constructors
Creates a spatial reference based on WKID. The method will create a spatial reference that has only horizontal coordinate system and does not have vertical coordinate system associated with it.
Creates a spatial reference based on WKID for the horizontal coordinate system and vertical coordinate system. The method creates a spatial reference that has both horizontal and vertical coordinate systems. When the vertical WKID is 0, the method is equivalent to calling SpatialReference.SpatialReference(Int), and does not define a vertical coordinate system part.
Creates a spatial reference based on well-known text.
Properties
If the given spatial reference is a projected coordinate system, then this returns the geographic coordinate system of that system. If the spatial reference is a projected coordinate system, then a spatial reference object representing the underlying geographic coordinate system is returned. Every projected coordinate system has an underlying geographic coordinate system. If the spatial reference is a geographic coordinate system, then a reference to itself is returned. If the spatial reference is a local spatial reference, a null is returned with an error.
True if spatial reference has a vertical coordinate system set; false otherwise. A spatial reference can optionally include a definition for a vertical coordinate system (VCS), which can be used to interpret the z-values of a geometry. A VCS defines linear units of measure, the origin of z-values, and whether z-values are "positive up" (representing heights above a surface) or "positive down" (indicating that values are depths below a surface).
True if spatial reference is a Geographic Coordinate System.
True if coordinate system is horizontally pannable.
True if spatial reference is a Projected Coordinate System.
The unit of measure for the horizontal coordinate system of this spatial reference.
The unit of measure for the vertical coordinate system of this spatial reference. Is null if SpatialReference.hasVertical is false.
The well-known ID for the vertical coordinate system (VCS), or 0 if the spatial reference has no VCS or has a custom VCS.
Functions
Calculate the grid convergence for a spatial reference at a given point. The grid convergence is the angle between True North and Grid North at a point on a map. The grid convergence can be used to convert a horizontal direction expressed as an azimuth in a geographic coordinate system (relative to True North) to a direction expressed as a bearing in a projected coordinate system (relative to Grid North), and vice versa.