CODE examples wanted..... please add small things of what u want to share

Sep 20, 2012 at 12:00 AM
Edited Sep 22, 2012 at 2:53 AM

In my hunt to understand many aspects of dotspatial i want to ask u all to drop codesamples here with a short description of what it does....... Also the goal should be to draw more programmers to dotspatial.....

leave a title in bold please

Sep 22, 2012 at 2:52 AM
Edited Sep 22, 2012 at 2:53 AM

VB: CREATING POINTSHAPE AND ADDING COLUMNS AND FILL IT FROM A LIST

        Dim count As Long
        Dim filename As String = Form1.txtPadFileNaam.Text & Form1.txtGPPverschilNaam.Text & "_GPPs.shp"
        Dim fs As New FeatureSet(FeatureType.Point)
        'Voeg kolommen toe
        Try
            fs.DataTable.Columns.Add(New DataColumn("ID", GetType(System.Int64)))
            fs.DataTable.Columns.Add(New DataColumn("Xgpp", GetType(System.Double)))
            fs.DataTable.Columns.Add(New DataColumn("Ygpp", GetType(System.Double)))
            fs.DataTable.Columns.Add(New DataColumn("dBref", GetType(System.Single)))
            fs.DataTable.Columns.Add(New DataColumn("dBvar", GetType(System.Single)))
            fs.DataTable.Columns.Add(New DataColumn("dBverschil", GetType(System.Single)))
            'Set projection
            fs.Projection = Form1.myVenster.Projection
            'Aantal GPPs 
            For count = 0 To GPPlijst.Count - 1
                'Per GPP
                Dim c As New Coordinate(GPPlijst(count).GPPx, GPPlijst(count).GPPy)
                Dim ff As IFeature = New Feature(c)
                ff = fs.AddFeature(ff)
                ff.DataRow.BeginEdit()
                ff.DataRow("ID") = count + 1
                ff.DataRow("Xgpp") = GPPlijst(count).GPPx
                ff.DataRow("Ygpp") = GPPlijst(count).GPPy
                ff.DataRow("dBref") = GPPlijst(count).GPP_dBref
                ff.DataRow("dBvar") = GPPlijst(count).GPP_dBvar
                ff.DataRow("dBverschil") = GPPlijst(count).GPP_dBverschil
                ff.DataRow.EndEdit()
                ff = Nothing
            Next
            fs.SaveAs(filename, True)
            Form1.myVenster.AddLayer(filename)