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:
- 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.new or ArcGISScene.withTilingScheme constructors.
This API supports many spatial reference WKIDs, which are documented in the Coordinate Systems and Transformations Tables available in the downloads area of developers.arcgis.com, under the relevant SDK.
- 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) -
Creates an instance of this class from JSON of the data type used by
jsonDecode.
factory
- SpatialReference.fromJsonString(String jsonString)
-
Creates an instance of this class from a JSON String.
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
- resolution → double
-
The minimum distance that separates unique x,y coordinate values when
stored in an ArcGISFeatureTable.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tolerance → double
-
The minimum distance that determines if two x,y coordinates are considered
to be at the same location for relational and topological GeometryEngine
operations.
no setter
- unit → Unit
-
The unit of measure for the horizontal coordinate system of this spatial
reference.
no setter
- verticalResolution → double
-
The minimum distance that separates unique z-values when stored in an
ArcGISFeatureTable.
no setter
- verticalTolerance → double
-
The minimum distance that determines if two z-values are considered to be
at the same location for GeometryEngine operations that compare
z-values.
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 systems.
no setter
- wkText2 → String
-
The well-known text for the horizontal and vertical coordinate systems as
defined by the OGC standard.
no setter
Methods
-
getConvergenceAngle(
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