Glynn Clements wrote:
The same result can be achieved with one command:
r.mapcalc output = A * 1.0 + B
The multiply will cause A to be converted to double to match the other
argument (floating-point constants are double unless an explicit f
suffix is given), the multiply
Hy Daniel.
I do not think that r.cross can solve the problem.
With r.cross I could get a concatenation of label:
For example, with values A = 12 B = 3323 C = 1 the result with the label
category 12, category 3323, category 1
However, if you know a chance I can prove otherwise.
As a result, the
Ok, I misunderstood your problem. You want the concatenated values,
not just the map of the different crossings. Maybe use r.cross and
then some grep magic in the raster category file
Daniel
On Tue, Nov 23, 2010 at 10:02 AM, Gabriele N. gis...@libero.it wrote:
Hy Daniel.
I do not think that
yes, maybe with grep and r.cross ... but then you think you can convert the
result of r.cross as cell value?
Gabriele
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Values-from-multiple-raster-to-link-together-tp5741032p5766761.html
Sent from the Grass - Users mailing
I have a new problem, this time I would like to concatenate two maps A and B.
A is with 8 digits, B is with 4 digits. So I do as usual:
r.mapcalc output = (( A * 1) ( B ))
But I get strange values with negative values. I did several tests but
without resolve. Perhaps r.mapcalc may have
It's not r.mapcalc fault. I imagine it's probably a limitation due to
the number of bits in your image. For instance, 8 bit images can have
up to 256 values. 16 bit images can have 65,535. So, if you have too
many values, you will have problems. Not sure how to avoid this in
your case but, maybe
Hy Glynn.
Thanks for the interesting explanation.
I did then so:
r.mapcalc A_new = (double(A)) and r.mapcalc B_new = (double(B))
and then
r.mapcalc output = ((A_new * 1)+(B_new ))
I need to check the result, but it seems that the result is right.
Thank you very much
Gabriele
--
Daniel Victoria wrote:
It's not r.mapcalc fault. I imagine it's probably a limitation due to
the number of bits in your image. For instance, 8 bit images can have
up to 256 values. 16 bit images can have 65,535. So, if you have too
many values, you will have problems. Not sure how to
Gabriele N. wrote:
Thanks for the interesting explanation.
I did then so:
r.mapcalc A_new = (double(A)) and r.mapcalc B_new = (double(B))
and then
r.mapcalc output = ((A_new * 1)+(B_new ))
The same result can be achieved with one command:
r.mapcalc output = A *
I'm coming in a bit late in the discussion but doesn't r.cross solves
your problem?
http://grass.osgeo.org/grass65/manuals/html65_user/r.cross.html
Daniel
On Tue, Nov 16, 2010 at 2:51 PM, Gabriele N. gis...@libero.it wrote:
Sorry, I have not explained well.
The problem was related to the
Sorry, I have not explained well.
The problem was related to the value of C map. That is, I take the example
above. If the value of C map is equal to 1, I get a result - A =12 B=3323
C=1 =12332301 (8 digit number) and instead could be useful 1233231 (number
7-digit).
However I checked and I need
Excellent Alex:). The maps are as follows:
A - value 0, 1, 2, ... 19
B - value 0, 1001, 1002, 1003 3351
C - value from 0, 1, 2, 3, 4 .. 15
So, I did as you suggested:
r.mapcalc output = (( A *100)+( B *100)+ C )
right?
And if I had decimal numbers or strings instead of numbers?
Am 15.11.2010 23:10, schrieb Gabriele N.:
Excellent Alex:). The maps are as follows:
A - value 0, 1, 2, ... 19
B - value 0, 1001, 1002, 1003 3351
C - value from 0, 1, 2, 3, 4 .. 15
So, I did as you suggested:
r.mapcalc output = (( A *100)+( B *100)+ C )
right?
And if I
Am 15.11.2010 23:36, schrieb Gabriele N.:
Hi Achim.
Returning to the problem of the three maps in some cases remain the problem
(for example for the map C), because some numbers are 2 digits and another
with 1 digit.
For example, with values A = 12 B = 3323 C = 1 instead of 1233231 I have
14 matches
Mail list logo