In GRASS 7.6+, r.drain = (r.fill.dir + )r.path, i.e. r.path and r.drain are not the same.
Historically, r.drain has been cloned from r.fill.dir and enhanced to extract paths following directions created with the method of r.fill.dir which is included in r.drain. r.drain has been adjusted to also extract paths following directions created by r.cost/r.walk. In order to avoid code duplication between r.fill.dir and r.drain, and to have a more generic path extraction module, r.path has been created and r.drain transformed to a script calling r.fill.dir if needed. The interfaces of r.drain and r.path are not identical, therefore r.drain has been kept as a wrapper for r.fill.dir + r.path for backwards compatibility with GRASS 7.4 and earlier. Markus M On Sat, Jan 26, 2019 at 6:32 AM Huidae Cho <gras...@gmail.com> wrote: > Hello, > > I had the same question before. These two modules are almost the same. > Actually, r.drain is a wrapper for r.path and creates input directions > internally, then just runs r.path. Not sure if it's worth keeping it just > for that extra step. > > Best, > Huidae > > On Thu, Jan 24, 2019 at 3:29 AM Moritz Lennert < > mlenn...@club.worldonline.be> wrote: > >> Hi, >> >> In GRASS 7.6 we have both r.drain and r.path. What is the difference >> between the two ? Should r.drain be declared as deprecated and replaced >> by r.path ? >> >> Moritz >> _______________________________________________ >> grass-dev mailing list >> grass-dev@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/grass-dev > > > > -- > Huidae Cho, Ph.D., GISP, PE (MD), CFM, M.ASCE > Open Source GIS Developer, GRASS GIS Development Team > _______________________________________________ > grass-dev mailing list > grass-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-dev
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev