Shapely has a `orient` function to make a copy of a Polygon with "proper" orientation of the rings: https://shapely.readthedocs.io/en/latest/manual.html#shapely.geometry.polygon.orient (definition in the code: https://github.com/Toblerity/Shapely/blob/b21a964a56a86cf77c67b477db7e7c2e81d2ccb5/shapely/geometry/polygon.py#L391-L404) In addition, Shapely also has a `is_ccw` (is counter clock wise) attribute on LinearRings: https://shapely.readthedocs.io/en/latest/manual.html#object.is_ccw For this, there is a GEOS C API function: https://github.com/libgeos/geos/blob/eb4da1440836fedf503e1eb2c245595a0f33db5e/capi/geos_c.h.in#L351-L357 (although Shapely implements it manually by calculating the signed area)
Shapely has a
orientfunction to make a copy of a Polygon with "proper" orientation of the rings: https://shapely.readthedocs.io/en/latest/manual.html#shapely.geometry.polygon.orient (definition in the code: https://github.com/Toblerity/Shapely/blob/b21a964a56a86cf77c67b477db7e7c2e81d2ccb5/shapely/geometry/polygon.py#L391-L404)In addition, Shapely also has a
is_ccw(is counter clock wise) attribute on LinearRings: https://shapely.readthedocs.io/en/latest/manual.html#object.is_ccwFor this, there is a GEOS C API function: https://github.com/libgeos/geos/blob/eb4da1440836fedf503e1eb2c245595a0f33db5e/capi/geos_c.h.in#L351-L357 (although Shapely implements it manually by calculating the signed area)