Partager via


SqlGeography.STGeomFromText, méthode (SqlChars, Int32)

 

Retourne une instance SqlGeography à partir d'une représentation OGC (Open Geospatial Consortium) WKT (Well-Known Text) augmentée des valeurs Z (élévation) et M (mesure) apportées par l'instance.

Espace de noms:   Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (dans Microsoft.SqlServer.Types.dll)

Syntaxe

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public static SqlGeography STGeomFromText(
    SqlChars geometryTaggedText,
    int srid
)
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
static SqlGeography^ STGeomFromText(
    SqlChars^ geometryTaggedText,
    int srid
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
static member STGeomFromText : 
        geometryTaggedText:SqlChars *
        srid:int -> SqlGeography
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)>
Public Shared Function STGeomFromText (
    geometryTaggedText As SqlChars,
    srid As Integer
) As SqlGeography

Paramètres

  • srid
    Type: System.Int32

    Expression int qui représente l'ID de référence spatial (SRID) de l'instance SqlGeography à retourner.

Valeur de retour

Type: Microsoft.SqlServer.Types.SqlGeography

Instance SqlGeography construite à partir de la représentation WKY.

Notes

Le type OGC de l'instance SqlGeography retourné par STGeomFromText est défini sur l'entrée WKT correspondante.

Cette méthode lève une exception FormatException si l’entrée n’est pas correctement mise en forme.

Voir aussi

SqlGeography, classe
Microsoft.SqlServer.Types, espace de noms

Retour au début