You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some debugging and searching, I realized that the polygons in this related issue (#1372) are defined as using Polygon = bg::model::polygon<Point, false, false>. However, the documentation defines the polygon type as typedef boost::geometry::model::polygon<point> polygon, which doesn’t specify the orientation of the vertices.
To resolve the issue, I changed the polygon definition to using polygon = boost::geometry::model::polygon<point, false>, ensuring the polygon is defined as counter-clockwise. Alternatively, adjusting the vertex order of my input polygon to counter-clockwise also solved the problem.
It would be very helpful if the buffer function could support both clockwise and counter-clockwise ordered polygons, or if this behavior could be clarified in the documentation. It would greatly assist newcomers like myself.
Here’s my (non-working under 1.87 and 1.82) version of the code for reference:
Your clarification of the polygon concept has resolved the confusion I had, as I was mistakenly associating it with the behavior in the Python Shapely library.
I'm confident this issue will be useful for anyone else who might make the same mistake I did.
Dear Boost Geometry Developers,
First, I’d like to thank you for all the hard work you’ve put into Boost—it’s been invaluable to the community!
I’m new to Boost Geometry and encountered an issue while trying to buffer a polygon. I was following the documentation (https://beta.boost.org/doc/libs/1_82_0/libs/geometry/doc/html/geometry/reference/algorithms/buffer/buffer_7_with_strategies.html), and surprisingly, the example polygon worked as expected, but the polygon I created didn’t.
After some debugging and searching, I realized that the polygons in this related issue (#1372) are defined as
using Polygon = bg::model::polygon<Point, false, false>
. However, the documentation defines the polygon type astypedef boost::geometry::model::polygon<point> polygon
, which doesn’t specify the orientation of the vertices.To resolve the issue, I changed the polygon definition to
using polygon = boost::geometry::model::polygon<point, false>
, ensuring the polygon is defined as counter-clockwise. Alternatively, adjusting the vertex order of my input polygon to counter-clockwise also solved the problem.It would be very helpful if the buffer function could support both clockwise and counter-clockwise ordered polygons, or if this behavior could be clarified in the documentation. It would greatly assist newcomers like myself.
Here’s my (non-working under 1.87 and 1.82) version of the code for reference:
The result is:
The text was updated successfully, but these errors were encountered: