Closed rs806 closed 1 year ago
In summary you want a new function opt_add_filter()
. I'm I correct ?
Initially I thought it would be better to always maintain the filter set up when running readLAScatalog(). In my actual project I drop withheld right away knowing that I'll never want to include those. However I can see your suggestion of opt_add_filter() will provide flexibility in other cases. But now that I'm thinking about this, maybe it would just be better to warn the user that the previous filters will be lost when using opt_filter(). This would remind me to always explicitly choose filter options. I see either of those options. Thanks.
For backward compatibility I cannot change the current behavior anyway. I can only add a new convenient function
I see now from the LAS catalog vignette that readLAS() behavior is different in that it does discard filtered hits. So I needed to be more careful with readLAScatalog(). For that reason it's probably better for me to just state all the filters I want each time I use opt_filter(). My feeling is that adding a new function opt_add_filter() wouldn't be necessary. Thanks for taking the time to look at this!
Can the filter in readLAScatalog be made to be persistent? For example, I apply a filter when reading in a catalog, and then I am lazy and don't repeat that filter after adding a new one with opt_filter(), and then I lose the first filter.