DbGeography.FromText Method

Definition

Creates a new DbGeography value based on the specified well known text value.

Overloads

FromText(String)

Creates a new DbGeography value based on the specified well known text value.

FromText(String, Int32)

Creates a new DbGeography value based on the specified well known text value and coordinate system identifier (SRID).

FromText(String)

Creates a new DbGeography value based on the specified well known text value.

public:
 static System::Data::Spatial::DbGeography ^ FromText(System::String ^ wellKnownText);
public static System.Data.Spatial.DbGeography FromText (string wellKnownText);
static member FromText : string -> System.Data.Spatial.DbGeography
Public Shared Function FromText (wellKnownText As String) As DbGeography

Parameters

wellKnownText
String

A string that contains a well known text representation of the geography value.

Returns

A new DbGeography value as defined by the well known text value with the default geography coordinate system identifier (SRID) (DefaultCoordinateSystemId).

Exceptions

wellKnownText

Applies to

FromText(String, Int32)

Creates a new DbGeography value based on the specified well known text value and coordinate system identifier (SRID).

public:
 static System::Data::Spatial::DbGeography ^ FromText(System::String ^ wellKnownText, int coordinateSystemId);
public static System.Data.Spatial.DbGeography FromText (string wellKnownText, int coordinateSystemId);
static member FromText : string * int -> System.Data.Spatial.DbGeography
Public Shared Function FromText (wellKnownText As String, coordinateSystemId As Integer) As DbGeography

Parameters

wellKnownText
String

A string that contains a well known text representation of the geography value.

coordinateSystemId
Int32

The identifier of the coordinate system that the new DbGeography value should use.

Returns

A new DbGeography value as defined by the well known text value with the specified coordinate system identifier.

Exceptions

wellKnownText

coordinateSystemId

Applies to