Freigeben über


SQL Spatial Data Visualiser Updates

I've updated the page I posted yesterday so the app now supports POINT, LINESTRING and POLYGON (simple POLYGONs with no interior boundaries - ie the image on the left (below) is okay, the image on the right is not).

Picture1

I've also posted the source for an ASP.NET 3.5 website to visualise the spatial data in your SQL Server 2008 database. Here's a highly sophisticated architecture diagram:

Picture2

It has one aspx page to display the visualisation and a web service to query the db and return the results to the client. On the client there's some Javascript to parse the array of WKT strings that come back from the webservice and create them as shapes in Virtual Earth. All you need to do is modify the ConnectionString and CommandString in SpatialDataService.asmx.cs to match your requirements.

MaxJsonLength limits the number of shapes you can plot as the array of strings is serialised as one big lump of JSON. If you need to be able to visualise more shapes simultaneously you'll probably want to refactor the code to make multiple calls to the service.

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

Comments