Skip to content
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

dont rebuild to GeometryBasics #137

Merged
merged 4 commits into from
May 7, 2024
Merged

dont rebuild to GeometryBasics #137

merged 4 commits into from
May 7, 2024

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented May 7, 2024

This removes all GeometryBasics rebuild customisation so that GI geometries are always returned.

Fixes #133

@rafaqz rafaqz marked this pull request as ready for review May 7, 2024 08:20
@asinghvi17
Copy link
Member

Is it now a "promise" that all apply methods return GI geometries? If so we should:
(a) mention that in the apply docstring
(b) provide some other method like apply which attempts to preserve the input geometry type (this could just run GI.convert at the last step or something).

@rafaqz
Copy link
Member Author

rafaqz commented May 7, 2024

(a) mention that in the apply docstring

Yep I will add here

(b) provide some other method like apply which attempts to preserve the input geometry type (this could just run GI.convert at the last step or something).

Yes feel free to add such a method

Copy link
Member

@asinghvi17 asinghvi17 left a comment

Choose a reason for hiding this comment

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

Sounds good to me!

@rafaqz
Copy link
Member Author

rafaqz commented May 7, 2024

I think its nice if users can pass in a module name and get those types back... but I'm not sure how easy it will be in practice because only GeoInterface geoms hold any trait compatible objects. Probably you are right it has to just be GI.convert run at the end.

(And e.g. features might always need to use GI types)

Copy link
Collaborator

@skygering skygering left a comment

Choose a reason for hiding this comment

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

Looks good to me! I think it is good that we have this be consistent. Better that users know what to expect. And I think it matches what LibGEOS does, which is to always return a LibGEOS polygon. So I think it is reasonable.

@rafaqz rafaqz merged commit 32ace38 into main May 7, 2024
4 checks passed
@asinghvi17
Copy link
Member

Should we release a new version with this fix?

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.

apply does not work on GeometryBasics polygons
3 participants