Turfjs / turf-buffer

Buffers a point, linestring, or polygon Feature/FeatureCollection to a given radius. Units supported are miles, kilometers, and degrees.
MIT License
22 stars 27 forks source link

Circular Buffer - and not an elliptical #7

Open yanaybrook opened 9 years ago

yanaybrook commented 9 years ago

This is known issue in many other programs as well (mySql for example) I'm well aware of the Geographic Vs UTM measurement problem. Example of a buffer of 1 miles using turf-buffer & turf distance. buffer2

TylerHumphry commented 9 years ago

So what is the solution?

morganherlocker commented 9 years ago

There is a branch that solves this for points and linestrings. @TylerHumphry if you need to, you could use that code: https://github.com/Turfjs/turf-buffer/pull/4

Polygon buffers are still a work in progress (the algorithm is particularly challenging).

TylerHumphry commented 9 years ago

Thanks for responding with a solution so quickly. I would certainly jump on that, but I really have no idea how to use the code you referenced. I was using the turf.buffer method because it was so user friendly; guess I will just wait till it is patched.

Themacprod commented 9 years ago

Hi,

I was about to open an issue about this. I wrote this small jsfiddle to show what I get from turf and the algorithm I'm using to get a circular buffer.

http://jsfiddle.net/Themacprod/hy7vsa5m/3/

benj-d commented 8 years ago

Has anyone ( @TylerHumphry (?) ) figured out how to adapt the code referenced by @morganherlocker for use as js (web referenced) library? I'm not familiar with node.js and cant get "browserify" to work on it (missing modules).

mclaeysb commented 8 years ago

Hi there! I gave it a try, see #33

floledermann commented 7 years ago

Has this been fixed for point buffers at some point? (no pun intended :smile: ) I am seeing a correct circular buffer using the latest release, but all of the issues mentioning this are still open... should this particular issue be closed? (I believe geodesic buffering has not been solved for the general polygon case yet)

omar-alnayme commented 3 years ago

There is a branch that solves this for points and linestrings. @TylerHumphry if you need to, you could use that code: #4

Polygon buffers are still a work in progress (the algorithm is particularly challenging).

Hi, is the point buffer fixed?