Search code examples
c#arcobjects

ArcObjects: Is buffering a point faster than buffering a line / polyline?


I can write my code logic to either buffer a polyline or to buffer the to and from point of the polyline. Working with the points will be easier, so it is the preferred way.

Logically my reasoning tells me that buffering a point will be faster as it will always be a perfect circle. But will buffering 2 points still be faster than buffering 1 polyline? My gut says yes.

Any comments?


Solution

  • Despite kirkktx and my logical processes, apparently our theory does not hold. I ran some benchmarks on 500 poly lines: Buffering the polyline takes about 900 ms on my machine. And buffering only the FromPoint of each polyline takes about 1000 ms. Therefore buffering 1 point in stead of a polyline is only about 10% faster. This is confusing. This means when I buffer 2 points for every polyline, it takes almost double as long as buffering the polyline itself.