27

What is difference between GEOMETRY and GEOGRAPHY in SQL Server 2008?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
saran
  • 1,273
  • 4
  • 19
  • 34

2 Answers2

42

GEOMETRY is for planar spatial data (that is, data on a flat surface)

GEOGRAPHY is for terrestrial spatial data (that is, data on the (curved) surface of the Earth)

See eg here, here for more.

AakashM
  • 62,551
  • 17
  • 151
  • 186
  • 10
    +1 for the plain english description - it's Friday afternoon and I don't even want to look at words like geodetic and ellipsoidal ! :-) – paulH May 24 '13 at 14:47
19

Read the wonderful manual at:

http://msdn.microsoft.com/en-us/library/bb933790.aspx

The geometry Data Type

The geometry data type (planar) supported by SQL Server conforms to the Open Geospatial Consortium (OGC) Simple Features for SQL Specification version 1.1.0.

For more information on OGC specifications, see the following:

* OGC Specifications, Simple Feature Access Part 1 - Common

Architecture * OGC Specifications, Simple Feature Access Part 2 – SQL Options

The geography Data Type

The geography data type (geodetic) stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates.

It comes down to what model of the earth you're using - a planar or geodetic one.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459