SpatialReference class final

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:

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.new or Scene.Scene(SceneViewTilingScheme) constructors.

Implemented types
Mixed in types

Constructors

SpatialReference({required int wkid, int verticalWkid = 0})
Creates a spatial reference based on WKID for the horizontal coordinate system and vertical coordinate system.
factory
SpatialReference.fromJson(Map<String, dynamic> json)
factory
SpatialReference.fromJsonString(String jsonString)
factory
SpatialReference.fromWkText(String wkText)
Creates a spatial reference based on well-known text.
factory

Properties

baseGeographic SpatialReference?
If the given spatial reference is a projected coordinate system, then this returns the geographic coordinate system of that system.
no setter
hashCode int
The hash code for this object.
no setteroverride
hasVertical bool
True if spatial reference has a vertical coordinate system set; false otherwise.
no setter
isGeographic bool
True if spatial reference is a Geographic Coordinate System.
no setter
isPannable bool
True if coordinate system is horizontally pannable.
no setter
isProjected bool
True if spatial reference is a Projected Coordinate System.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unit Unit
The unit of measure for the horizontal coordinate system of this spatial reference.
no setter
verticalUnit LinearUnit?
The unit of measure for the vertical coordinate system of this spatial reference.
no setter
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.
no setter
wkid int
The well-known ID for the horizontal coordinate system, or 0 if the spatial reference has a custom horizontal coordinate system.
no setter
wkText String
The well-known text for the horizontal and vertical coordinate system.
no setter

Methods

getConvergenceAngle({required ArcGISPoint point}) double
Calculate the grid convergence for a spatial reference at a given point.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
toJsonString() String
Returns a JSON representation of this Object as a String.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

webMercator SpatialReference
The Web Mercator spatial reference.
final
wgs84 SpatialReference
The WGS84 spatial reference.
final