-
Notifications
You must be signed in to change notification settings - Fork 341
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
Feature: function to force orientation of polygon rings #779
Comments
Some thoughts on a possible API: although On the other hand, if this logic lives in bindings like shapely, then you can already do that right now with Quoting @dr-jts from the shapely issue:
|
* Add GEOSOrientPolygons Fixes #779 Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Being able to force the orientation of rings to be (counter-)clock-wise would be useful for certain use cases (eg some file formats or applications require a specific orientation).
For reference, PostGIS has this functionality as
ST_ForcePolygonCCW
andST_ForcePolygonCW
.Shapely has this functionality as
shapely.ops.orient(..)
based on a custom python implementation (impl). But, this is currently a pure python function and not available as fast vectorized function (wrapping GEOS at the C level), and so shapely could benefit from a GEOS C API function for this (shapely/shapely#1366).GEOS already exposes a method to check for the orientation of a coordinate sequence in the C API function:
GEOSCoordSeq_isCCW
.The text was updated successfully, but these errors were encountered: