New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Add normalize() method #1090
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature should be welcome for 1.8.
Co-authored-by: Mike Taves <mwtoews@gmail.com>
Should
I think a method property might be more fitting, since there are no arguments, and there are already many other method properties (e.g.) |
I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve! Thank you @jorisvandenbossche !
Closes #994
This exposes
GEOSNormalize
as a method on the geometry classes. In GEOS, this works in place, but to keep the Shapely interface consistent (other operations like simplify also return a new geometry), I made thenormalize()
method to return a new geometry (and thus first clone the geometry before normalizing it).This seems to work for me for some simple cases. cc @tomplex @Lucidiot
Especially given the overlay changes in GEOS 3.9.0 (where you often first need to normalize the geometry if you want to be able to compare it to an expected result across different GEOS versions), I think it would be useful to still include this in Shapely 1.8.