Get Spatial Position for Geography Data Type in SQL 2008
By : Kasim Wirama, MCITP, MCDBA
SQL Server 2008 introduces new data type, one of them is regarding to position and area, which are geometry and geography data type. Geometry data type covers could be used for small area whereas geography should be used when you need to cover a big area in your database solution, such as between 2 towns or even spanning across countries. This posting discuss about geography data type, specifically to show where you could get your latitude and longitude which are used across a globe.
There are many tools to help you to determine latitude and longitude of an object position on earth. One of them is idvSolutions Spatial wiki. The url is http://silverlight.idvsolutions.com/. The url uses silverlight technology. If your browser doesn’t have silverlight installed, you need to download silverlight from http://www.microsoft.com/silverlight/ and install the add-on into your browser.
You will find out world map at the website.

Click new button (near upper right corner) to start determine position of an object in world map. For example, I would like to draw area of Madagascar Island. Fill in Title (at least), so I fill into the textbox as Madagascar Island. Next click drawing tool to select Area as shown on the following screenshot.

Click OK button, and click Save button to save the area into website and wait for some time as shown in pic below.

Now, the item (titled : Madagascar Island) has been saved into the website. The next step is to export latitude and longitude data into SQL Server 2008 geography data type format by clicking icon beside the item as shown at below screenshot

Choose SQL Server 2008 and click open to see geography data which is ready as input into SQL Server 2008 geography spatial data type below.


That’s the geography data we get, you need to get map as well. One of website that provide map is http://www.openstreetmap.org/. it is open source project, from there you could get global map.