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
{{ message }}
Repository navigation
Return removed patches raster from dft_rast_transition() #17
When using patch_area_min in dft_rast_transition(), there's no easy way to see what was removed. Users need to visually inspect filtered patches to decide if their threshold is too aggressive or too lenient — especially when ground-truthing against satellite basemaps.
Proposed Solution
Add a $removed element to the return list of dft_rast_transition():
result<- dft_rast_transition(classified, from="2017", to="2023",
patch_area_min=5000)
terra::plot(result$raster) # transitions that survived filteringterra::plot(result$removed) # transitions that were cut
When patch_area_min = NULL (default): $removed is NULL, no change to current behavior
When filtering is active: $removed is a factor SpatRaster with the same levels/colors as $raster, containing only the small patches that were masked
Plottable, overlayable, passable to dft_map_interactive()
This lets users iterate on their threshold visually without leaving R.
Activity
Add patch_area_min filter and CRS check to dft_rast_transition()
Add patch_area_min filter to dft_rast_transition()