geography.STDimension
spatial method STDimension (instance.STDimension(...))
What changes
- Input
- spatial instance (and arguments)
- Output or change
- int
- Return type
- SQL Server return type: int CLR return type: SqlInt32
Syntax at a glance
.STDimension ( )
Work example
Use geography.STDimension to read the topological dimension of a shape.
Route point, curve, and surface handling from the result. Keep the geography type and SRID in the review.
Check your work A polygon has topological dimension 2.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT p.shape.STDimension() AS topological_dimension FROM (VALUES (geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326))) AS p(shape);
Open Microsoft Learn for full syntax, permissions, and details for your version.