1

I have several DEMs as geotiff files which I load into R using raster::raster. Additionally, I have lake outlines (located within the DEMs) in the form of shapefiles which I load into R using raster::shapefile.

What I would like to do is to identify the catchment of the lake within the DEM. Importantly, I would like to do this without making use of GIS tools (RGRASS, RSAGA, RQGIS), only R.

One approach I came up with involves the topmodel::subcatch function. This function allows me to get the catchment of any pixel in the raster. Therefore, I could use it to get the catchments of all the pixels which are within the lake polygon, or all the boundary pixels of the lake, alternatively.

However, since topmodel::subcatch only allows for a single pixel as input, I would have to perform it for all the lake boundary pixels and subsequently aggregate all the catchments. This seems inefficient. Is there a better way to do this (i.e. an R function similar to topmodel::subcatch which allows for multiple pixels, or a lake outline, as input)?

This approach would solve the problem, yet it uses R GIS tools, which I don't have access to.

4
  • Thought - if you replace the flat surface of the lake with a depression with a single point minimum, then the catchment of that single point must also be the catchment of the entire lake... I'm not entirely sure how you'd do that though. You could create internal buffers but that could create multiple minima... Hmmm... Normally hydrologists try to get rid of pits - in this case you want to create one...
    – Spacedman
    Commented May 7, 2020 at 20:59
  • Thanks for the comment. Yes, this is a possibility. I actually have the bathymetries of the lakes. Do you think it would work if I extracted all the local minima of the bathymetries, create the catchments of those and then merge them?
    – Abdirizak
    Commented May 18, 2020 at 7:19
  • Possibly, try it on a simple example.
    – Spacedman
    Commented May 18, 2020 at 7:45
  • Of course a workaround could be to do a sink-filling of the DEM to get slightly sloping lake surfaces (with topmodel::sinkfill for instance). Then identify the lowest pixel lying within the lake polygon (which is the lake outlet pixel) and compute the catchment from there.
    – Abdirizak
    Commented Sep 10, 2022 at 13:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.