Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geodesic polygon buffer #3

Open
morganherlocker opened this issue Jun 1, 2014 · 1 comment
Open

geodesic polygon buffer #3

morganherlocker opened this issue Jun 1, 2014 · 1 comment

Comments

@morganherlocker
Copy link
Member

No description provided.

@aparshin
Copy link

aparshin commented Feb 5, 2015

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:

  • More accurate segment buffer should be constructed for long segments (in fact, it is more theoretical issue then real use case)
  • The algorithm is really slow!

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:

  • split geometry into small enough pieces (relative to the Earth size)
  • project each peace to local orthographic projection
  • apply classical buffer from JSTS
  • project resulting buffer back to geographic projection
  • union buffers

What do you think about this? Maybe, you have any other ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants