Eye Candy of the Highest Order
One of the most common questions about the spatial support in SQL Server is how to visualize results. To illustrate the problem, consider a query over zip code data:
select id, shapegeog from zipcodes where id like '981%'
The results, while an accurate description of the data, are profoundly unhelpful:
We can improve the human readability of this by fetching WKT instead of the original geography data:
While we can now read it, it still doesn't mean much. Unlike social security numbers or names, visualization is almost required if you want to understand spatial data. And if you really want to visualize the data, our only avenue has been to make use of an external program, such as Virtual Earth. It's not super hard to make a mashup with VE, but it is another step.
Thanks to some very hard work of a number of people, a very late feature has been slipped into the server: a map control. With the map control, if you run the query, you get the following:
And the magic reveals itself when you click that mysterious "Spatial result" tab:
These maps are interactive: you can zoom; you can pan; you can even label the results. It isn't aimed at reporting, and this isn't a reusable component that can be used in other applications, but it can be invaluable in giving you a feel for what your results look like. It goes far beyond eye candy: it actually allows you to understand your data.
Unfortunately, it's a bit of a tease at the moment: the code just went in, which means none of this will be available in our upcoming RC0. It will be in RTM, however, so you shouldn't have to wait too long.
I can claim precious little credit for this, but if you're at TechEd this week, I'd be happy to demo it for you. So would Goldie Chaudhuri, who actually led the effort.