Namespace: Esri::GameEngine::Geometry
Class: Esri/GameEngine/Geometry/ArcGISSpatialReference
Since: 1.0.0
Implements: ArcGISJSONSerializable
Summary
The spatial reference specifies how geometry coordinates relate to real-world space.
Constructors
ArcGISSpatialReference(int32_t)
Creates a spatial reference based on WKID.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
WKID | int32_t | No | The well-known ID of the horizontal coordinate system. Must be a positive value. |
Creates a spatial reference based on WKID for the horizontal coordinate system and vertical coordinate system.
Since 1.0.0
Arguments
ArcGISSpatialReference(const FString&)
Creates a spatial reference based on well-known text.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
wk | FString | Yes | The well-known text of the spatial reference to create. |
Properties
Property | Type | Nullable | Readonly | Summary |
---|---|---|---|---|
BaseGeographic | ArcGISSpatialReference | Yes | Yes | If the given spatial reference is a projected coordinate system, then this returns the geographic coordinate system of that system. |
FullWorldExtent | ArcGISEnvelope | No | Yes | The full world extent for the spatial reference. |
HasVertical | bool | No | Yes | True if spatial reference has a vertical coordinate system set; false otherwise. |
IsGeographic | bool | No | Yes | True if spatial reference is a Geographic Coordinate System. |
IsPannable | bool | No | Yes | True if coordinate system is horizontally pannable. |
IsProjected | bool | No | Yes | True if spatial reference is a Projected Coordinate System. |
Resolution | double | No | Yes | The minimum distance that separates unique x,y coordinate values when stored in an |
SpheroidData | ArcGISSpheroidData | No | Yes | The spheroid data for the spatial reference. |
Tolerance | double | No | Yes | The minimum distance that determines if two x,y coordinates are considered to be at the same location for relational and topological ArcGISGeometryEngine operations. |
Unit | ArcGISUnit | No | Yes | The unit of measure for the horizontal coordinate system of this spatial reference. |
VerticalResolution | double | No | Yes | The minimum distance that separates unique z-values when stored in an |
VerticalTolerance | double | No | Yes | The minimum distance that determines if two z-values are considered to be at the same location for ArcGISGeometryEngine operations that compare z-values. |
VerticalUnit | ArcGISLinearUnit | Yes | Yes | The unit of measure for the vertical coordinate system of this spatial reference. |
VerticalWKID | int32_t | No | Yes | 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 | int32_t | No | Yes | The well-known ID for the horizontal coordinate system, or 0 if the spatial reference has a custom horizontal coordinate system. |
WKText | FString | No | Yes | The well-known text for the horizontal and vertical coordinate systems. |
BaseGeographic
ArcGISSpatialReference GetBaseGeographic() const
If the given spatial reference is a projected coordinate system, then this returns the geographic coordinate system of that system.
If the spatial reference is a projected coordinate system, then a spatial reference object representing the underlying geographic coordinate system is returned. Every projected coordinate system has an underlying geographic coordinate system. If the spatial reference is a geographic coordinate system, then a reference to itself is returned. If the spatial reference is a local spatial reference, a null is returned with an error.
FullWorldExtent
ArcGISEnvelope GetFullWorldExtent() const
The full world extent for the spatial reference.
The envelope defines the valid range of coordinates for the spatial reference.
HasVertical
bool GetHasVertical() const
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).
An ArcGISSpatialReference may have a VCS set, for example by calling the ArcGISSpatialReference::SpatialReference constructor. ArcGISSpatialReference::VerticalWKID, ArcGISSpatialReference::WKText, and ArcGISSpatialReference::VerticalUnit provide more information about the specific VCS set on this instance.
VCSs are used when projecting geometries using an ArcGISHorizontalVerticalTransformation.
IsGeographic
bool GetIsGeographic() const
True if spatial reference is a Geographic Coordinate System.
Resolution
double GetResolution() const
The minimum distance that separates unique x,y coordinate values when stored in an ArcGIS
.
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 ArcGISGeometry of an ArcGIS
. Any coordinates that differ by
less than the resolution will be stored as the same coordinate value. The units of
ArcGISSpatialReference::Resolution are the units of the horizontal coordinate system (ArcGISSpatialReference::Unit)
defined when this spatial reference was created.
A separate resolution, ArcGISSpatialReference::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 Table
when
creating a new geodatabase table. See Spatial
for more information about creating spatial
references with custom precision values.
Tolerance
double GetTolerance() const
The minimum distance that determines if two x,y coordinates are considered to be at the same location for relational and topological ArcGISGeometryEngine operations.
This value is used in relational and topological ArcGISGeometryEngine 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 ArcGISSpatialReference::Tolerance are the units of the horizontal coordinate system (ArcGISSpatialReference::Unit) defined when this spatial reference was created.
A separate tolerance, ArcGISSpatialReference::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 ArcGISGeometry with your custom
tolerance spatial reference, and pass that geometry to the relational or topological operation. See
Spatial
for more information about creating spatial references with custom precision
values.
Unit
ArcGISUnit GetUnit() const
The unit of measure for the horizontal coordinate system of this spatial reference.
Also the unit of measure for ArcGISSpatialReference::Tolerance and ArcGISSpatialReference::Resolution.
VerticalResolution
double GetVerticalResolution() const
The minimum distance that separates unique z-values when stored in an ArcGIS
.
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 ArcGISGeometry of an ArcGIS
. Any z-values that differ by less than the
vertical resolution will be stored as the same z-value. The units of ArcGISSpatialReference::VerticalResolution
are the units of the vertical coordinate system (ArcGISSpatialReference::VerticalUnit) defined when this
spatial reference was created, if one was set.
A separate resolution, ArcGISSpatialReference::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 Table
when
creating a new geodatabase table. See Spatial
for more information about creating spatial
references with custom precision values.
VerticalTolerance
double GetVerticalTolerance() const
The minimum distance that determines if two z-values are considered to be at the same location for ArcGISGeometryEngine operations that compare z-values.
This value is used in relational and topological ArcGISGeometryEngine operations when determining whether two z-values are close enough to be considered as the same value when calculating the result. The units of ArcGISSpatialReference::VerticalTolerance are the units of the vertical coordinate system (ArcGISSpatialReference::VerticalUnit) defined when this spatial reference was created, if one was set.
Note that ArcGISSpatialReference::VerticalTolerance is currently only used by ArcGISGeometryEngine::Simplify and when the input is a z-aware ArcGISPolyline; it is not used in other methods.
A separate tolerance, ArcGISSpatialReference::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 ArcGISGeometry with your custom
tolerance spatial reference, and pass that geometry to the operation. See Spatial
for
more information about creating spatial references with custom precision values.
VerticalUnit
ArcGISLinearUnit GetVerticalUnit() const
The unit of measure for the vertical coordinate system of this spatial reference.
Is null if ArcGISSpatialReference::HasVertical is false.
Also the unit of measure for ArcGISSpatialReference::VerticalTolerance and ArcGISSpatialReference::VerticalResolution.
VerticalWKID
int32_t GetVerticalWKID() const
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
int32_t GetWKID() const
The well-known ID for the horizontal coordinate system, or 0 if the spatial reference has a custom horizontal coordinate system.
WKText
FString GetWKText() const
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.
Methods
Signature | Return Type | Summary |
---|---|---|
Equals(const ArcGISSpatialReference&) | Tests if this object is equal to a second ArcGISSpatialReference object. | |
GetConvergenceAngle(const ArcGISPoint&) | Calculate the grid convergence for a spatial reference at a given point. | |
Creates a spatial reference based on web Mercator. | ||
WGS84() | Creates a spatial reference based on WGS84. |
Equals
bool Equals(const ArcGISSpatialReference& right) const
Tests if this object is equal to a second ArcGISSpatialReference object.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
right | ArcGISSpatialReference | Yes | The 2nd spatial reference to check to see if equal to the 1st. |
Returns bool
True if the comparison succeeds and the objects are equal, false otherwise.
GetConvergenceAngle
double GetConvergenceAngle(const ArcGISPoint& point) const
Calculate the grid convergence for a spatial reference at a given point.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
point | ArcGISPoint | Yes | The point. |
Returns double
The grid convergence in degrees.
WebMercator
static ArcGISSpatialReference WebMercator()
Creates a spatial reference based on web Mercator.
Since 1.0.0
Returns ArcGISSpatialReference
A spatial reference. This is passed to spatial reference functions. null if an error occurs.
WGS84
static ArcGISSpatialReference WGS84()
Creates a spatial reference based on WGS84.
Since 1.0.0
Returns ArcGISSpatialReference
A spatial reference. This is passed to spatial reference functions. null if an error occurs.