Moritz Lennert wrote:
r.mapcalc down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3,
id[-1,1] etc
r.mapcalc follows C expression syntax; =is assignment, == is the
equality test.
--
Glynn Clements gl...@gclements.plus.com
___
grass-user
Glynn Clements gl...@gclements.plus.com writes:
Moritz Lennert wrote:
r.mapcalc down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3,
id[-1,1] etc
r.mapcalc follows C expression syntax; =is assignment, == is the
equality test.
In this case shouldn't it be
,
| r.mapcalc
On 14/11/14 11:21, Rainer M Krug wrote:
Glynn Clements gl...@gclements.plus.com writes:
Moritz Lennert wrote:
r.mapcalc down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3,
id[-1,1] etc
r.mapcalc follows C expression syntax; =is assignment, == is the
equality test.
In this case
Glynn Rainer,
YES, absolutely -- I caught that and made it '==' instead of '='. When
typing quickly, I sometimes make that mistake and then have to correct
myself. But fundamentally, Moritz' approach worked very well and produced
what I needed. I have a more difficult problem now, something I
On 13/11/14 00:25, Thomas Adams wrote:
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
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
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
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
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
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
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,
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 identifier of the downstream pixel (assuming there is
12 matches
Mail list logo