SpatialReference

class SpatialReference : JsonSerializable

A spatial reference object.

Constructors

Link copied to clipboard
fun SpatialReference(wkid: Int)

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.

Link copied to clipboard
fun SpatialReference(wkid: Int, verticalWkid: Int)

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.

Link copied to clipboard
fun SpatialReference(wkText: String)

Creates a spatial reference based on well-known text.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getConvergenceAngle(point: Point): Double

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.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toJson(): String

Convert an object to JSON string.

Properties

Link copied to clipboard
val baseGeographic: SpatialReference?
Link copied to clipboard
val hasVertical: Boolean

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).

Link copied to clipboard
val isGeographic: Boolean

True if spatial reference is a Geographic Coordinate System.

Link copied to clipboard
val isPannable: Boolean

True if coordinate system is horizontally pannable.

Link copied to clipboard
val isProjected: Boolean

True if spatial reference is a Projected Coordinate System.

Link copied to clipboard
val unit: MeasurementUnit
Link copied to clipboard
open override val unknownJson: Map<String, Any>

Unknown data from the source JSON. Unknown JSON is a dictionary of values that was in the source JSON but was unparsed by this API.

Link copied to clipboard
open override val unsupportedJson: Map<String, Any>

Unsupported data from the source JSON. Unsupported JSON is a dictionary of values that are supported by web maps, but not exposed through this API.

Link copied to clipboard
val verticalUnit: LinearUnit?
Link copied to clipboard
val verticalWkid: Int

The well-known ID for the vertical coordinate system (VCS), or 0 if the spatial reference has no VCS or has a custom VCS.

Link copied to clipboard
val wkid: Int

The well-known ID for the horizontal coordinate system, or 0 if the spatial reference has a custom horizontal coordinate system.

Link copied to clipboard
val wkText: String

The well-known text for the horizontal and vertical coordinate system.