I've implemented a prototype of geodesic buffer here: https://github.com/aparshin/turf-buffer/tree/geodesic
There is a Leaflet page for debug added there, but it requires to browserify sources (browserify index.js --standalone buffer > bundle.js).
The algorithm is simple: manually construct geodesic buffers for each line segment (taken from artisinal branch) and then union them using JSTS (CascadedPolygonUnion can be used to speedup things a little).
There are couple issues with this implementation:
More accurate segment buffer should be constructed for long segments (in fact, it is more theoretical issue then real use case)
Hello Morgan,
I've implemented a prototype of geodesic buffer here: https://github.com/aparshin/turf-buffer/tree/geodesic There is a Leaflet page for debug added there, but it requires to browserify sources (
browserify index.js --standalone buffer > bundle.js
).The algorithm is simple: manually construct geodesic buffers for each line segment (taken from
artisinal
branch) and then union them using JSTS (CascadedPolygonUnion can be used to speedup things a little). There are couple issues with this implementation:We had implemented similar algorithm in our Web-GIS and faced performance problem. Here is my question in JSTS mailing list about possible faster algorithms: http://sourceforge.net/p/jts-topo-suite/mailman/message/31906899/
I think the following variant will be faster for small and medium-size geometries:
What do you think about this? Maybe, you have any other ideas?