Skip to content

GeoPandas: implement distributed orient_polygons #3169

Closed

Description

@jiayuasu

Part of #2230.

Summary

Implement the GeoPandas-compatible GeoSeries.orient_polygons method and GeoDataFrame delegation using Sedona's native polygon-orientation expressions.

The implementation must remain fully distributed. It must not call to_geopandas(), collect(), toLocalIterator(), or a Python row UDF.

Requirements

  • Orient polygon exteriors counter-clockwise and interior rings clockwise by default.
  • Support exterior_cw=True for the opposite orientation.
  • Recursively orient polygonal members inside GeometryCollections.
  • Leave non-polygonal geometries unchanged.
  • Preserve nulls, empties, indexes, CRS, and Spark-level SRIDs.
  • Support access through both GeoSeries and GeoDataFrame.
  • Add API documentation and examples.

Tests

  • Add direct tests covering polygons with holes, multipolygons, nested GeometryCollections, non-polygon geometries, empties, nulls, index preservation, CRS/SRID preservation, and GeoDataFrame delegation.
  • Add version-gated GeoPandas parity tests where orient_polygons is available.

Activity

  1. added a commit that references this issue on Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions