I'm looking for a .net library that will help to create a polygon that I can use as a Geo-fence around a route on a map.

The following image demonstrates the result I'm after. Imagine that this polygon was projected from a line string that defined a route on a map.

I've not done any GIS mapping work before, so I'm really quite lost even as where or what to look for.


Ok, I've had a quick look and seem to have something working. The code to generate a polygon as a buffer around the linestring is pretty simple.

var line = new LineString(points);
var bufferOp = new BufferOp(line);
var buffer = (Polygon)bufferOp.GetResultGeometry(.00001);

But what confuses me now is the distance parameter to GetResultGeomotry. In the above code I'm specifying .00001 as the distance.. this is the only way I could get a reasonable result.

What unit of measure is that?

  • 1
    Looks like Buffer operation from the NetTopologySuite would do the work – Hen Wagner Jan 10 '16 at 12:20
  • How about DotSpatial? – Farid Cheraghi Jan 10 '16 at 13:11
  • @HenWagner thanks for the tip - I've had a look at DotSpatial and updated the question – jflood.net Jan 11 '16 at 9:27
  • Hi @jflood.net, did you find an explanation for the distance factors and units? If I want to draw a buffer of 500 meters, what would be the formula for that distance? – Fausto R. May 19 '17 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.