-
Notifications
You must be signed in to change notification settings - Fork 901
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 shared_paths method #3215
Conversation
geopandas/tests/test_geom_methods.py
Outdated
self.l5 = LineString([(100, 0), (0, 0), (0, 100)]) | ||
self.l6 = LineString([(5, 5), (5, 100), (100, 5)]) | ||
self.g12 = GeoSeries([self.l5]) | ||
self.g13 = GeoSeries([self.l6]) | ||
|
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 is a duplication of the lines right above I just noticed.
geopandas/base.py
Outdated
align : bool (default True) | ||
If True, automatically aligns GeoSeries based on their indices. If False, | ||
the order of elements is preserved. |
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.
Given recent discussions, this should be updated (removing the keyword)?
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.
At the moment, all methods that take array of geometries have the align keyword. I have just updated it to default to None as we did elsewhere.
The solution with raise is used for other, non-geo args, like distance or tolerance.
Not the best solution but consistent within the limits.
Small idea for the docstring: should we mention how you can get the element out of the collection? For example, how to get a GeoSeries of multilinstrings of the same direction? |
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
That must have fallen through. I will add it to the list and prepare a PR soon-ish. Will link to the resulting method from here once ready. |
xref #2010
One thing I was considering here was if to explode the collection to two GeoSeries but if a user does not care about the direction then the original GeometryCollection that comes from GEOS is probably better and they can explode it later if needed.