Show / Hide Table of Contents

Method Project

Project(Geometry, SpatialReference)

Projects the given geometry from its current spatial reference system into the given spatial reference system.

Declaration
public static Geometry Project(this Geometry geometry, SpatialReference outputSpatialReference)
Parameters
Type Name Description
Geometry geometry

The geometry to be projected.

SpatialReference outputSpatialReference

The spatial reference to which geometry need to be projected.

Returns
Type Description
Geometry

The geometry projected into the given SpatialReference. If the input geometry has a null SpatialReference, no projection occurs; instead, an identical geometry with the given SpatialReference is returned. If coordinates of geometry cannot be represented in outputSpatialReference, an empty geometry is returned.

Remarks

A default best-choice DatumTransformation is applied to the project operation. To control the specific transformation used, use the Project(Geometry, SpatialReference, DatumTransformation) overload.

If the geometry parameter has z-values, those z-values are also be transformed, if both the SpatialReference of that geometry, and the outputSpatialReference parameter, have a vertical coordinate system.

Supports true curves. Projecting curves located at poles and coordinate system horizons using this API may give results that differ slightly from other ArcGIS software because it uses a different geometry projection function.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
Relevant samples
Buffer list: Generate multiple individual buffers or a single unioned buffer around multiple points.
Create and save KML file: Construct a KML document and save it as a KMZ file.
Geodesic operations: Calculate a geodesic path between two points and measure its distance.
Project: Project a point from one spatial reference to another.
Project with specific transformation: Project a point from one coordinate system to another using a specific transformation step.

Project(Geometry, SpatialReference, DatumTransformation)

Projects the given geometry from its current spatial reference system into the given output spatial reference system, applying the datum transformation provided.

Declaration
public static Geometry Project(this Geometry geometry, SpatialReference outputSpatialReference, DatumTransformation datumTransformation)
Parameters
Type Name Description
Geometry geometry

The geometry to be projected.

SpatialReference outputSpatialReference

The spatial reference to which geometry need to be projected.

DatumTransformation datumTransformation

The datum transformation used to convert coordinates from one coordinate system to another. If the geometry has z-values and its SpatialReference and outputSpatialReference have a vertical coordinate system set, use a HorizontalVerticalTransformation to transform the z-values.

Returns
Type Description
Geometry

The geometry projected into the given SpatialReference. If the input geometry has a null SpatialReference, no projection occurs; instead, an identical geometry with the given SpatialReference is returned. If coordinates of geometry cannot be represented in outputSpatialReference, an empty geometry is returned.

Remarks

Use this overload to project a geometry if the difference between the input geometry's SpatialReference and the outputSpatialReference involves a change of datum, and you do not wish to use the default datum transformation used by Project(Geometry, SpatialReference). Using a HorizontalVerticalTransformation also transforms the z-values of the geometry (if the geometry has them) if both the SpatialReference of the geometry and the outputSpatialReference have a vertical coordinate system set.

Supports true curves. Projecting curves located at poles and coordinate system horizons using this API may give results that differ slightly from other ArcGIS software because it uses a different geometry projection function.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.2.1 - 200.7
Xamarin.Android100.2.1 - 100.15
Xamarin.iOS100.2.1 - 100.15
UWP100.2.1 - 200.7
Relevant samples
Project with specific transformation: Project a point from one coordinate system to another using a specific transformation step.
In This Article
Back to top Copyright © 2022 Esri.