Skip to content

Commit 381ed9e

Browse files
authored
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.
1 parent 0cd629d commit 381ed9e

4 files changed

Lines changed: 469 additions & 314 deletions

File tree

Lines changed: 119 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: "Extended Methods on Geography Instances"
3-
description: "Extended Methods on Geography Instances"
2+
title: "Extended methods on geography instances"
3+
description: "Reference for SQL Server-specific extended methods on geography instances, providing additional functionality beyond OGC standard methods."
44
author: MladjoA
55
ms.author: mlandzic
6-
ms.date: "03/14/2017"
6+
ms.date: "02/05/2026"
77
ms.service: sql
88
ms.subservice: t-sql
99
ms.topic: reference
@@ -12,77 +12,124 @@ ms.custom:
1212
dev_langs:
1313
- "TSQL"
1414
monikerRange: "=azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric-sqldb"
15+
ai-usage: ai-assisted
1516
---
16-
# Extended Methods on Geography Instances
17+
# Extended methods on geography instances
1718
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance FabricSQLDB](../../includes/applies-to-version/sql-asdb-asdbmi-fabricsqldb.md)]
1819

19-
[!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)
26-
27-
- [OGC Specifications, Geography Markup Language](https://go.microsoft.com/fwlink/?LinkId=93629)
28-
29-
## In This Section
30-
31-
- [AsBinaryZM (geography Data Type)](../../t-sql/spatial-geography/asbinaryzm-geography-data-type.md)
32-
33-
- [AsGml](../../t-sql/spatial-geography/asgml-geography-data-type.md)
34-
35-
- [AsTextZM](../../t-sql/spatial-geography/astextzm-geography-data-type.md)
36-
37-
- [BufferWithCurves (geography Data Type)](../../t-sql/spatial-geography/bufferwithcurves-geography-data-type.md)
38-
39-
- [BufferWithTolerance](../../t-sql/spatial-geography/bufferwithtolerance-geography-data-type.md)
40-
41-
- [CurveToLineWithTolerance (geography Data Type)](../../t-sql/spatial-geography/curvetolinewithtolerance-geography-data-type.md)
42-
43-
- [EnvelopeAngle](../../t-sql/spatial-geography/envelopeangle-geography-data-type.md)
44-
45-
- [EnvelopeCenter](../../t-sql/spatial-geography/envelopecenter-geography-data-type.md)
46-
47-
- [Filter](../../t-sql/spatial-geography/filter-geography-data-type.md)
48-
49-
- [HasM (geography Data Type)](../../t-sql/spatial-geography/hasm-geography-data-type.md)
50-
51-
- [HasZ (geography Data Type)](../../t-sql/spatial-geography/hasz-geography-data-type.md)
52-
53-
- [InstanceOf](../../t-sql/spatial-geography/instanceof-geography-data-type.md)
54-
55-
- [IsNull](../../t-sql/spatial-geography/isnull-geography-data-type.md)
56-
57-
- [IsValidDetailed (geography Data Type)](../../t-sql/spatial-geography/isvaliddetailed-geography-data-type.md)
58-
59-
- [Lat](../../t-sql/spatial-geography/lat-geography-data-type.md)
60-
61-
- [Long](../../t-sql/spatial-geography/long-geography-data-type.md)
62-
63-
- [M](../../t-sql/spatial-geography/m-geography-data-type.md)
64-
65-
- [MakeValid](../../t-sql/spatial-geography/makevalid-geography-data-type.md)
66-
67-
- [MinDbCompatibilityLevel (geography Data Type)](../../t-sql/spatial-geography/mindbcompatibilitylevel-geography-data-type.md)
68-
69-
- [NumRing](../../t-sql/spatial-geography/numrings-geography-data-type.md)
70-
71-
- [Reduce](../../t-sql/spatial-geography/reduce-geography-data-type.md)
72-
73-
- [ReorientObject](../../t-sql/spatial-geography/reorientobject-geography-data-type.md)
74-
75-
- [RingN](../../t-sql/spatial-geography/ringn-geography-data-type.md)
76-
77-
- [ShortestLineTo (geography Data Type)](../../t-sql/spatial-geography/shortestlineto-geography-data-type.md)
78-
79-
- [ToString](../../t-sql/spatial-geography/tostring-geography-data-type.md)
80-
81-
- [Z](../../t-sql/spatial-geography/z-geography-data-type.md)
82-
83-
## See Also
84-
[OGC Methods on Geography Instances](../../t-sql/spatial-geography/ogc-methods-on-geography-instances.md)
85-
[OGC Static Geography Methods](../../t-sql/spatial-geography/ogc-static-geography-methods.md)
86-
[Extended Static Geography Methods](../../t-sql/spatial-geography/extended-static-geography-methods.md)
20+
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)
130+
- [OGC Static Geography Methods](../../t-sql/spatial-geography/ogc-static-geography-methods.md)
131+
- [Extended Static Geography Methods](../../t-sql/spatial-geography/extended-static-geography-methods.md)
132+
- [Spatial Data Types Overview](../../relational-databases/spatial/spatial-data-types-overview.md)
133+
- [Create, Construct, and Query geography Instances](../../relational-databases/spatial/create-construct-and-query-geography-instances.md)
87134

88135

0 commit comments

Comments
 (0)