Re: [GRASS-user] r.mapcalc concatenates values?

2008-09-10 Thread Christian Schwartze
Hi Gabriele,

using r.mapcalc and the @-operator within the calculation you have access to the
labels, but in IF statements it works only on labels that starts with a number
(int vals). So looking for a string is not possible.
But why not using the cats or int labels(with @) in mapcalc, then asigning a new
and unique cat value, following a reclass new_cat_by_mapcalc -- string label?

r.mapcalc 'mapA=if((@landuse==1@soils==2),12,null())

r.reclass with something like 12 = 1 forest,loam

Dont know if my notes helpful...

Regards,
Christian.



This mail was sent through http://webmail.uni-jena.de
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] r.mapcalc concatenates values?

2008-09-09 Thread Gabriele N.

Hi everyone. 

I have two questions

1)
I have some raster (with the same format and are converted from vector). The
cells have the value of CAT. So the value = CAT
With r.mapcalc I would define a map of output that I give, as the value for
each cell, indications of the different CAT. For example, if I have the
raster A that has value = 1 and raster B that has value = 2, I will have
raster C output value = 1,2
If I have 3 maps in input, value = 1,2,3 etc. ...
I made several attempts but I do not know if r.mapcalc concatenates the
values.

2) 
if r.mapcalc is not possible, I tried to make the transition to vector. The
passages that I made are:
  - r.to.vect maps raster input (es rasterA and rasterB)
  - V.overlay and I get in dbf, in a column the value of rasterA and in
another column the value of rasterB. I've created a third column to
concatenate the 2 columns but it seems to me that the operator '| |' does
not work with dbf.
How do I concatenate the values in 2 columns?

Thank you very much
Gabriele
-- 
View this message in context: 
http://www.nabble.com/r.mapcalc-concatenates-values--tp19392795p19392795.html
Sent from the Grass - Users mailing list archive at Nabble.com.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.mapcalc concatenates values?

2008-09-09 Thread Milton Cezar Ribeiro
Hi Gabriele,
After you use r.cross (I follow Christian´s suggestion on it), if you need
to do some computation with the new generated raster map, you can use
r.stats to generate a ascii output. After I even use R to haldle the tabular
data.

Cheers,

miltinho astronauta
brazil

2008/9/9 Christian Schwartze [EMAIL PROTECTED]

 If I unterstood you right, maybe r.cross is useful...

 Regards,
 Christian.


 Zitat von Gabriele N. [EMAIL PROTECTED]:

 
  Hi everyone.
 
  I have two questions
 
  1)
  I have some raster (with the same format and are converted from vector).
 The
  cells have the value of CAT. So the value = CAT
  With r.mapcalc I would define a map of output that I give, as the value
 for
  each cell, indications of the different CAT. For example, if I have the
  raster A that has value = 1 and raster B that has value = 2, I will have
  raster C output value = 1,2
  If I have 3 maps in input, value = 1,2,3 etc. ...
  I made several attempts but I do not know if r.mapcalc concatenates the
  values.
 
  2)
  if r.mapcalc is not possible, I tried to make the transition to vector.
 The
  passages that I made are:
- r.to.vect maps raster input (es rasterA and rasterB)
- V.overlay and I get in dbf, in a column the value of rasterA and in
  another column the value of rasterB. I've created a third column to
  concatenate the 2 columns but it seems to me that the operator '| |' does
  not work with dbf.
  How do I concatenate the values in 2 columns?
 
  Thank you very much
  Gabriele
  --
  View this message in context:
 
 http://www.nabble.com/r.mapcalc-concatenates-values--tp19392795p19392795.html
  Sent from the Grass - Users mailing list archive at Nabble.com.
 
  ___
  grass-user mailing list
  grass-user@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/grass-user
 




 
 This mail was sent through http://webmail.uni-jena.de
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user