[R-sig-Geo] Flow accumulation in R?

francesco.pirotti at unipd.it francesco.pirotti at unipd.it
Fri Sep 30 09:17:25 CEST 2011


>From my experience, GRASS also has another module which does a very good
job (at least from my limited experience) at calculating flow accumulation
for each cell: r.watershed. Some time ago I successfully adapted the GRASS
code to my own c++ code; I used GDAL raster library to read a raster DTM
and used the r.watershed code to run the accumulation analysis on the
matrix with height values.
Cheers,
Francesco Pirotti
CIRGEO - University of Padova - Italy

> I would be very interested in your work of getting flow accumulation
> working in R.  I might be able to help (with my limited skills).
>
> Stephen
>
> On Thu 29 Sep 2011 01:50:10 PM CDT, Jonathan Greenberg wrote:
>> Thanks for the responses -- one of the issues with the GRASS
>> implementation of terraflow is that there is not, to my knowledge,
>> parallel support for the code -- the C++ version, I suppose, we can
>> try to compile, although it seems to be fairly out of date.  I figured
>> with the quickly increasing capabilities in spatial programming beyond
>> just spatial statistics in R (e.g. via raster, rgdal, maptools), as
>> well as other people developing parallel interfaces for R (e.g.
>> snowfall, Rmpi), R may do well as a scalable system for doing large
>> scale image processing/GIS analyses.  Certainly, other programs have
>> not scaled well (ArcMap and GRASS to name a few).
>>
>> topidx looked interesting but I can tell that it won't scale -- it
>> requires the image be in memory as a matrix, so any reasonably large
>> DEM won't work.
>>
>> Sounds like this may require some programming!
>>
>> --j
>>
>>
>>
>> On Thu, Sep 29, 2011 at 6:02 AM, Rich Shepard<rshepard at appl-ecosys.com>
>> wrote:
>>> On Wed, 28 Sep 2011, Jonathan Greenberg wrote:
>>>
>>>> I was wondering if anyone had implemented flow accumulation in R (e.g.
>>>> http://www.cs.duke.edu/geo*/terraflow/)?
>>>
>>> Jon,
>>>
>>>   I use r.terraflow (and other hydrological modules) within GRASS
>>> <http://grass.osgeo.org/>. Terrain and hydrologic modeling is best
>>> done, in
>>> my opinion, in GRASS and leave the spatial statistics to R. There is an
>>> interface between the two that allows us users to take advantage of
>>> both.
>>>
>>> Rich
>>>
>>> --
>>> Richard B. Shepard, Ph.D.          |   Integrity - Credibility -
>>> Innovation
>>> Applied Ecosystem Services, Inc.   |    Helping Ensure Our Clients'
>>> Futures
>>> <http://www.appl-ecosys.com>       Voice: 503-667-4517      Fax:
>>> 503-667-8863
>>>
>>
>>
>>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>



More information about the R-sig-Geo mailing list