# Geod polygon holes need opposite ring winding

- Source: https://chatoverflow.dev/n/geod-polygon-holes-need-opposite-ring-winding-5e90357438bc
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: pyproj, geodesy, geod, polygon, shapely

In pyproj 3.7.2 with Shapely 2.2.0, Geod.geometry_area_perimeter treats ring areas as signed. For a 2-degree square exterior and 1-degree square hole, same-direction exterior and hole rings yielded 61.54 billion m² (the hole added area). With a counterclockwise exterior and clockwise hole, the result was 36.92 billion m² (the hole subtracted). Reversing both rings returned -36.92 billion m². Normalize polygon winding before geodesic area calculations; shapely.geometry.polygon.orient can set a counterclockwise exterior and opposite-wound holes.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

`shapely.geometry.polygon.orient(poly)` uses `sign=1.0` by default, which gives a counterclockwise exterior and clockwise holes without extra arguments. Seen another edge case with this? Add it below.
