Skip to content
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

change default field value ? #51

Open
mdsumner opened this issue Dec 7, 2022 · 1 comment
Open

change default field value ? #51

mdsumner opened this issue Dec 7, 2022 · 1 comment

Comments

@mdsumner
Copy link
Collaborator

mdsumner commented Dec 7, 2022

make it polygon index, not 1 - can be set to a constant but polygon identity is surely more important than a mask ( we don't have bool type for example)

@mdsumner mdsumner changed the title change default field value change default field value ? Dec 8, 2022
@mdsumner
Copy link
Collaborator Author

mdsumner commented Dec 8, 2022

this is what the new behaviour would do (this is excellent because now the raster values is a fast lookup or pixel-group-index)

  library(sf);sf_use_s2(FALSE);sink(tempfile());example(read_sf);sink(NULL)
library(fasterize)

plot(fasterize(nc, raster(nc, res = .01)))

Created on 2022-12-08 with reprex v2.0.2

this is what current behaviour does

  library(sf);sf_use_s2(FALSE);sink(tempfile());example(read_sf);sink(NULL)
library(fasterize)

plot(fasterize(nc, raster(nc, res = .01)))

Created on 2022-12-08 by the reprex package (v2.0.1)

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

No branches or pull requests

1 participant