-
Notifications
You must be signed in to change notification settings - Fork 18
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
Rasterise handles lists #26
Conversation
Version: 0.2.2
Thanks @teunbrand This does now handle the case mentioned in #25:
No problem, the branches were pretty much in sync.
I'll add to the vignettes, and mention this. Ditto with |
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.
LGTM
Added an roxygen2 tag and added to the CHANGELOG.
I'll update the vignettes in the dev->master
PR after the other PR is approved, and re-version.
Thanks!
Prompted by #25, this PR aims to allow list-input in the
rasterise()
function.Regardless of whether the layer is
geom_sf()
or something else, handling lists is also convenient for rasterising multiple layers at once. With this PR, you can rasterise multiple layers:The updated
rasterise()
should be to find whatever layers are in a nested list, tag these for rasterisation, and ignore other list elements. In thegeom_sf()
case, this means that only the layer get rasterised, and not the coord. Below a demonstration for a nested list:The function still throws an error when provided a list that doesn't contain any layer elements. Note that I changed the error message as I found it confusing that it complained about the
dev
argument while thelayer
argument was at fault.Created on 2021-02-26 by the reprex package (v1.0.0)
P.S.
I accidentally branched this from the master branch, which seems ahead of the develop branch. I'm sorry if this drags along unintended changes.