A spatial reference that defines how coordinates correspond to locations in the real world. More...
Member Function Documentation SpatialReference::SpatialReference()Default constructor. Constructs an empty SpatialReference object.
The WKID and vertical WKID are set to -1 and the WKT is set to an empty string.
[explicit]
SpatialReference::SpatialReference(const QString &wkText)
Constructor using a wkText (well-known text string) that represents the spatial reference.
The wkid property is also initialized based on the provided wkText. You can use a wkText extracted from another SpatialReference. If the wkText parameter is a null or empty string, this method creates an empty SpatialReference.
[explicit]
SpatialReference::SpatialReference(int wkid)
Constructor using a wkid (well-known ID) that represents the spatial reference.
Tolerance is set to 0.0.
SpatialReference::SpatialReference(int wkid, int verticalWkid)Constructor using a wkid (well-known ID) that represents the spatial reference and a verticalWkid (vertical coordinate system well-known ID).
SpatialReference::SpatialReference(const Esri::ArcGISRuntime::SpatialReference &other)Copy constructor from other SpatialReference.
[noexcept]
SpatialReference::SpatialReference(Esri::ArcGISRuntime::SpatialReference &&other)
Move constructor from other SpatialReference.
[override virtual noexcept]
SpatialReference::~SpatialReference()
Destructor.
Esri::ArcGISRuntime::SpatialReference SpatialReference::baseGeographic() constReturns the base geographic coordinate system if this is a projected coordinate system.
[since Esri::ArcGISRuntime 100.3]
double SpatialReference::convergenceAngle(const Esri::ArcGISRuntime::Point &point) const
Returns the grid convergence in degrees 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.
Sign convention
The grid convergence returned by this method is positive when Grid North lies east of True-North. The following formula demonstrates how to obtain a bearing (b) from an azimuth (a) using the grid convergence (c) returned by this method:
b = a - c
This sign convention is sometimes named the Gauss-Bomford convention.
Other notes
NaN
if the point is outside the projection's horizon or on error.This function was introduced in Esri::ArcGISRuntime 100.3.
[static]
Esri::ArcGISRuntime::SpatialReference SpatialReference::fromJson(const QString &json)
Creates a new SpatialReference from an ArcGIS JSON representation.
[since Esri::ArcGISRuntime 100.9]
bool SpatialReference::hasVertical() const
Returns 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).
A SpatialReference may have a VCS set, for example by calling the SpatialReference::SpatialReference(int, int) constructor. SpatialReference::verticalWkid, SpatialReference::wkText, and SpatialReference::verticalUnit provide more information about the specific VCS set on this instance.
VCSs are used when projecting geometries using a HorizontalVerticalTransformation.
This function was introduced in Esri::ArcGISRuntime 100.9.
See also SpatialReference::verticalWkid and SpatialReference::verticalUnit.
bool SpatialReference::isEmpty() constReturns true
if this SpatialReference is empty.
Returns true
if this is a geographic coordinate system.
Returns true
if this SpatialReference supports wrap around.
Returns true
if this SpatialReference is a projected coordinate system.
[since Esri::ArcGISRuntime 200.8]
double SpatialReference::resolution() const
Returns 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 resolution are the units of the horizontal coordinate system (unit) defined when this spatial reference was created.
A separate resolution, verticalResolution, is defined for the distance between z-values.
Spatial references have default precision properties, and Esri strongly recommends using the default values in most cases. However some high-accuracy workflows customize the default values to preserve their data with higher precision. To store coordinates using a non-default resolution, create a new dataset that uses a custom resolution spatial reference - for example by setting TableDescription::spatialReference when creating a new geodatabase table. See SpatialReferenceBuilder for more information about creating spatial references with custom precision values.
This function was introduced in Esri::ArcGISRuntime 200.8.
See also SpatialReferenceBuilder and The properties of a spatial reference.
[override virtual]
QString SpatialReference::toJson() const
Reimplements: JsonSerializable::toJson() const.
Returns the SpatialReference as an ArcGIS json SpatialReference representation.
[since Esri::ArcGISRuntime 200.8]
double SpatialReference::tolerance() const
Returns 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 tolerance are the units of the horizontal coordinate system (unit) defined when this spatial reference was created.
A separate tolerance, verticalTolerance, is defined for the difference between z-values.
Spatial references have default precision properties, and Esri strongly recommends using the default values in most cases. However some high-accuracy workflows customize the default values to work with a higher precision. To perform operations using a non-default tolerance, create a Geometry with your custom tolerance spatial reference, and pass that geometry to the relational or topological operation. See SpatialReferenceBuilder for more information about creating spatial references with custom precision values.
This function was introduced in Esri::ArcGISRuntime 200.8.
See also SpatialReferenceBuilder and The properties of a spatial reference.
Esri::ArcGISRuntime::Unit SpatialReference::unit() constThe unit of measure for the horizontal coordinate system of this spatial reference.
Returns a null Unit if the spatial reference is invalid.
Also the unit of measure for tolerance and resolution.
[since Esri::ArcGISRuntime 200.8]
double SpatialReference::verticalResolution() const
Returns 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 verticalResolution are the units of the vertical coordinate system (verticalUnit) defined when this spatial reference was created, if one was set.
A separate resolution, resolution, is defined for the distance between x,y coordinates.
Spatial references have default precision properties, and Esri strongly recommends using the default values in most cases. However some high-accuracy workflows customize the default values to preserve their data with higher precision. To store coordinates using a non-default resolution, create a new dataset that uses a custom resolution spatial reference - for example by setting TableDescription::spatialReference when creating a new geodatabase table. See SpatialReferenceBuilder for more information about creating spatial references with custom precision values.
This function was introduced in Esri::ArcGISRuntime 200.8.
See also SpatialReferenceBuilder and The properties of a spatial reference.
[since Esri::ArcGISRuntime 200.8]
double SpatialReference::verticalTolerance() const
Returns 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 verticalTolerance are the units of the vertical coordinate system (verticalUnit) defined when this spatial reference was created, if one was set.
Note that verticalTolerance is currently only used by GeometryEngine::simplify(const Esri::ArcGISRuntime::Geometry&) and when the input is a z-aware Polyline; it is not used in other methods.
A separate tolerance, tolerance, is defined for the difference between x,y coordinates.
Spatial references have default precision properties, and Esri strongly recommends using the default values in most cases. However some high-accuracy workflows customize the default values to work with a higher precision. To perform operations using a non-default tolerance, create a Geometry with your custom tolerance spatial reference, and pass that geometry to the operation. See SpatialReferenceBuilder for more information about creating spatial references with custom precision values.
This function was introduced in Esri::ArcGISRuntime 200.8.
See also SpatialReferenceBuilder and The properties of a spatial reference.
[since Esri::ArcGISRuntime 100.14]
Esri::ArcGISRuntime::LinearUnit SpatialReference::verticalUnit() const
Returns the unit of measure for the vertical coordinate system of this spatial reference.
Will return an empty unit if hasVertical is false
.
Also the unit of measure for verticalTolerance and verticalResolution.
This function was introduced in Esri::ArcGISRuntime 100.14.
int SpatialReference::verticalWkid() constReturns the vertical coordinate system well-known spatial reference identifier (WKID).
The well-known ID for the vertical coordinate system (VCS), or 0 if the spatial reference has no VCS or has a custom VCS.
Note: In versions prior to Esri::ArcGISRuntime 100.9. This method returned -1 if no vertical WKID had been specified.
[static]
Esri::ArcGISRuntime::SpatialReference SpatialReference::webMercator()
Returns a spatial reference representing the WebMercator coordinate system (WKID:102100)
[static]
Esri::ArcGISRuntime::SpatialReference SpatialReference::wgs84()
Returns a spatial reference representing the WGS84 coordinate system (WKID:4326).
QString SpatialReference::wkText() constReturns the well-known text for the horizontal and vertical coordinate systems.
If this coordinate system can only be represented in WKT2 format this property returns an empty string.
Returns the well-known text for the horizontal and vertical coordinate system. Returns an empty string if no WKT has been specified or if the SpatialReference is invalid.
This method always returns the minimal text representation that uniquely identifies a given SpatialReference.
int SpatialReference::wkid() constReturns the well-known spatial reference identifier (WKID).
The well-known ID for the horizontal coordinate system, or 0 if the spatial reference has a custom horizontal coordinate system. Returns 0 if no WKID has been specified.
Note: In versions prior to Esri::ArcGISRuntime 100.9. This method returned -1 if no WKID had been specified.
bool SpatialReference::operator!=(const Esri::ArcGISRuntime::SpatialReference &other) constInequality operator. Returns true
if this object and other are not equal.
See also SpatialReference::operator==.
[noexcept]
Esri::ArcGISRuntime::SpatialReference &SpatialReference::operator=(Esri::ArcGISRuntime::SpatialReference &&other)
Move operator from other SpatialReference.
Esri::ArcGISRuntime::SpatialReference &SpatialReference::operator=(const Esri::ArcGISRuntime::SpatialReference &other)Assignment operator from other SpatialReference.
bool SpatialReference::operator==(const Esri::ArcGISRuntime::SpatialReference &other) constTests and returns true
if this object is equal to a second SpatialReference object.
This is the only valid way to compare two spatial references. Comparing individual attributes for two objects can return misleading results and should be avoided.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4