Skip to content

Vertex order of Polygon.from_bounds differs between shapely versions,… - #540

Open
EmileSonneveld wants to merge 1 commit into
masterfrom
test_get_bounding_box_fix
Open

EmileSonneveld wants to merge 1 commit into
masterfrom
test_get_bounding_box_fix

Conversation

@EmileSonneveld

@EmileSonneveld EmileSonneveld commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

… so compare geometrically or use normalize.
Master branch started failing: https://jenkins.vgt.vito.be/job/openEO/job/openeo-python-driver-python311/job/master/ This should fix it
This is probably due to a shapely update. It does not happen when doing pip install "shapely==2.1.0" nor pip install "shapely==2.1.2"
Thapely 2.2 was released a few hours ago https://pypi.org/project/shapely/#history

@EmileSonneveld

Copy link
Copy Markdown
Member Author

@soxofaan Do you think it is safe to let the update to shapely 2.2 happen, or should we pin 2.1.2 for a while?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused test changes preserve meaningful validation while removing version-dependent vertex ordering assumptions.

Review effort: Balanced
Findings: None

What changed in this PR

Updates geometry assertions to tolerate equivalent vertex ordering across Shapely versions.

Changes:

  • Normalizes feature geometries before comparison.
  • Uses geometric equality for bounding-box GeoJSON.
File Description
tests/​util/​test_geometry.py Normalizes geometries in affected assertions.
tests/​test_vectorcube.py Replaces order-sensitive comparison with geometric equality.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants