-
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
Proposal: geometrycolumn(x) = first(geometrycolumns(x))
#163
Comments
Makes sense to me, except it's easy to mix them up |
Do you want it to just pick one in case of multiple geometry columns, or to give an error? |
Can you provide an example where one would use first(...) like that? I wonder if we could provide something like |
Hmm, getgeom on a table might be better than this. But my thought was for simple operations like plotting: # current state
df[!, first(GI.geometrycolumns(df))]
# alternatives
df[!, GI.geometrycolumn(df)]
# or
GI.getgeom(df) Where this would really be useful is when constructing filter statements where you need a symbol: # current state
filter(df, first(GI.geometrycolumns(df)) => x -> intersects(df, somegeom))
# alternative
filter(df, GI.geometrycolumn(df) => x -> intersects(df, somegeom))
An "active geometry column" would be nice, but that would be an extra bit of metadata. |
I also think we should just have both |
It's difficult to teach users why they should have to use
first(geometrycolumns(x))
, and it's not easy to remember when starting out.Would it make sense to have a convenience function
geometrycolumn(x)
? Then things likedf[:, Not(GI.geometrycolumn(df))]
just work, without exposing users to the annoyances inherent in geospatial datasets.The text was updated successfully, but these errors were encountered: