tags:

views:

150

answers:

2

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?

+1  A: 

I'm quite certain point buffering is faster. Buffering a polyline requires creating offset parallel lines, then unioning them together into a ring - a lot more computation.

Kirk Kuykendall
A: 

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.

Jacques Bosch