[GRASS-dev] t.rast.mapcalc with same substring dataset names

Hi dev team,

I have been trying to run a few t.rast.mapcalc operations and encountered the substring dataset name problem described here: http://trac.osgeo.org/grass/ticket/2735

To my understanding this has never actually been fixed, so I tried to come up with a fool-proof solution. To prevent successive substitution of substrings, the dataset names in the expression are first filled with random string identifiers in descending string length order that can later be "formated" with exp.format(). See diff attached. This might be useful for other t.* modules that use the exp.replace() approach.

Since I havent got the latest trunk compiled, I wasnt able to test it in grass, but the concept should work. Would be great if someone with more t.* experience than me could test it.

Best regards,

Michel

(attachments)

t.rast.mapcalc.diff (2.01 KB)