SQL Server 2012 New Spatial Instantiable Data Types¶
Spatial data represents information about the physical location and shape of geometric objects. These objects can be point locations or more complex objects such as countries, roads or lakes. SQL Server supports two spatial data types, introduced in SQL Server 2008, namely the geometry data type and the geography data type. The geometry type represents data in a Euclidean (flat) coordinate system while the geography type represents data in a round-earth coordinate system.
SQL Server 2012 introduces three new spatial instantiable types, namely CircularString, CompoundCurve and CurvePolygon. These three new instantiable types are circular arc segments. A circular arc segment is defined by three points in a two dimensional plane and the third point cannot be the same as the first point. Methods operating on circular arc segment types use straight line segments to approximate the circular arc. The number of line segments used to approximate the arc will depend on the length and curvature of the arc.
CircularString¶
A CircularString is a collection of zero or more continuous circular arc segments. A circular arc segment is a curved segment defined by three points in a two-dimensional plane; the first point cannot be the same as the third point. If all three points of a circular arc segment are collinear, the arc segment is treated as a line segment. Valid circular strings will always have an odd number of points, three or greater.
CompoundCurve¶
A CompoundCurve is a collection of zero or more continuous CircularString or LineString instances of either geometry or geography types. An empty CompoundCurve instance can be instantiated, but for a CompoundCurve to be valid it must contain one CircularString or LineString instance and the sequence of CircularString or LineString instances must be continuous.
CurvePolygon¶
A CurvePolygon is a topologically closed surface defined by an exterior bounding ring or more interior rings. The interior of the CurvePolygon instance is the space between the exterior ring and all of the interior rings. A CurvePolygon instance is similar to a Polygon instance in that both have at least one ring and zero or more holes (inner rings). However, a CurvePolygon instance differs from a Polygon instance in that a CurvePolygon instance may contain the following circular arc segments: CircularString and CompoundCurve.