Brendan Long
Brendan Long

Reputation: 54242

How to get type of geometry in SQL Server?

I'm working with the geometry types in SQL Server and I'm wondering if there's any function to tell what kind of geometry something is (point, multipoint, polygon, etc.)?

Upvotes: 5

Views: 8045

Answers (1)

AakashM
AakashM

Reputation: 63338

Looks like you want STGeometryType:

The OGC type names that can be returned by STGeometryType() are Point, LineString, Polygon, GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon.

Upvotes: 9

Related Questions