SqlGeometry.STIsValid 方法 ()

 

确定 SqlGeometry 实例的格式是否正确。

命名空间:   Microsoft.SqlServer.Types
程序集:  Microsoft.SqlServer.Types(位于 Microsoft.SqlServer.Types.dll)

语法

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public SqlBoolean STIsValid()
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
SqlBoolean STIsValid()
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
member STIsValid : unit -> SqlBoolean
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)>
Public Function STIsValid As SqlBoolean

返回值

Type: System.Data.SqlTypes.SqlBoolean

如果根据开放地理空间联盟 (OGC) 类型,SqlGeometry 实例的格式正确,则返回 trueSqlGeometry 实例格式不正确,则返回 false

备注

OGC 类型 SqlGeometry 实例可通过调用来确定 STGeometryType

SQL Server 生成唯一有效 SqlGeometry 实例,但允许存储和检索无效的实例。 可以使用检索表示任何无效实例的相同点集的有效实例 MakeValid 方法。

另请参阅

SqlGeometry 类
Microsoft.SqlServer.Types 命名空间

返回页首