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 or ArcGISScene.ArcGISScene 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, 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 minimum distance that separates unique x,y coordinate values when stored in an ArcGISFeatureTable. The resolution represents the detail in which a feature class records the location and shape of features, defining the number of decimal places stored. It is the minimum distance that separates x,y coordinate values in the Geometry of an ArcGISFeature. Any coordinates that differ by less than the resolution will be stored as the same coordinate value. The units of SpatialReference.resolution are the units of the horizontal coordinate system (SpatialReference.unit) defined when this spatial reference was created.
The minimum distance that determines if two x,y coordinates are considered to be at the same location for relational and topological GeometryEngine operations. This value is used in relational and topological GeometryEngine operations when determining whether two points are close enough, in the horizontal plane, to be considered as the same coordinate value when calculating the result. The units of SpatialReference.tolerance are the units of the horizontal coordinate system (SpatialReference.unit) defined when this spatial reference was created.
The unit of measure for the horizontal coordinate system of this spatial reference. Also the unit of measure for SpatialReference.tolerance and SpatialReference.resolution.
The minimum distance that separates unique z-values when stored in an ArcGISFeatureTable. The vertical resolution represents the detail in which a feature class records the location and shape of features, defining the number of decimal places or significant digits stored. It is the minimum distance that separates z-values in the Geometry of an ArcGISFeature. Any z-values that differ by less than the vertical resolution will be stored as the same z-value. The units of SpatialReference.verticalResolution are the units of the vertical coordinate system (SpatialReference.verticalUnit) defined when this spatial reference was created, if one was set.
The minimum distance that determines if two z-values are considered to be at the same location for GeometryEngine operations that compare z-values. This value is used in relational and topological GeometryEngine operations when determining whether two z-values are close enough to be considered as the same value when calculating the result. The units of SpatialReference.verticalTolerance are the units of the vertical coordinate system (SpatialReference.verticalUnit) defined when this spatial reference was created, if one was set.
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.