Class SpatialReference
Instances of this class specifies how geometry coordinates relate to real-world space.
Inheritance
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class SpatialReference
Remarks
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 spatial references) for more information.
Spatial reference ensures that you can accurately view, query, and analyze the layers of a geo model.
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 map's spatial reference or the scene's SceneViewTiling scheme constructors.
Properties
Name | Description |
---|---|
BaseGeographic | Gets the base geographic coordinate system if this is a projected coordinate system. |
HasVertical | Gets a value indicating whether spatial reference has a vertical coordinate system set. |
IsGeographic | Gets a value indicating whether this is a geographic coordinate system. |
IsPannable | Gets a value indicating whether the coordinate system is horizontally pannable. |
IsProjected | Gets a value indicating whether the spatial reference is a Projected Coordinate System. |
Unit | Gets the unit of measure for this spatial reference system. |
VerticalUnit | Gets the unit of measure for the vertical coordinate system of this spatial reference. |
VerticalWkid | Gets the well-known ID for the vertical coordinate system (VCS), or 0 if the spatial reference has no VCS or has a custom VCS. |
Wkid | Gets the well-known ID for the horizontal coordinate system, or 0 if the spatial reference has a custom horizontal coordinate system. |
WkText | Gets the well-known text for the horizontal and vertical coordinate system. |
Methods
Name | Description |
---|---|
Create(Int32) | Returns an instance of the SpatialReference class based on the given well-known ID. |
Create(Int32, Int32) | Returns an instance of the SpatialReference class based on well-known IDs for the horizontal and vertical coordinate systems. |
Create(String) | Returns an instance of the SpatialReference class based on well-known text (WKT). |
FromJson(String) | Creates an instance of a spatial reference from a JSON string. |
GetConvergenceAngle(MapPoint) | Calculates the grid convergence for a spatial reference at a given point. |
IsEqual(SpatialReference) | Returns true of the Spatial references are the same, this includes where older Wkid refer to the same underlying spatial reference as a newer id. |
IsValidVerticalWkid(Int32) | Returns a value indicating whether the specified well-known ID can be used to create a vertical coordinate system. |
IsValidWkid(Int32) | Returns a value indicating whether the specified well-known ID can be used to create a horizontal coordinate system. |
IsValidWkt(String) | Returns a value indicating whether the specified string is a valid well-known text. |
ToJson() | Creates an ArcGIS JSON representation of the spatial reference. |
ToString() | Returns a System.String that represents the current System.Object. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |