Sample code that demonstrates how to buffer a randomly generated point.

using DotSpatial.Geometries;
using DotSpatial.Topology.Geometries;

private void button1_Click(object sender, EventArgs e)
        {
            Coordinate coords = new Coordinate();
            Random rnd = new Random();
            coords = new Coordinate((rnd.NextDouble() * 360) - 180, (rnd.NextDouble() * 180) - 90);
            DotSpatial.Topology.Point p = new DotSpatial.Topology.Point(coords);
            //This will get the area of the buffer.
            double area = p.Buffer(500).Area;
        }

Last edited May 20, 2015 at 8:11 PM by mbayles, version 4