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

Michel Wortmann wortmann at pik-potsdam.de
Tue Aug 15 06:14:23 PDT 2017


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.rast.mapcalc.diff
Type: text/x-patch
Size: 2062 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20170815/f908623f/attachment-0001.bin>


More information about the grass-dev mailing list