如果一个 geography 实例与另一个 geography 实例在空间上不相联,则返回 1。 否则,返回 0。
适用范围:SQL Server(SQL Server 2008 至当前版本),Windows Azure SQL Database(初始版本至当前版本)。 |
语法
.STDisjoint ( other_geography )
参数
- other_geography
另一个 geography 实例,将与调用 STDisjoint() 所在的实例进行比较。
返回类型
SQL Server 返回类型:bit
CLR 返回类型:SqlBoolean
注释
如果两个 geography 实例的点集交集是空的,则这两个实例不相联。
如果 geography 实例的空间引用 ID (SRID) 不匹配,则此方法始终返回 Null。
示例
下面的示例使用 STDisjoint() 来测试两个 geography 实例,以查看它们是否在空间上不相联。
DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SET @h = geography::STGeomFromText('POINT(-122.34900 47.65100)', 4326);
SELECT @g.STDisjoint(@h);