This project has moved and is read-only. For the latest updates, please go here.

Shapefile Output

Nov 5, 2008 at 4:44 AM
Any idea how to produce a shapefile from SQL Server 2008 without using a software package like FME or manifold?  Postgis has a stored procedure which can do this.  I think it would be incredibly useful to be able to do this even if output was only in WGS 84 DD projection (SRID 4326).  Any ideas?

Nov 5, 2008 at 5:19 PM
The SqlSpatial Query Tool can do this. Just perform a query and export the result. Just a warning though: it's not very well tested and very beta. Most data types are converted to strings and Z and M values are also stripped.
Nov 6, 2008 at 4:27 AM
Maybe I should have phrased my question better.  I'm looking at developing functioanlity within my own application that does this so I'm looking for a SQL stored procedure or .net class that can do this (build a shapefile from table with geometry or geography field).  It looks like MsSQLSpatial talks about potentially adding this functionality at some time but hasn't yet.  Is there anyway to get a hold of the source of SqlSpatialQuery Tool, Specifically the classes which allow creation of shape files?  Postgres does this already and I would think that it would be very powerful for SQL Server to do the same.   Anybody in SQL Server Spatial tools up for the challenge?

Nov 28, 2008 at 12:36 PM
Edited Nov 28, 2008 at 12:37 PM
You should be able to do this with a  SharpMap v2. Read from an MsSqlServer2008Provider and write to a ShapeFileProvider

Z and M values are not currently supported though.

hth jd