Geometry

<< Click to Display Table of Contents >>

Navigation:  Connectors > MS SQL Server >

Geometry

 

There are two categories of objects that are interpreted as geometries in MS SQL Server:

 

Geometry

Geography

Compliant with the ST_GEOMETRY standard

Compliant with the ST_GEOMETRY standard

Accessible as WKT

Accessible as WKT

Strictly euclidean

Strictly geodetic

Coordinates represent (x, y) or (x, y, z)

Coordinates represent (lon, lat) or (lon, lat, elv)

If specified, coordinate system must be in length units

If specified, coordinate system must be in degrees

 

The DTS  MS SQL Connector transforms both categories to DTSGeoJson for transfer, but keeps track of the them as different internal types (DTS_GEOMETRY, DTS_GEOGRAPHY) in order to correctly interact with MS SQL Server and other data sources which similarly differentiate spatial data.

 

Geometry Types

 

Here is how MS SQL geometry and geography subtypes map to GeoJson geometry types.

 

ST Subtype

Interpretation

GeoJson Geometry Type

POINT

Single point

Point

MULTIPOINT

Multiple points

MultiPoint

LINESTRING

Sequence of straight lines without gaps

LineString

CIRCULARSTRING

Sequence of circle arcs without gaps

LineString + DTS corrections

MULTILINESTRING

Multiple LINESTRINGs (not necessarily connected)

MultiLineString

COMPOUNDCURVE

Sequence of connected LINESTRINGs and CIRCULARLINESTRINGs

MultiLineString + DTS corrections

POLYGON

Polygon (with or without holes)

Polygon

CURVEPOLYGON

Polygon whose boundaries can contain circle arcs

Polygon + DTS corrections

MULTIPOLYGON

Multiple POLYGONs

MultiPolygon (+ DTS corrections)

GEOMETRYCOLLECTION

Collection of any of the above

GeometryCollection (+ DTS corrections)

 

Z and M modifiers (e.g. POINT Z) are supported for all geometry types (except GEOMETRYCOLLECTION where they are not applicable), but the M values are always ignored and processing geometries with Z values has certain limitations.

 

Information-icon_16px Further reading:

MSSQL Spatial Data Types Overview

DTS Geometry Overview