You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation for OGC and extended methods on geography and geometry instances (#36564)
- Revised titles and descriptions for clarity and consistency.
- Updated the last modified date to February 5, 2026.
- Enhanced sections on OGC standards compliance, shape properties, and representation formats.
- Added detailed explanations for various methods, including their purposes and functionalities.
- Improved organization of content for better readability and user navigation.
[!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] supports a number of extended methods on Open Geospatial Consortium (OGC) geography instances.
20
-
21
-
For more information on OGC specifications, see the following resources:
22
-
23
-
-[OGC Specifications, Simple Feature Access Part 1 - Common Architecture](https://go.microsoft.com/fwlink/?LinkId=93627)
24
-
25
-
-[OGC Specifications, Simple Feature Access Part 2 - SQL Options](https://go.microsoft.com/fwlink/?LinkId=93628)
SQL Server supports extended methods on **geography** instances that go beyond the Open Geospatial Consortium (OGC) standard methods. These extended methods provide additional functionality for working with geographic data, including Z (elevation) and M (measure) values, precise buffer operations, simplified representations, and enhanced WKT/WKB formats.
21
+
22
+
## Extended methods vs. OGC methods
23
+
24
+
While OGC methods provide standardized spatial operations defined by the OpenGIS specification, extended methods offer SQL Server-specific enhancements:
25
+
26
+
-**OGC methods**: Standardized operations for interoperability with other geospatial systems. Use when standards compliance is required.
27
+
-**Extended methods**: SQL Server-specific operations that provide additional functionality, performance optimizations, or support for features not covered by OGC standards (such as circular arcs, Z/M values, and advanced buffer control).
28
+
29
+
For most spatial tasks, OGC methods provide the necessary functionality. Use extended methods when you need the extra capabilities they provide.
30
+
31
+
## Enhanced representation formats
32
+
33
+
These methods provide alternative formats for representing geography data, including support for Z (elevation) and M (measure) values.
34
+
35
+
| Method | Description |
36
+
| --- | --- |
37
+
|[AsBinaryZM (geography Data Type)](../../t-sql/spatial-geography/asbinaryzm-geography-data-type.md)| Returns the OGC Well-Known Binary (WKB) representation augmented with Z (elevation) and M (measure) values. |
38
+
|[AsTextZM](../../t-sql/spatial-geography/astextzm-geography-data-type.md)| Returns the OGC Well-Known Text (WKT) representation augmented with Z (elevation) and M (measure) values. |
39
+
|[AsGml](../../t-sql/spatial-geography/asgml-geography-data-type.md)| Returns the Geography Markup Language (GML) representation of a geography instance. |
40
+
|[ToString](../../t-sql/spatial-geography/tostring-geography-data-type.md)| Returns the string representation of a geography instance augmented with Z and M values. |
41
+
42
+
## Z and M coordinate access
43
+
44
+
These methods access the Z (elevation) and M (measure) values of geography instances, supporting 3D and 4D spatial data.
45
+
46
+
| Method | Description |
47
+
| --- | --- |
48
+
|[Lat](../../t-sql/spatial-geography/lat-geography-data-type.md)| Returns the latitude property of a Point geography instance. |
49
+
|[Long](../../t-sql/spatial-geography/long-geography-data-type.md)| Returns the longitude property of a Point geography instance. |
50
+
|[Z](../../t-sql/spatial-geography/z-geography-data-type.md)| Returns the Z (elevation) value of a geography instance. Null if not defined. |
51
+
|[M](../../t-sql/spatial-geography/m-geography-data-type.md)| Returns the M (measure) value of a geography instance. Null if not defined. |
52
+
|[HasZ (geography Data Type)](../../t-sql/spatial-geography/hasz-geography-data-type.md)| Returns 1 if a geography instance contains at least one point with a Z value. |
53
+
|[HasM (geography Data Type)](../../t-sql/spatial-geography/hasm-geography-data-type.md)| Returns 1 if a geography instance contains at least one point with an M value. |
54
+
55
+
## Advanced buffer operations
56
+
57
+
These methods provide more control over buffer calculations than the standard OGC STBuffer method.
58
+
59
+
| Method | Description |
60
+
| --- | --- |
61
+
|[BufferWithTolerance](../../t-sql/spatial-geography/bufferwithtolerance-geography-data-type.md)| Returns a geometric object representing all points within a specified distance from a geography instance, with explicit tolerance control for precision. |
62
+
|[BufferWithCurves (geography Data Type)](../../t-sql/spatial-geography/bufferwithcurves-geography-data-type.md)| Returns a geography instance representing all points within a specified distance, preserving circular arc segments in the result. |
63
+
64
+
## Geometry simplification
65
+
66
+
These methods create simplified versions of geography instances, useful for performance optimization and visualization at different scales.
67
+
68
+
| Method | Description |
69
+
| --- | --- |
70
+
|[Reduce](../../t-sql/spatial-geography/reduce-geography-data-type.md)| Returns a simplified approximation of a geography instance produced by running the Douglas-Peucker algorithm with the specified tolerance. |
71
+
|[CurveToLineWithTolerance (geography Data Type)](../../t-sql/spatial-geography/curvetolinewithtolerance-geography-data-type.md)| Returns a polygonal approximation of a geography instance containing circular arc segments, with explicit tolerance control. |
72
+
73
+
## Envelope and bounding information
74
+
75
+
These methods provide information about the bounding region of a geography instance.
76
+
77
+
| Method | Description |
78
+
| --- | --- |
79
+
|[EnvelopeCenter](../../t-sql/spatial-geography/envelopecenter-geography-data-type.md)| Returns the center point of the bounding circle for a geography instance. |
80
+
|[EnvelopeAngle](../../t-sql/spatial-geography/envelopeangle-geography-data-type.md)| Returns the maximum angle between the center point and a point in the geography instance, measured in degrees. |
81
+
82
+
## Polygon ring access
83
+
84
+
These methods provide access to rings in a geography Polygon instance.
85
+
86
+
| Method | Description |
87
+
| --- | --- |
88
+
|[NumRing](../../t-sql/spatial-geography/numrings-geography-data-type.md)| Returns the total number of rings in a Polygon geography instance. |
89
+
|[RingN](../../t-sql/spatial-geography/ringn-geography-data-type.md)| Returns the specified ring of a Polygon geography instance. |
90
+
91
+
## Spatial relationship queries
92
+
93
+
These methods perform advanced spatial relationship queries.
94
+
95
+
| Method | Description |
96
+
| --- | --- |
97
+
|[ShortestLineTo (geography Data Type)](../../t-sql/spatial-geography/shortestlineto-geography-data-type.md)| Returns a LineString instance with two points representing the shortest distance between the two geography instances. |
98
+
99
+
## Validity and type checking
100
+
101
+
These methods provide detailed validity checking and type information.
102
+
103
+
| Method | Description |
104
+
| --- | --- |
105
+
|[IsValidDetailed (geography Data Type)](../../t-sql/spatial-geography/isvaliddetailed-geography-data-type.md)| Returns a message that helps identify problems with an invalid geography instance. |
106
+
|[MakeValid](../../t-sql/spatial-geography/makevalid-geography-data-type.md)| Converts an invalid geography instance into a valid instance with a valid OGC type. |
107
+
|[InstanceOf](../../t-sql/spatial-geography/instanceof-geography-data-type.md)| Returns 1 if a geography instance is of the specified type. |
108
+
|[IsNull](../../t-sql/spatial-geography/isnull-geography-data-type.md)| Returns 1 if a geography instance is null. |
109
+
110
+
## Spatial operations
111
+
112
+
These methods perform spatial operations with enhanced capabilities.
113
+
114
+
| Method | Description |
115
+
| --- | --- |
116
+
|[Filter](../../t-sql/spatial-geography/filter-geography-data-type.md)| Offers a fast, index-only intersection method to determine if a geography instance intersects another instance. |
117
+
|[ReorientObject](../../t-sql/spatial-geography/reorientobject-geography-data-type.md)| Returns a geography instance with interchanged interior and exterior regions (reverses ring orientation). |
118
+
119
+
## Version compatibility
120
+
121
+
These methods provide information about SQL Server version compatibility.
122
+
123
+
| Method | Description |
124
+
| --- | --- |
125
+
|[MinDbCompatibilityLevel (geography Data Type)](../../t-sql/spatial-geography/mindbcompatibilitylevel-geography-data-type.md)| Returns the minimum database compatibility level that recognizes the geography data type. |
126
+
127
+
## Related content
128
+
129
+
-[OGC Methods on Geography Instances](../../t-sql/spatial-geography/ogc-methods-on-geography-instances.md)
0 commit comments