Re: [GRASS-user] A question before I embark on a programming exercise

2014-11-12 Thread Rainer M Krug
Thomas Adams tea...@gmail.com writes: All: I need to generate an ascii text file from a flow direction grid that consists of (among a couple other things that don't really matter at this point) for each pixel: (1) a unique integer identifier (1 -- N) for the pixel (2) the integer

Re: [GRASS-user] d.out.file / d.save - Shell-script use issues

2014-11-12 Thread Glynn Clements
César Augusto Ramírez Franco wrote: As far as I understand, d.out.file only works with X monitors, This appears to be the case, although I have no idea why. The basic operation of d.out.file is to run d.save to extract the list of commands used to generate the display, then replay those

[GRASS-user] t.rast.accumulate ValueError: could not convert string to float:

2014-11-12 Thread maning sambale
Hi, I have an 3hr raintrate data in GRASS STRDs. I tested running a 10day accumulation but I get valuerror. Details below: GRASS 7.0.0 (rainfall):~/trmm t.info 3hr_rainrate + Space Time Raster Dataset -+ |

Re: [GRASS-user] A question before I embark on a programming exercise

2014-11-12 Thread Thomas Adams
Rainer, Thank you very much. I just downloaded everything via git. I greatly appreciate your help. Best, Tom On Wed, Nov 12, 2014 at 1:28 AM, Rainer M Krug rai...@krugs.de wrote: Thomas Adams tea...@gmail.com writes: All: I need to generate an ascii text file from a flow direction grid

Re: [GRASS-user] A question before I embark on a programming exercise

2014-11-12 Thread Moritz Lennert
On 12/11/14 05:10, Thomas Adams wrote: I need to generate an ascii text file from a flow direction grid that consists of (among a couple other things that don't really matter at this point) for each pixel: Rainer has already given you a whole program, but here's a decomposition in simple

Re: [GRASS-user] d.out.file / d.save - Shell-script use issues

2014-11-12 Thread Vaclav Petras
I kindly ask command line users of d.* commands, especially those using d.* commands in scripts, to test and participate in discussions concerning d.* commands in GRASS GIS 7. For example, d.out.file was added (relatively) lately to 7 and there is new command d.to.rast. They are designed to work

Re: [GRASS-user] A question before I embark on a programming exercise

2014-11-12 Thread Thomas Adams
Awesome, Moritz! Thank you so much... Tom On Wed, Nov 12, 2014 at 7:30 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 12/11/14 05:10, Thomas Adams wrote: I need to generate an ascii text file from a flow direction grid that consists of (among a couple other things that don't

Re: [GRASS-user] A question before I embark on a programming exercise

2014-11-12 Thread Johannes Radinger
Hi Tom, what comes into my mind is following approach (not tested): 1) calculate flow direction using r.watershed for each pixel of your map 2) transforming raster to vector points (r.to.vect), adding some columns for your results (X, Y, ID). This step should provide you already with unique IDs

Re: [GRASS-user] A question before I embark on a programming exercise

2014-11-12 Thread Thomas Adams
Moritz, I need to be sure I understand this line: down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3, id[-1,1] etc dir=1 is what direction?; dir=2 is what direction?, etc. Is dir=1 directly to the 'East', dir=3 directly 'south', dir=5 directly 'west' and dir=7 directly 'north' Also,