Show / Hide Table of Contents

Method Create

Create(Int32)

Returns an instance of the SpatialReference class based on the given well-known ID.

Declaration
public static SpatialReference Create(int wkid)
Parameters
Type Name Description
System.Int32 wkid

The well-known ID of the horizontal coordinate system. Must be a positive value.

Returns
Type Description
SpatialReference

A SpatialReference object.

Remarks

The returned SpatialReference has only horizontal coordinate system and does not have vertical coordinate system associated with it.

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
Densify and generalize: A multipart geometry can be densified by adding interpolated points at regular intervals. Generalizing multipart geometry simplifies it while preserving its general shape. Densifying a multipart geometry adds more vertices at regular intervals.
Identify layers: Identify features in all layers in a map. MapView supports identifying features across multiple layers. Because some layer types have sublayers, the sample recursively counts results for sublayers within each layer.

Create(Int32, Int32)

Returns an instance of the SpatialReference class based on well-known IDs for the horizontal and vertical coordinate systems.

Declaration
public static SpatialReference Create(int wkid, int verticalWkid)
Parameters
Type Name Description
System.Int32 wkid

Well-known ID (WKID) of the horizontal coordinate system. Must be a positive value.

System.Int32 verticalWkid

Well-known ID (WKID) of the vertical coordinate system. Must be a non negative value.

Returns
Type Description
SpatialReference

A SpatialReference object.

Remarks

The method returns a spatial reference that has both horizontal and vertical coordinate systems. When verticalWkid is 0, this method is equivalent to calling Create(Int32), and does not define a vertical coordinate system part.

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

Create(String)

Returns an instance of the SpatialReference class based on well-known text (WKT).

Declaration
public static SpatialReference Create(string wktext)
Parameters
Type Name Description
System.String wktext

A well-known text (WKT) string that defines a horizontal and optionally vertical coordinate system.

Returns
Type Description
SpatialReference

A SpatialReference object.

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
In This Article
Back to top Copyright © 2022 Esri.