import GeographicTransformationStep from "@arcgis/core/geometry/operators/support/GeographicTransformationStep.js";const GeographicTransformationStep = await $arcgis.import("@arcgis/core/geometry/operators/support/GeographicTransformationStep.js");- Inheritance:
- GeographicTransformationStep→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.32
Represents a step in the process of transforming coordinates from one geographic coordinate system to another. A geographic transformation step can be constructed from a well-known ID (wkid) or a well known text (wkt) that represents a geographic datum transformation.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
isInverse
- Type
- boolean
Indicates if the geographic transformation is inverted.
- Default value
- false
wkid
The well-known id (wkid) hat represents a known geographic transformation. See Geographic datum transformations for the list of supported equation-based geographic transformations.
Example
// Create a geographic transformation step for Tokyo_To_WGS_1984_2001 using its wkidlet geoStep = new GeographicTransformationStep({ wkid: 108106 }); wkt
The well-known text (wkt) that represents a known geographic transformation. See Geographic datum transformations for the list of supported equation-based geographic transformations.
Example
// Create a geographic transformation step for NAD_1927_To_WGS_1984_1// using its well known text or wktlet wkt = "GEOGTRAN[\"NAD_1927_To_WGS_1984_1\",GEOGCS[\"GCS_North_American_1927\",DATUM[\"D_North_American_1927\",SPHEROID[\"Clarke_1866\",6378206.4,294.9786982]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],METHOD[\"Geocentric_Translation\"],PARAMETER[\"X_Axis_Translation\",-3.0],PARAMETER[\"Y_Axis_Translation\",142.0],PARAMETER[\"Z_Axis_Translation\",183.0]]";
let geoStep = new GeographicTransformationStep({ wkt });Methods
fromJSON
- Signature
-
fromJSON (json: any): any
Creates a new instance of this class and initializes it with values from a JSON object
generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a
toJSON()
method from another ArcGIS product. See the Using fromJSON()
topic in the Guide for details and examples of when and how to use this function.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. | |
- Returns
- any
Returns a new instance of this class.
clone
- Signature
-
clone (): this
Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.
- Returns
- this
A deep clone of the class instance that invoked this method.
getInverse
- Signature
-
getInverse (): GeographicTransformationStep
Returns the inverse of this geographic transformation step.
The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite
direction of the original object. For example, if the original object represents the NAD_1983_HARN_To_NAD_1983_NSRS2007_1
transformation, then the inverse will transform from NAD 83 (NSRS 2007) to NAD 83 (HARN).
- Returns
- GeographicTransformationStep
Returns the inverse of the geographic transformation step.
Example
// Get the inverse of the geographic transformation step for Tokyo_To_WGS_1984_2001 using its wkidlet geoStep = new GeographicTransformationStep({ wkid: 108106 });
let inverse = geoStep.getInverse(); toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.