Spatial - SimonS Blog on SQL Server Stuff

Browse by Tags

All Tags » Spatial (RSS)

Spatial data where to download

I'm going to build a list of locations to download spatial data for free. This is the first http://arcdata.esri.com/data_downloader/DataDownloader?s=s&service=ESRI_World It allows you to downloads country boundaries, roads, water bodies and cities...
Posted by simonsabin | 1 comment(s)
Filed under:

SQL Server 2008 Spatial - STContains for Geography type

Where is the STContains function for the Geography type. I don't know but its not in Sql Server 2008. As a workaround you can use STIntersection and compare the results with the geography you are comparing with i..e declare @g geography = 'POLYGON((0...
Posted by simonsabin | 3 comment(s)
Filed under:

Viewing Geometries on Virtual Earth

One of the biggest challenges in understanding spatial data is visualising shapes. In 2D it isn't two bad, and I have started the SpatialViewer project on codeplex ( http://www.codeplex.com/SpatialViewer ) However visualising Geography types requires...

SQL Server 2008 Spatial - How to create a circle?

How do you create a circle in a planar system. Ok so there are some funky algorithms for creating a set of points all the way round the circle. Well there is a much easier way. Create a point i.e. POINT (10 10) and the use the STBuffer(radius) method...

SQL Server 2008 Spatial - Performance of database calls follow up

I recently blogged about the performance of passing spatial data to the database.( SQL Server 2008 Spatial - Performance of database calls? ) In it I found that the the performance radically dropped off as the number of points increases. Whilst this was...

SQL Server 2008 Spatial - Performance of database calls?

There are 4 ways of holding spatial data, Well Known Text (WKT), Well Known Binary (WKB), Geography Markup Language and the base spatial type (SqlGeometry or SqlGeometry). This leads me on to the question how should you pass the data to SQL Server. I...

SQL Server 2008 Spatial - Which is faster WKT or WKB?

I've just posted two methods for creating geometries in client code. The examples use Stylus points from an ink canvas but any collection of points will go. After doing that I ran some tests to compare the two. I found that in generally the WKB method...

SQL Server 2008 Spatial - Converting from Ink Strokes to geometries

The following snippet will convert an strok collected using an Ink Canvas in WPF to a LINSTRING geometry. The first uses the Well Known Text format WKT. //Text representation of a line is LINESTRING (x1 y1,x2 y2 x3 y3....) //create an string array to...
Posted by simonsabin | with no comments

SQL Server 2008 Spatial - Using it in .Net code

So you want to use the SqlGeometry and SqlGeogrpahy collections in .Net. I found the lack of friendly collection based properties and methods suprising, i.e. no iterators, no collections which you can add to.( http://sqlblogcasts.com/blogs/simons/archive...

SQL Server 2008 Spatial - How many ways to make your point?

The spatial functionality is hugely standards based. There spatial standards are well established what this means is that there are many methods to support the standards. One of the areas that you will see this is the creation of spatial data. To create...

SQL Server 2008 Spatial - List of spatial referneces

For a list of spatial references and their definitions including units of measure have a look at the system view select * from sys.spatial_reference_systems if ((typeof(socialButtons))!="undefined") { socialButtons(); } - google_ad_client = "pub-9351707026400773...
Posted by simonsabin | 1 comment(s)
Filed under: ,

SQL Server 2008- What is a spatial reference?

A friend recently emailed me after trying out the new spatial stuff in Katmai asking why the distance from Beaverton to Boston was 51, and any way 51 what. On looking at his code I realised he had used the Geometry type and not the Geography type. The...
Posted by simonsabin | with no comments
Filed under: , ,

SQL Server 2008 Spatial - Got a question?

If you got a question about the spatial stuff in SQL Server 2008 make sure you visit the msd Spatial forum http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1629&SiteID=1 The guys from the team that developed it hang out there so you should...

Katmai Spatial - Whats a dimension?

When you read the specs for the spatial stuff (BOL has some incorrect links) some of the methods talk about min and maximum geometry dimensions. I must have been doing too much analysis services stuff and for the life of me I couldn't figure out what...
Posted by simonsabin | with no comments

Katmai Spatial - What's a geometry

Following on my previous post on discovering the spatial types I mention that one of the aspects to understand is the different types of geometries. Point Fairly this is obvious its a single spot that has an X and a Y co-ordinate. Multi Point A group...
More Posts Next page »