This project is read-only.

function of buffer

Apr 23, 2013 at 10:44 AM
how can i creat buffer of a shapefile?
Apr 23, 2013 at 11:31 AM
You can create buffer through IGeometry.

For Example:

Dim g As IGeometry = GeometryFactory.Default.CreatePoint(CenterPoint)
g = g.Buffer(Radio)

Or

Dim g As IGeometry = GeometryFactory.Default.CreateLineString(PathCoord)
g = g.Buffer(Radio)

Claudio
Apr 24, 2013 at 9:39 PM
actually i have a shapfile and i want to creat buffer around ,i have this code but give me this error:point array must contain 0 or >1 elements IFeatureSet fs2 = FeatureSet.Open(filename1); fs2=fs2.Buffer(20,true);
Jun 3, 2013 at 3:04 AM
Anyone has a solution on how to buffer round a line shape?
Jun 3, 2013 at 3:20 AM
I assume thus is old code as u can found in the example page of dotspatial, see documentation
            'Declare a new feature set
            Dim fs As New FeatureSet()
            fs.FillAttributes()
            'Pass in the file path for the standard shapefile that will be opened
            FeatureSet.Open(Me.txtPadFileNaam.Text & MaatregelPunten & "_maatregelpunten" & ".shp")
            'An IFeatureSet that contains the factory that will buffer the feature set
            Dim [iF] As IFeatureSet = fs.Buffer(MaatregelPunten * (Me.TrackBarStaafjeUitklapFactor.Value) / 600, True)
            'Saves the buffered feature set as a new file.
            [iF].SaveAs(sfilename2, True)

            Me.myVenster.AddLayer(sfilename2)
Jun 3, 2013 at 3:25 AM
THis worked for me
            Dim g As IGeometry = GeometryFactory.Default.CreateLineString(coord)
            g = g.Buffer(distanceFORbuffer)
            fs.Features.Add(g)
            fs.SaveAs(sFilename, True)
            Form1.myVenster.AddLayer(sFilename)
Feb 24, 2014 at 7:09 AM
Dear Joska,

I have followed your above code on button click event. It will be nice if u help me to know what is "coord" in first line.

Regards,
Dheeraj