-
Notifications
You must be signed in to change notification settings - Fork 44
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
Store results for calculate_lsm #154
Comments
Would make sense... We'd need some class where we can store values and intermediate values as member variables alongside the functions. Each time such a value is needed in a function, it is retrieved from the member variable if it was calculated, already. Otherwise, it is calculated and stored to that member variable. An alternative could be to give each function a List as an additional parameter, where it retrieves values if existing or stores them if not existing. This List is passed from one metric calculation to the next. Maybe we should try one of the two with say, patch area, and see how messy it gets. |
Yes, that was my idea as well. I will have a look in the new year :) |
Idea: we could change
This way, all interim results for the individual metrics could be saved in the |
Not sure if I like this idea. I see that this approach would make it quite easy to store all the information needed. However, I like that is is currently possible to use raster objects without any need to modify/change/convert them. I think that this makes it convenient for many applications (e.g. allows to use a pipe quite easily). |
Just a note, PyLandStats apparently has this feature. Maybe we can get some inspirations from there. |
FYI @Nowosad made some major progress and will be part of |
Not sure how complicated this will be (if even possible), but maybe we can somehow store results for e.g. the patch area and other values we need for several metrics during the calculation of
calculate_lsm()
so we don't need to calculate them n times.The text was updated successfully, but these errors were encountered: