You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For temporal raster data, I often have a stack of rasters that represent the same variable across time. For instance, raster 1 is 2000, raster 2 is 2001, and so on. I have polygon data where each row corresponds to one of those years. I wish to calculate some area metric using extact_extract based on the corresponding year of each polygon. It may be possible to do it efficiently in the current setup, but I could only do it by looping (applying) through each polygon row or breaking it up by time. I am wondering if an index feature could be added such that each polygon is matched to the corresponding raster based on the index. Let me know if that makes sense. Thank you!
The text was updated successfully, but these errors were encountered:
If I'm understanding correctly, we have N unique polygons and we need stats calculated from N unique raters. If that's the case, I don't see any computational efficiency gain from bringing the looping inside exactextractr...the gain would be in having more concise syntax. Is that right?
More like N unique polygons corresponding to M different rasters, with N > M. It can be done through looping on the outside for sure. I'm not 100% familiar with how the reading in/out of the rasters is handled, but my thought was that it would minimize reading rasters for each polygon separately. But now that you mention it, it seems like just a loop by the unique rasters, M, would be the simplest.
For temporal raster data, I often have a stack of rasters that represent the same variable across time. For instance, raster 1 is 2000, raster 2 is 2001, and so on. I have polygon data where each row corresponds to one of those years. I wish to calculate some area metric using extact_extract based on the corresponding year of each polygon. It may be possible to do it efficiently in the current setup, but I could only do it by looping (applying) through each polygon row or breaking it up by time. I am wondering if an index feature could be added such that each polygon is matched to the corresponding raster based on the index. Let me know if that makes sense. Thank you!
The text was updated successfully, but these errors were encountered: