Click to Rate and Give Feedback
TechNet
TechNet Library
SQL Server
SQL Server 2008
Database Engine
Development
 Geography Methods Supported by Spat...
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Geography Methods Supported by Spatial Indexes

Under certain conditions, spatial indexes support the following set-oriented geography methods: STIntersects(),STEquals(), and STDistance(). To be supported by a spatial index, these methods must be used within the WHERE clause of a query, and they must occur within a predicate of the following general form:

geography1.method_name(geography2)comparison_operatorvalid_number

To return a non-null result, geography1 and geography2 must have the same Spatial Reference Identifier (SRID). Otherwise, the method returns NULL.

Spatial indexes support the following predicate forms:

  • geography1.STIntersects(geography2)= 1

  • geography1.STEquals(geography2)= 1

  • geography1.STDistance(geography2) < number

  • geography1.STDistance(geography2) <= number

    Important noteImportant

    In either form of STDistance() predicate, at least one of geography arguments (geography1 or geography2) must specify a geography instance that represents a point. Otherwise, the method returns NULL.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker