Merged
Conversation
This provides an explicit means of creating an empty geometry object. Motivated by desire for a clear empty geometry type to use in na operations in geopandas.
Contributor
|
@jdmcbr this looks just right to me. Anything else to add? |
Contributor
Author
|
@sgillies No, if you're happy with it as is, I don't think there's anything else I'd like to add now. |
Contributor
|
@jdmcbr thanks! |
|
Question. Should perhaps geometry classes constructed from None-type values or even return an |
Contributor
|
No, I don't think we should mix those cases. |
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.
This provides an explicit means of creating an empty geometry object. Motivated by desire for a clear empty geometry type to use in na operations in geopandas. Thanks @sgillies for laying this out in #513, and @jorisvandenbossche for motivation in #510.
I went with
EmptyGeometry, rather thanEmpty, thinking it made the context slightly clearer when used outside ofshapely. I created an__init__mainly for the docstring, while retaining theBaseGeometrydocstring for the class; maybe that's not necessary though?