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

Allow fitting models on raster stacks of differing extents #82

Open
ailich opened this issue May 30, 2022 · 3 comments
Open

Allow fitting models on raster stacks of differing extents #82

ailich opened this issue May 30, 2022 · 3 comments

Comments

@ailich
Copy link

ailich commented May 30, 2022

Sometimes I'd like to fit a single model using superClass or unsuperClass on several disjointed areas where I have raster data of the same variables. The way I've done this is the past for supervised classification is to sample each raster at the training points to create a single dataframe, then fit the model in caret, and the use raster::predict on each raster individually. It would be nice however if this could be done directly in RSToolbox and perhaps with the upgrade to terra you could include SpatRasterDatasets as a supported input which is essentially like having a list of rasters/raster stacks that can be of differing extents.

@bleutner
Copy link
Owner

makes sense, yes. I've been reworking large parts of superClass and will consider this suggestion. Also SpatRasterDatasets seems like a good input structure I wasn't aware of.

@ailich
Copy link
Author

ailich commented May 31, 2022

Thanks!

@ailich
Copy link
Author

ailich commented Jun 23, 2022

I was actually mistaken about the differing extents. I tried using a SpatRasterDataset instead of a list of rasters and got "Error: [sds] extents do not match ()".

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

2 participants