I'm working on a QGIS plugin and struggling to find some existing QGIS processing functionally I could leverage. I need to replicate multi-basin delineation using pre-defined pour points. Specifically, I would like to delineate basins (or contributing area) for each cell representing a river segment. The ESRI watershed tool was used before for the function, referencing a input flow direction grid, and Pour_Points (a raster with each cell being a unique ID).
previous ArcPy implementation:
gp.Watershed_sa(fdirnd, Pour_Points, wshed_g, "")
Graphic below shows needed output. Blue line is a vector river segment. The blue line is converted to raster and matched cell size to a flow Direction raster. Each cell of the river represents a Pour point, in which a basin is delineated.