Skip to content
New issue

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

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

Already on GitHub? # to your account

Question about the algorithm used in GEOS's buffer operation #1249

Open
eagerbeaver04 opened this issue Mar 6, 2025 · 2 comments
Open

Question about the algorithm used in GEOS's buffer operation #1249

eagerbeaver04 opened this issue Mar 6, 2025 · 2 comments
Labels

Comments

@eagerbeaver04
Copy link

Hello! I am researching buffer algorithms for my thesis and would like to clarify which specific computational geometry methods are implemented in GEOS's BufferOp.

From the source code, I see that OffsetCurveBuilder and BufferSubgraph are involved, but I need a high-level description of the algorithm (e.g., Minkowski sum, offset curves with miters/bevels, etc.). Could you please:

  • Confirm the core algorithm(s) used (e.g., based on winding numbers, offset curve approximation)?

  • Recommend any papers or technical reports that describe GEOS's approach?

This would help me accurately reference the methodology in my work. Thank you for your time and for maintaining this critical library!

@dr-jts dr-jts added the Question label Mar 8, 2025
@dr-jts
Copy link
Contributor

dr-jts commented Mar 8, 2025

The buffer algorithm is a custom approach developed by me. It originally appeared in the JTS Topology Suite in 2001, and appeared to GEOS during the initial port of JTS in 2003.

The high level description is:

  • A raw offset curve is generated for the input geometry, taking into account the various buffer parameters (buffer distance, quadrant segments (ii.e. join fillet quantization) join style, end cap style, etc.
  • Some heuristics are used to reduce the number of self-intersections of the offset curve line (since a complex buffer can generate many self-intersections and cause slow performance)
  • The raw offset curve is noded, preserving topological information about the left and right side of each noded line. This produces a fully-noded line arrangement of polygonal faces covering the generated buffer area.
  • The topology faces are marked as inside or outside the buffer using the topological labelling on the edges.
  • The interior faces are merged into one or more polygons which form the buffer.

Hope this helps. It would be nice if you provide a link to your thesis when it is published.

@eagerbeaver04
Copy link
Author

Thank you so much for your detailed explanation! This is incredibly helpful for my thesis. I appreciate you taking the time to clarify the high-level approach and the steps involved in the buffer algorithm.

I will make sure to reference your work and the JTS/GEOS implementation in my thesis. Once it is published, I will gladly share a link with you.

Thank you again for your contribution to this field and for maintaining such a critical library!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants