-
Notifications
You must be signed in to change notification settings - Fork 17
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
Allow vectors with mixed single and multi geometries to be plotted in Makie #136
Conversation
Its not actually needed
I have no idea what situation this would occur in though.
This enables running that code snippet when ArchGDAL is also loaded.
Currently this only allows vectors of (poly, multipoly) or (linestring, multilinestring). Should we also allow GeometryCollections, and just assume that GeoMakie or GeometryOps will do some piracy to allow plotting those, maybe an error hinter or something? GeoMakie's to_multipoly implementation has such a method but it could also be a GeometryOps extension on GeoInterfaceMakie. |
Not sure GeometryOps should get involved here, that's some messy piracy... Why not deal with GeometryCollection here too? |
Hmm I guess we can assume gc's are well formed... |
Assumes "simple" geometrycollections (nonintersecting etc)
Do you need any additional input from me @asinghvi17 ? I am good with whatever you choose. |
I think this approach is good, only problem is that GeometryBasics doesn't support geometry collections. I guess I'd have to rewrite the logic to check for traits then dispatch accordingly instead of eagerly converting. |
Can we just convert to vector and hit the other vector methods in this PR? |
What do you mean? Just skipping GeometryCollection support? |
No, just collect |
For the plot type that ought to work - the problem is that there's no GB convert defined, so the convert_arguments for vectors will fail. Just have to reorder the evaluations and check traits first... |
This gets around the GeometryBasics issue of not having a GI.convert.
This upstreams GeoMakie.to_multipoly and its variants into GeoInterfaceMakie. Performance needs improvement but this is otherwise ready for review, and I have tested it works.
Usecase:
without any fuss or muss.