sharpmap 0.9 and sharpmap v2

Topics: Data Access, General Topics, SharpMap v0.9 / v1.x, SharpMap v2.0, Web Controls
Apr 19, 2012 at 10:11 AM

First of all, great framework

but i am little confuse.

I had tested this framework with Sharpmap 0.9 to load shapefile to MS SQL 2008 previously,

however if i am not mistaken sharpmap 0.9 do not create a geometry field but instead it create an image field as a replacement.

with a few readings from

  • http://sharpmap.codeplex.com/discussions/257108
  • http://sharpmap.codeplex.com/discussions/262634

I have the impression of having the Sharpmap v2 from

http://code.google.com/p/sharpmapv2/source/browse/#svn%2Ftrunk

should allow me to load my shapefile thru sharpmap with geometry field

after looking at the code in Data/Providers/SqlServer2008.cs it doesn't have a create function

on the MsSql.cs there is a remarks to use MsSqlSpatial.cs being that MsSql is obsolete,

in MsSqlSpatial there is Non CreateDataTable function.

 

with SharpMap0.9 i have the code below to create data table, and it create image field for geometry data. 
int count =SharpMap.Data.Providers.MsSql.CreateDataTable(shapeFile, shpItem.Destination, connstr);

I would like to upgrade my library to utilize sharpmap v2.

How do i do this on Sharpmap V2 ?
 

Developer
Apr 19, 2012 at 1:45 PM

I'm not sure that I've understand what you mean, but I'm sure that if you store spatial data in MsSql2008, as example, using Shape2SQL from: http://www.sharpgis.net/page/sql-server-2008-spatial-tools.aspx, this data is stored using native sqlserver geometry data type, and you can easily read this data with both sharpmap versions.

Apr 21, 2012 at 10:49 AM

Thanks, D_Guidi

I tried the spatial tools before but i am trying to get it an upload of shapefile to mssql 2008 and output to web browser as a WMS and Image

I got it working by re-using the CreateDataTable function found in Sharpmap 0.9

 

Anyway. Thanks. Solved. more question in another post