[GRASS-dev] [GRASS GIS] #2659: replace function bug in t.rast.mapcalc.py

GRASS GIS trac at osgeo.org
Mon Apr 20 03:12:16 PDT 2015


#2659: replace function bug in t.rast.mapcalc.py
----------------------------+-----------------------------------------------
 Reporter:  eosduero        |       Owner:  grass-dev@…              
     Type:  defect          |      Status:  new                      
 Priority:  normal          |   Milestone:  7.0.1                    
Component:  Python          |     Version:  7.0.0                    
 Keywords:  t.rast.mapcalc  |    Platform:  Unspecified              
      Cpu:  x86-32          |  
----------------------------+-----------------------------------------------
 There is a bug in the ''t.rast.mapcalc.py'' function. The problem occurs
 when we have 2 temporal datasets with similar names, for example:
 * map1
 * ecmmap1

 When we try:
 {{{
 t.rast.mapcalc.py" --o input=map1,ecmmap1 expr="map1 - ecmmap1" out=sal1
 basename=sal1 method=start
 }}}

 It cause an error. I think that the problem is in the line 217 (file
 ''etc\python\grass\temporal\mapcalc.py''):
 {{{
                 expr = expr.replace(id_list[j], map_matrix[j][i])
 }}}
 The function can not replace correctly the raster dataset when they have
 equal substrings.


 Thanks and sorry for my english.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2659>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list