[GRASS-user] Report on r.mapcalc issue

Hi everyone,
I'm using Grass 7.4.4 on Windows 7 to perform a simple operation (division
by 10.0) of a raster map using r.mapcalc gui and I noticed that the obtained
results are not correct, e.g. 164 / 10.0 = 15 instead of 16.4.
I tried to do the same operation with Grass 6.4 and it went fine.
Then I switched to Grass 7.4.4 again and I tried to use the command line,
and it gives the correct results.

I think there is a problem in the r.mapcalc gui, has someone else
encountered this strange behavior?

P.S.: In the following lines, the results of a query on a point:

est, nord: 2.85667275343, 42.3684893758
DTM@DTM:
  color: 072:022:104
  value: 164
DTM_grass7@DTM:
  color: 072:020:103
  value: 15
DTM_grass6@DTM:
  color: 072:022:104
  value: 16.4
DTM_grass7_cmd@DTM:
  color: 072:022:104
  value: 16.4

--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

Hi

I don’t have 7.4.4 here, but I get expected results both from command line and GUI in grass 7.6 (new stable release) and development version…

No idea, what might have gone wrong at your end.

I tested like this:
r.mapcalc “test = 164 / 10.0”
r.info test

cheers,
vero

El vie., 15 feb. 2019 a las 17:28, Pilafin (<ilaria.ferrando87@gmail.com>) escribió:

Hi everyone,
I’m using Grass 7.4.4 on Windows 7 to perform a simple operation (division
by 10.0) of a raster map using r.mapcalc gui and I noticed that the obtained
results are not correct, e.g. 164 / 10.0 = 15 instead of 16.4.
I tried to do the same operation with Grass 6.4 and it went fine.
Then I switched to Grass 7.4.4 again and I tried to use the command line,
and it gives the correct results.

I think there is a problem in the r.mapcalc gui, has someone else
encountered this strange behavior?

P.S.: In the following lines, the results of a query on a point:

est, nord: 2.85667275343, 42.3684893758
DTM@DTM:
color: 072:022:104
value: 164
DTM_grass7@DTM:
color: 072:020:103
value: 15
DTM_grass6@DTM:
color: 072:022:104
value: 16.4
DTM_grass7_cmd@DTM:
color: 072:022:104
value: 16.4


Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


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

Hi,
I tested using 7.4.4 on Win10 and worked as expected using the gui. I tested:
r.mapcalc expression="new_map = integer_map / 10.0"
r.info map=new_map

returns: "Data Type: DCELL " and query on one point gives the expected value.

If is not a problem of setting properly g.region before r.mapcalc, I have no idea of what can cause your wrong result.
cheers,

Andrea Balotti

Il 15/02/2019 17:28, Pilafin ha scritto:

Hi everyone,
I'm using Grass 7.4.4 on Windows 7 to perform a simple operation (division
by 10.0) of a raster map using r.mapcalc gui and I noticed that the obtained
results are not correct, e.g. 164 / 10.0 = 15 instead of 16.4.
I tried to do the same operation with Grass 6.4 and it went fine.
Then I switched to Grass 7.4.4 again and I tried to use the command line,
and it gives the correct results.

I think there is a problem in the r.mapcalc gui, has someone else
encountered this strange behavior?

P.S.: In the following lines, the results of a query on a point:

est, nord: 2.85667275343, 42.3684893758
DTM@DTM:
   color: 072:022:104
   value: 164
DTM_grass7@DTM:
   color: 072:020:103
   value: 15
DTM_grass6@DTM:
   color: 072:022:104
   value: 16.4
DTM_grass7_cmd@DTM:
   color: 072:022:104
   value: 16.4

--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

balotti.and wrote

Hi,
I tested using 7.4.4 on Win10 and worked as expected using the gui. I
tested:
r.mapcalc expression="new_map = integer_map / 10.0"
r.info map=new_map

returns: "Data Type: DCELL " and query on one point gives the
expected value.

If is not a problem of setting properly g.region before r.mapcalc, I
have no idea of what can cause your wrong result.
cheers,

Andrea Balotti

Hi Andrea, thank you for your kind reply.
I exclude it's something related to the computational region, because I set
the region to match the input raster map, and then I did not change anything
in the settings.

--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html