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

Creating Shapefile from FeatureDataTable

Topics: SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0
Jun 11, 2015 at 9:10 AM
Edited Jun 11, 2015 at 9:59 AM
A requirement to save a FeatureDataTable to a shapefile
I tried using this bt its not working any other method
shapefiledatawriter doesnot exist in latest sharpmap providers
   Public Sub CreateShpFromDataTable(ByRef ft As FeatureDataTable, ByVal strFile As String)

   Dim f As New DotSpatial.Data.Feature()
   Dim fs As New DotSpatial.Data.FeatureSet(f.FeatureType)

   For Each row As FeatureDataRow In ft.Rows
        For x = 0 To row.ItemArray.Count - 1
            f.DataRow.Item(x) = row.Item(x)
        f.BasicGeometry = row.Geometry
   fs.SaveAs(strFile, True)
   End Sub
Jun 13, 2015 at 3:34 PM
Edited Jun 13, 2015 at 3:34 PM
was helpful but sharpmap 1.1 and nts 1.3.3 and higher are not compatible
suggest a solution please
Jun 15, 2015 at 7:29 AM
you need to add a reference to this nuget package