Freigeben über


SQL Spatial Data Visualiser

Hot on the heels of my Sql Spatial Data Generator comes my Sql Spatial Data Visualiser! Well, sort of. A couple of people have asked me for this but it's not that easy to create an app that lives in the cloud and queries other people's SQL Servers in order to visualise their spatial data. That's as it's meant to be.

So what I've done instead is hacked (and I mean that in the truest sense) together a sample page which can take a simple Well Known Text (WKT) POLYGON and render it on a Virtual Earth map. Here for example is a representation of Wales:

Picture1

It is very limited at the moment and not terribly useful TBH. Just for kicks you can create a POLYGON in the Spatial Generator and then copy the resulting WKT in the generated SQL statement to the visualiser to see it working. But beyond that it's a little limited.

However, slightly more useful is the solution I created which includes a web service to query SQL Server and return the WKT string. Using similar techniques to the above it's pretty straightforward to then parse this string in Javascript and render the resulting shape in Virtual Earth. Again it's limited in its capabilities right now (it just deals with simple POLYGONs) but it would be easy to extend. I'll post the code after I've had the chance to tidy it up a little.

Technorati Tags: sql server 2008,spatial,virtual earth,windows live

Comments

  • Anonymous
    May 30, 2008
    I've updated the page I posted yesterday so the app now supports POINT, LINESTRING and POLYGON (simple