Getting the number of coordinate dimensions of a geometry/geography object in SQL Server 2008
The OGC standard has an STDimension() method defined on geometry/geography objects and this is implemented in SQL Server 2009. This function returns the inherent (or topological) dimensionality of an object: for a point this is 0; for a linestring this is 1; and for a polygon this is 2. name dim Point 0 LineString 1Read More