I have a problem with reading data from sql server..I can read them as WKT but for converting them to featureset I have a problem.I can not convert WKT to a polygon feature in case of adding them to featureset..Can you help me with it?
Comments: ** Comment from web user: am2 **
thanks my friend.I managed to convert wkt to feature using this code:
```
GeoAPI.GeometryServiceProvider.Instance = NetTopologySuite.NtsGeometryServices.Instance;
MsSql2008GeometryReader GeometryReader12 = new MsSql2008GeometryReader();
SqlChars c = new SqlChars(new SqlString("POLYGON((51.4887293894 30.9997168556,51.4887477458 30.9997136705,51.4887883980 30.9997230582,51.4889787510 30.9997773729,51.4890008792 30.9998045303,51.4890202414 30.9998793807,51.4890125301 30.9999223799,51.4889886416 30.9999666363,51.4889934193 30.9999968112,51.4889883064 31.0000137426,51.4889734704 31.0000385530,51.4889313094 31.0001040995,51.4888954349 31.0001751781,51.4888603147 31.0001740046,51.4888259489 31.0001836438,51.4888432994 31.0002047662,51.4888740610 31.0002349410,51.4888588898 31.0002617631,51.4888272900 31.0003063548,51.4887743164 31.0003829654,51.4887251146 31.0004558880,51.4885977097 31.0003893357,51.4885729831 31.0003474262,51.4886485878 31.0002791137,51.4886403736 31.0002317559,51.4886150602 31.0002399702,51.4886107855 31.0002448317,51.4886055049 31.0002476815,51.4886086900 31.0002462566,51.4886048343 31.0001998208,51.4886031579 31.0000854917,51.4886187483 31.0000161733,51.4886321593 30.9999606013,51.4886422176 30.9999166802,51.4886324946 30.9998564143,51.4886183292 30.9998272453,51.4885941893 30.9998075478,51.4885769226 30.9997673146,51.4885925967 30.9997584298,51.4886588138 30.9997471143,51.4887236059 30.9997206274,51.4887286350 30.9997198731,51.4887293894 30.9997168556))"));
SqlGeometry wkt=SqlGeometry.STGeomFromText(c, 4326);
IBasicGeometry geom = GeometryReader12.Read(wkt).ToDotSpatial();
FeatureType res = geom.FeatureType;
FeatureSet Fset = new FeatureSet(res);
Fset.AddFeature(geom);
Fset.Projection = DotSpatial.Projections.ProjectionInfo.FromEpsgCode(4326);
IMapFeatureLayer lay = map1.Layers.Add(Fset);
map1.ZoomToMaxExtent();
```