Click or drag to resize

GeographicTransformation Class

Used to transform coordinates of geometries between spatial references that have two different geographic coordinate systems.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Geometry
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.9.0
public sealed class GeographicTransformation : DatumTransformation

The GeographicTransformation type exposes the following members.

Public propertyGeographicTransformationSteps Obsolete.
Returns a list of geographic transformations that define this composite geographic transformation.
Public propertyInputSpatialReference
Gets the input SpatialReference.
(Inherited from DatumTransformation.)
Public propertyIsMissingProjectionEngineFiles
Gets true if the dataset needed by the Projection Engine is missing locally.
(Inherited from DatumTransformation.)
Public propertyCode exampleName
Returns the name of the datum transformation.
(Inherited from DatumTransformation.)
Public propertyOutputSpatialReference
Gets the output SpatialReference.
(Inherited from DatumTransformation.)
Public propertySteps
Returns a list of geographic transformations that define this composite geographic transformation.
Public methodGetInverse
Returns the inverse of this datum transformation or null if the transformation is not invertible.
(Inherited from DatumTransformation.)
Public methodIsEqual
Returns true if the two transformations are equal, false otherwise.
(Inherited from DatumTransformation.)

Each geographic transformation has an input and an output SpatialReference. The transformation operates on the horizontal (geographic) datums in each spatial reference.

The inverse of the geographic transformation, if any, used to transform in the opposite direction, may be accessed using a member function.

A geographic transformation can be constructed from a single geographic transformation step object, or from a list of geographic transformation steps objects that are chained together. Most transformations between spatial references that do not share the WGS 1984 datum use WGS 1984 as an intermediate datum. Thus, it is common to create a geographic transformation object with two geographic transformation steps: first to transform from the datum in the input spatial reference to WGS 1984, and then from WGS 1984 to the output spatial reference's datum. There are a limited number of transformations directly between two non-WGS84 datums, such as WKID 4461, which is NAD_1983_HARN_To_NAD_1983_NSRS2007_1. These do not need WGS 1984 as an intermediate datum.

In most cases, you do not need to construct your own GeographicTransformation. You can get a list of suitable transformations for a given input and output spatial reference using one of the functions on the transformation catalog class.

A geographic transformation object is immutable.



Example Name: ProjectWithSpecificTransformation

Project a point from one coordinate system to another using a specific transformation step.

Code example screen shot.

// Copyright 2018 Esri.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Geometry;
using System;

namespace ArcGISRuntime.WPF.Samples.ProjectWithSpecificTransformation
        name: "Project with specific transformation",
        category: "Geometry",
        description: "Project a point from one coordinate system to another using a specific transformation step.",
        instructions: "View the values for: unprojected point, projected with the GeometryEngine default, and projected with a specific transformation step.",
        tags: new[] { "coordinate system", "geographic", "project", "projection", "transform", "transformation", "transformation step" })]
    public partial class ProjectWithSpecificTransformation
        public ProjectWithSpecificTransformation()


        private void Initialize()
            // Create a point geometry in NYC in WGS84
            MapPoint startingPoint = new MapPoint(-73.984513, 40.748469, SpatialReferences.Wgs84);

            // Update the UI with the initial coordinates
            BeforeLabel.Content = String.Format("x: {0}, y: {1}", startingPoint.X, startingPoint.Y);

            // Create a geographic transformation step for transform WKID 108055, WGS_1984_To_MSK_1942
            GeographicTransformationStep geoStep = new GeographicTransformationStep(108055);

            // Create the transformation
            GeographicTransformation geoTransform = new GeographicTransformation(geoStep);

            // Project to a coordinate system used in New York, NAD_1983_HARN_StatePlane_New_York_Central_FIPS_3102
            MapPoint afterPoint = (MapPoint)GeometryEngine.Project(startingPoint, SpatialReference.Create(2829), geoTransform);

            // Update the UI with the projected coordinates
            AfterLabel.Content = String.Format("x: {0}, y: {1}", afterPoint.X, afterPoint.Y);

            // Perform the same projection without specified transformation
            MapPoint unspecifiedTransformPoint = (MapPoint)GeometryEngine.Project(startingPoint, SpatialReference.Create(2829));

            // Update the UI with the projection done without specific transform for comparison purposes
            NonSpecificLabel.Content = String.Format("x: {0}, y: {1}", unspecifiedTransformPoint.X, unspecifiedTransformPoint.Y);
<UserControl x:Class="ArcGISRuntime.WPF.Samples.ProjectWithSpecificTransformation.ProjectWithSpecificTransformation"
        <Label Content="Geometry before (WGS 84):" />
        <Label x:Name="BeforeLabel" />
        <Label Content="Geometry to NAD_1983_HARN_StatePlane_New_York_Central_FIPS_3102 after WGS_1984_To_MSK_1942:" />
        <Label x:Name="AfterLabel" />
        <Label Content="Geometry to NAD_1983_HARN_StatePlane_New_York_Central_FIPS_3102 after (without specific transform)" />
        <Label x:Name="NonSpecificLabel" />
See Also
Additional Examples
Hyperlink to ExampleDescription
ProjectWithSpecificTransformationProject a point from one coordinate system to another using a specific transformation step.