Project a point from one coordinate system to another using a specific transformation step.
Use case
While the geometry engine supports automatic transformation of geometry between coordinate systems, some coordinate system pairs have specific transformations defined for additional accuracy within certain areas. For example, your organization could work in a local state plane using the NAD83 or NAD83 (HARN) datums while collecting data in the standard WGS 1984 datum. Your organization can define a specific transformation step to use to ensure precise, reliable data collection.
How to use the sample
View the values for: unprojected point, projected with the GeometryEngine default, and projected with a specific transformation step.
How it works
- Get a locations coordinates in WGS 84.
- Use the geometry engine to project the point without specifying a transformation step. Display the result for comparison.
- Use the geometry engine to project the point, this time specifying a transformation step. Display the result.
- Compare the results to see how a specific transformation step can result in a slightly different (and potentially more accurate) result.
Relevant API
- GeographicTransformation
- GeographicTransformationStep
About the data
To avoid the need to project from mercator coordinates to WGS 84, this sample uses World Basemaps (WGS84) from ArcGIS Online's living atlas.
Additional information
See Spatial references in the ArcGIS Runtime SDK for .NET guide for more information about geographic coordinate systems, geographic transformations, and projected coordinate systems.
Tags
coordinate system, geographic, project, projection, transform, transformation, transformation step
Sample Code
<UserControl x:Class="ArcGISRuntime.WinUI.Samples.ProjectWithSpecificTransformation.ProjectWithSpecificTransformation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
</UserControl.Resources>
<StackPanel>
<TextBlock Text="Geometry before (WGS 84):" />
<TextBlock x:Name="BeforeLabel" />
<TextBlock Text="Geometry to NAD_1983_HARN_StatePlane_New_York_Central_FIPS_3102 after WGS_1984_To_MSK_1942:" />
<TextBlock x:Name="AfterLabel" />
<TextBlock Text="Geometry to NAD_1983_HARN_StatePlane_New_York_Central_FIPS_3102 after (without specific transform):" />
<TextBlock x:Name="NonSpecificLabel" />
</StackPanel>
</UserControl>