Shapely-like __geo_interface__#32
Merged
mindflayer merged 2 commits intomainfrom Dec 10, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR converts __geo_interface__ from a method to a property across all geometry classes to match Shapely's API design. This is a breaking API change that aligns ToGo more closely with Shapely's interface conventions.
- Added
@propertydecorator to__geo_interface__inGeometry,Point,Line, andPolyclasses - Updated all usage sites from
__geo_interface__()method call syntax to__geo_interface__property access syntax - Version bumped from 0.2.4 to 0.2.5 and removed unnecessary compiler warning flag
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| togo.pyx | Added @property decorator to __geo_interface__ in all four geometry classes (Geometry, Point, Line, Poly) |
| tests/test_shapely_api.py | Updated all five test cases to access __geo_interface__ as a property instead of calling it as a method |
| examples/shapely_api_demo.py | Updated example to use property syntax for __geo_interface__ |
| SHAPELY_API.md | Updated documentation to show __geo_interface__ as a property in all examples and API reference |
| QUICK_REFERENCE.md | Updated quick reference to use property syntax for __geo_interface__ |
| pyproject.toml | Bumped version from 0.2.4 to 0.2.5 |
| setup.py | Removed -Wno-int-in-bool-context compiler flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.