-
Notifications
You must be signed in to change notification settings - Fork 370
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
Make geos_to_path
return one path per geometry
#2447
Comments
Progress so far which I did at the time of #2325 and just now rebased. |
I now have the tests passing in my branch 🎉 However, this function is public and a quick search of GitHub shows projects are using it. In all the examples I found, they are passing the result straight to
This seems unappealing with a fair bit of code churn for us and users. Am I missing a better way? Another option might be to deprecate this function entirely and introduce a new function for the new behaviour. Name suggestions: |
🎉 Nice! I almost think we could consider this a bugfix to a certain extent... I don't think we want to deal with a double deprecation like you're saying that would be painful. I'd vote for either ripping the bandaid off and calling it a bugfix, or switching to a new function with a deprecation attached to the current one. |
A disadvantage of making a new function is that we would lose the naming symmetry with |
Add a |
Good point.
So maybe Aside: when I see "geos" I tend to think of https://libgeos.org/, so quite like a name change from that point of view too. |
We used to wrap libgeos directly which made more sense for that name, but now rely on shapely to handle that interface for us. I'm actually curious if shapely even has some of these functions already for us since they do plot their geometries too... this seems like it would be more useful than just Cartopy to me with plotting collections of geometries as a compound path in matplotlib in an efficient manner. I feel like I've seen an issue in matplotlib discussing a shapely plot routine as well. |
Yeah, I had a look at their plotting module (which is marked experimental). AFAICS they don't have anything that returns the path here - just makes a |
Should this logic be moved up into the
geos_to_path()
function though? That currently returns a list of paths, but it seems like if you're passing in one geometry that should be a compound path like you have here.Originally posted by @greglucas in #2325 (comment)
I have been meaning to look into this but not got around to it, so creating an issue before I forget completely!
The text was updated successfully, but these errors were encountered: