[GRASS5] Strange r.mapcalc behaviour - bug?

Markus Neteler neteler at itc.it
Mon Mar 22 09:38:00 EST 2004


Hi,

there seems to be a problem with / in r.mapcalc:

g.region rast=modis_vi250m_16_days_NDVI -p
projection: 99 (Transverse Mercator)
zone:       0
datum:      rome40
ellipsoid:  international
north:      5232499.37200598
south:      5050874.37200598
west:       1593200.7883525
east:       1801075.7883525
nsres:      125
ewres:      125
rows:       1453
cols:       1663

r.support -r modis_vi250m_16_days_NDVI
  Updating the stats for [modis_vi250m_16_days_NDVI]
   Updating the number of categories for [modis_vi250m_16_days_NDVI]

r.info -r modis_vi250m_16_days_NDVI
min=0
max=36748

#now I want to get the typical range for NDVI: -1.0 .. 1.0
#values above will be filtered away later:

r.mapcalc "modis_vi250m_16_days_NDVI.2=1. * modis_vi250m_16_days_NDVI / 10000."

r.support -r modis_vi250m_16_days_NDVI.2
  Updating the stats for [modis_vi250m_16_days_NDVI.2]
   Updating the number of categories for [modis_vi250m_16_days_NDVI.2]

r.info -r modis_vi250m_16_days_NDVI.2
min=0.000000
max=4.000000


#############
The same happens when not using r.support.

It seems to round to integer internally? Or I am missing something else.

Markus




More information about the grass-dev mailing list