Mr.ecos
Reputation
Top tag
Next privilege 250 Rep.
 Mar 7 awarded Popular Question Jan 28 awarded Popular Question Dec 4 awarded Popular Question Jul 7 awarded Popular Question May 1 awarded Popular Question Nov 30 comment Spatial Analysis - Calculate a cells elevation (height) above the nearest stream cell Thank you for the late but thorough response. Yes, this approach was what I was thinking, but I did make it work with Euclidean dist. When I do it again, I will work through this approach. Thanks again! Oct 30 awarded Notable Question Sep 2 awarded Critic Sep 2 comment D8 algorithm to get the flow direction in ArcGIS As stated below, filling sinks is often done to standardize the DEM for any further analysis. The reason you are having values other than the D8 directions is because a cell that is part of a sink will have multiple neighbors with the same lower z-value. To define a flow direction for these cells, the D8 direction of the cells with the same z-value are summed leading to values other than the D8 (e.g. 4 + 8 = 12). Filling sinks will reduce or eliminate this issue. Jul 2 awarded Curious Jan 31 comment Flow Accumulation in R @jirikdlec2 this was just what I needed. It is very powerful, very fast, and can be called directly from R. The results of Dr. Tarboton's model are quite impressive. Jan 30 comment Flow Accumulation in R Thank you @jirikadlec2. This looks really promising! This fits with the previous suggestions of using R to call more appropriate tools for the job and gives access to ArcGIS. Also, as discussed here: Lidar DEM the D-infinity flow direction algorithm fixed some of the problems with D8. I hope to get this working shortly. Jan 30 accepted Flow Accumulation in R Jan 29 comment Flow Accumulation in R @whuber, thank you for your thoughts and the link. My ideal would be to use R for the full work flow. Generally [DEM -> flow direction -> accumulation -> >= threshold = stream]. The RSAGA package function `rsaga.fill.sinks` computes a flow direction using either Planchon and Darboux (2001) or Wang and Liu (2006) [it is only one of those, but the doc says "only for "wang.liu.2001"]. The consensus seems to be that `R` is a poor choice for this. I see the reason of that argument and they outweigh my desire to contain it within `R`; I will use python for those bits. Thanks for the help/info! Jan 29 comment Flow Accumulation in R Thank you @mace. Your point about the expense of the flow accumulation algorithm is very well taken. Your hunch may be dead on. The spgrass6 package may be a decent alternative. Jan 29 comment Flow Accumulation in R Thank you for your help @dklassen. This is a good start, but unfortunately the author uses RpyGEO in this script. They use `rpygeo.geoprocessor("FlowAccumulation_sa"...` which still requires an ArcGIS license. However, if I do go the RpyGEO route, I will cite that script/poster. Jan 29 comment Flow Accumulation in R I would prefer it to be in R, but it is not a deal breaker. I have ArcGIS, Spatial Analyst, and could script it in python, but I like to avoid ArcGIS b/c of license issues. I would like to be able to run this routine on computers without Spatial Analyst licenses. RpyGEO, as you know, still needs the SA license to run sa.FlowAccumulation. The other packages i mentioned, RSAGA, enaR, and vegan do not have a flow accumulation function that I could find, but I would be happy to use them. Jan 29 revised Flow Accumulation in R added info Jan 29 asked Flow Accumulation in R Jan 28 comment R - How to sampleRandom() from large raster without NA values @Jeffery, I finally got back around to this. I implemented your raster-in-memory code here, but not with complete success. At first I did such with using `raster()` instead of `readGDAL()`. everything worked fine until I tried to take the same `r.samp` from two different rasters. Each have the same origin, dims, cell size, just different data. The returned samples were different by ~1 cell on the x-coord; so they were unpaired. I then tried it with `readGDAL()` but it got hung up with no success (64 Gb of ram). I I can add to my OP with code it that would help. Thanks