Skip to content

Why are Multi{Polygon,Linestring,...} <: AbstractVector and not <: AbstractGeometry #95

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

Open
greimel opened this issue Sep 28, 2020 · 2 comments
Labels

Comments

@greimel
Copy link

greimel commented Sep 28, 2020

What is the benefit of them being AbstractVectors?

In AlgebraOfGraphics we would like to support all shapes that are plottable. We would like to just implement methods for AbstractGeometry. Instead we have to define methods for Multi* types separately.

MakieOrg/AlgebraOfGraphics.jl#80

related to #70

@juliohm
Copy link
Member

juliohm commented Oct 8, 2020

@greimel I don't know the rationale behind this decision, but it is very strange for sure. I am working on a major refactoring of the code in the cleanup branch, and will keep note of this issue there.

@juliohm juliohm added the cleanup label Oct 8, 2020
@SimonDanisch
Copy link
Member

The idea behind this is, that indexing into them behaves like an AbstractVector of its elements..
Anyways, that type hierarchy is not really used anywhere, so would be easy to change if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants