[GRASS-user] r.mapcalc concatenates values?

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.

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

Regards,
Christian.

Zitat von "Gabriele N." <gis.gn@libero.it>:

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

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 <Christian.Schwartze@uni-jena.de>

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

Regards,
Christian.

Zitat von “Gabriele N.” <gis.gn@libero.it>:

Hi everyone.

I have two questions

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.

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

Ciao Christian, Ciao Miltinho

I tried r.cross and is useful. The problem however is that you may need to
concatenate values other than categories (eg .. values with letters A, B, C.
..). In addition, I am working with a script in BASH within a cycle and maps
(equal to counter '$ i') are always more than 10.
I do not know how to put all the maps in input to r.cross and insert maximum
10

while [ $i -le $num ]
  do
r.cross input=map$i,map$i+1$i,map$i+2....... output=map_tot

Maybe there will be a more simple (?)
Thank you

Miltinho Astronauta wrote:

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 <Christian.Schwartze@uni-jena.de>

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

Regards,
Christian.

Zitat von "Gabriele N." <gis.gn@libero.it>:

>
> 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

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