-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: added logic to deal with MultiPolygon geometries #94
chore: added logic to deal with MultiPolygon geometries #94
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.
A few suggestions/questions
) | ||
if isinstance(self.koswat_object.new_layer_surface, geometry.MultiPolygon): | ||
_combined_xy = list( | ||
map( |
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.
I don't understand how map() is used here. What is the iterable?
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.
Good o ne, I need to revise this.
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 should indeed be list(map(concatenate, zip(...)))
however, I do not seem to find the failing test for which this piece of the code was required.
zorder=1, | ||
linestyle="solid", | ||
) | ||
if isinstance(self.koswat_object.new_layer_surface, geometry.Polygon): |
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.
Shouldn't you test on the instance type of new_layer_geometry as new_layer_surface is (should be) a LineString?
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.
as far as I recall we store new_layer_geometry
as a Polygon
, not a LineString
. I will have to check this again.
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.
Yes, this is a LineString, I think I had a failing test but I do not manage to find it, so I reverted all the added code here.
Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
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.
Code looks fine
No description provided.